Skip to content

Commit bbb5766

Browse files
authored
Merge pull request #48 from DIYtechie/deconz
added deconz device config menu and amended wiki accordingly
2 parents 153543e + a483b43 commit bbb5766

File tree

6 files changed

+101
-42
lines changed

6 files changed

+101
-42
lines changed

.templates/deconz/build.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
#deCONZ device configuration
4+
5+
device_selection=$(whiptail --radiolist --title "deCONZ device configuration" --notags \
6+
"Use the [SPACEBAR] to select your Zigbee device from the list below and make sure it is plugged in (if not, press [ESC])." 20 78 12 \
7+
"ConBeeII" "ConBee II " "ON" \
8+
"ConBee" "ConBee " "OFF" \
9+
"RaspBee" "RaspBee " "OFF" \
10+
3>&1 1>&2 2>&3)
11+
12+
case $device_selection in
13+
14+
"ConBeeII")
15+
echo "...copied ConBee II config from template"
16+
echo "" >>docker-compose.yml
17+
cat .templates/deconz/service_conbee_II.yml >>docker-compose.yml
18+
;;
19+
"ConBee")
20+
echo "...copied ConBee config from template"
21+
echo "" >>docker-compose.yml
22+
cat .templates/deconz/service_conbee.yml >>docker-compose.yml
23+
;;
24+
"RaspBee")
25+
echo "...copied RaspBee config from template"
26+
echo "" >>docker-compose.yml
27+
cat .templates/deconz/service_raspbee.yml >>docker-compose.yml
28+
;;
29+
esac

.templates/deconz/service.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1 @@
1-
deconz:
2-
image: marthoc/deconz
3-
container_name: deconz
4-
restart: unless-stopped
5-
network_mode: bridge
6-
ports:
7-
- '8090:80'
8-
- '4439:443'
9-
- '5901:5900'
10-
volumes:
11-
- ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ
12-
#devices:
13-
#ConBee II uncomment next line
14-
#- /dev/ttyACM0
15-
#ConBee uncomment next line
16-
#- /dev/ttyUSB0
17-
#RaspBee uncomment next line
18-
#- /dev/ttyAMA0 or /dev/ttyS0
19-
environment:
20-
- DECONZ_VNC_MODE=1
21-
- DECONZ_VNC_PASSWORD=changeme
22-
- DEBUG_INFO=1
23-
- DEBUG_APS=0
24-
- DEBUG_ZCL=0
25-
- DEBUG_ZDP=0
26-
- DEBUG_OTAU=0
1+

.templates/deconz/service_conbee.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
deconz:
2+
image: marthoc/deconz
3+
container_name: deconz
4+
restart: unless-stopped
5+
ports:
6+
- '8090:80'
7+
- '443:443'
8+
- '5901:5900'
9+
volumes:
10+
- ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ
11+
devices:
12+
#ConBee:
13+
- /dev/ttyUSB0
14+
environment:
15+
- DECONZ_VNC_MODE=1
16+
- DECONZ_VNC_PASSWORD=changeme
17+
- DEBUG_INFO=1
18+
- DEBUG_APS=0
19+
- DEBUG_ZCL=0
20+
- DEBUG_ZDP=0
21+
- DEBUG_OTAU=0
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
deconz:
2+
image: marthoc/deconz
3+
container_name: deconz
4+
restart: unless-stopped
5+
ports:
6+
- '8090:80'
7+
- '443:443'
8+
- '5901:5900'
9+
volumes:
10+
- ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ
11+
devices:
12+
#ConBee II:
13+
- /dev/ttyACM0
14+
environment:
15+
- DECONZ_VNC_MODE=1
16+
- DECONZ_VNC_PASSWORD=changeme
17+
- DEBUG_INFO=1
18+
- DEBUG_APS=0
19+
- DEBUG_ZCL=0
20+
- DEBUG_ZDP=0
21+
- DEBUG_OTAU=0

.templates/deconz/service_raspbee.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
deconz:
2+
image: marthoc/deconz
3+
container_name: deconz
4+
restart: unless-stopped
5+
ports:
6+
- '8090:80'
7+
- '443:443'
8+
- '5901:5900'
9+
volumes:
10+
- ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ
11+
devices:
12+
#RaspBee:
13+
- /dev/ttyAMA0
14+
#alternatively - /dev/ttyS0
15+
environment:
16+
- DECONZ_VNC_MODE=1
17+
- DECONZ_VNC_PASSWORD=changeme
18+
- DEBUG_INFO=1
19+
- DEBUG_APS=0
20+
- DEBUG_ZCL=0
21+
- DEBUG_ZDP=0
22+
- DEBUG_OTAU=0

docs/deconz.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,18 @@
33
- [Docker](https://hub.docker.com/r/marthoc/deconz)
44
- [Website](https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/README.md)
55

6-
## Installing deCONZ
7-
1) Plug in you ConBee II, ConBee or Raspbee (if no device is plugged in, deCONZ will not be properly installed)
8-
2) Add deCONZ to your stack using `cd ~/IOTstack && bash ./menu.sh`and select deCONZ
9-
3) Edit the deconz service.yml using `sudo nano ~/IOTstack/services/deconz/service.yml` - activate your device by removing the "#" in front of "devices" and the "#" in front of your specific device. Save the changes using "ctrl+x", "y" and "enter".
10-
4) Build the stack again using `cd ~/IOTstack && bash ./menu.sh` to apply the changes and select "Do not overwrite".
11-
5) Run `docker-compose up -d` to build the deCONZ container.
6+
## Pre-installation
7+
Before running the command that creates the deconz Docker container (`docker-compose up -d`), you may need to add your Linux user to the dialout group, which allows the user access to serial devices (i.e. Conbee/Conbee II/RaspBee):
128

13-
These steps are also shown in the gif below:
9+
`sudo usermod -a -G dialout pi` (pi user being used as an example)
1410

15-
![installing deCONZ](https://github.com/DIYtechie/resources/blob/master/images/installing%20deconz%20-%20short%20version.gif?raw=true)
16-
17-
deCONZ should now be available at http://ip.address.of.your.IOTstack.pc.here:8090/
11+
## Accessing the Phoscon UI
12+
The Phoscon UI is available using port 8090 (http://your.local.ip.address:8090/)
1813

1914
## Viewing the deCONZ Zigbee mesh
2015
The Zigbee mesh can be viewed using VNC (port 5901). The default VNC password is "changeme".
2116

2217
## Connecting deCONZ and Node-RED
23-
1) Install [node-red-contrib-deconz](https://flows.nodered.org/node/node-red-contrib-deconz) via the manage palette menu (if not already pre-installed with Node-RED)
24-
2) Open a deCONZ in node, select "Add new deconz-server" and type in the IP-address of your IOTstack pc (Rpi) and type in port 8090 (not websocket port)
25-
3) Open deCONZ (http://ip.address.of.your.IOTstack.pc.here:8090/) and open settings>gateway>advanced. Click "Authenticate app".
26-
4) Go back to your Node-RED instance and click the magick:get setting button in the server node. The API and websocket port will be automatically inserted. Click "Add" and you are good to go.
18+
Install [node-red-contrib-deconz](https://flows.nodered.org/node/node-red-contrib-deconz) via the "Manage palette" menu in Node-RED (if it is not already pre-installed) and follow the 2 simple steps in the video below:
2719

28-
![installing deCONZ](https://github.com/DIYtechie/resources/blob/master/images/deconz%20authenticate.png?raw=true)
29-
![installing deCONZ](https://github.com/DIYtechie/resources/blob/master/images/deconz%20node%20red%20config.png?raw=true)
20+
![installing deCONZ](https://github.com/DIYtechie/resources/blob/master/images/Setup%20deCONZ%20in%20Node-RED.gif?raw=true)

0 commit comments

Comments
 (0)