From 8cbdba6e3e6f1f37c0baf8f33adc561b4624109e Mon Sep 17 00:00:00 2001 From: DIY techie Date: Sat, 9 May 2020 09:23:54 +0200 Subject: [PATCH 1/7] Update deconz.md --- docs/deconz.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/docs/deconz.md b/docs/deconz.md index 5b0e265f..45442f28 100644 --- a/docs/deconz.md +++ b/docs/deconz.md @@ -3,17 +3,7 @@ - [Docker](https://hub.docker.com/r/marthoc/deconz) - [Website](https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/README.md) -## Installing deCONZ -1) Plug in you ConBee II, ConBee or Raspbee (if no device is plugged in, deCONZ will not be properly installed) -2) Add deCONZ to your stack using `cd ~/IOTstack && bash ./menu.sh`and select deCONZ -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". -4) Build the stack again using `cd ~/IOTstack && bash ./menu.sh` to apply the changes and select "Do not overwrite". -5) Run `docker-compose up -d` to build the deCONZ container. - -These steps are also shown in the gif below: - -![installing deCONZ](https://github.com/DIYtechie/resources/blob/master/images/installing%20deconz%20-%20short%20version.gif?raw=true) - +## Accessing Phoscon ui deCONZ should now be available at http://ip.address.of.your.IOTstack.pc.here:8090/ ## Viewing the deCONZ Zigbee mesh From c584129eb2a80f696917e7cfaed81dfddeb30ab7 Mon Sep 17 00:00:00 2001 From: DIY techie Date: Sat, 9 May 2020 09:26:06 +0200 Subject: [PATCH 2/7] make empty this ensures that no deCONZ container is created if a device is not plugged in (the user has chosen cancel) or selected from the deconz menu --- .templates/deconz/service.yml | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/.templates/deconz/service.yml b/.templates/deconz/service.yml index 9199adc3..8b137891 100644 --- a/.templates/deconz/service.yml +++ b/.templates/deconz/service.yml @@ -1,26 +1 @@ - deconz: - image: marthoc/deconz - container_name: deconz - restart: unless-stopped - network_mode: bridge - ports: - - '8090:80' - - '4439:443' - - '5901:5900' - volumes: - - ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ - #devices: - #ConBee II uncomment next line - #- /dev/ttyACM0 - #ConBee uncomment next line - #- /dev/ttyUSB0 - #RaspBee uncomment next line - #- /dev/ttyAMA0 or /dev/ttyS0 - environment: - - DECONZ_VNC_MODE=1 - - DECONZ_VNC_PASSWORD=changeme - - DEBUG_INFO=1 - - DEBUG_APS=0 - - DEBUG_ZCL=0 - - DEBUG_ZDP=0 - - DEBUG_OTAU=0 + From b80b21e04032538c5c4aa4272cf998a61adeaf1e Mon Sep 17 00:00:00 2001 From: DIY techie Date: Sat, 9 May 2020 09:28:28 +0200 Subject: [PATCH 3/7] create deCONZ device config --- .templates/deconz/build.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .templates/deconz/build.sh diff --git a/.templates/deconz/build.sh b/.templates/deconz/build.sh new file mode 100644 index 00000000..4dcf8f69 --- /dev/null +++ b/.templates/deconz/build.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +#deCONZ device configuration + +device_selection=$(whiptail --radiolist --title "deCONZ device configuration" --notags \ + "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 \ + "ConBeeII" "ConBee II " "ON" \ + "ConBee" "ConBee " "OFF" \ + "RaspBee" "RaspBee " "OFF" \ + 3>&1 1>&2 2>&3) + + case $device_selection in + + "ConBeeII") + echo "...copied ConBee II config from template" + echo "" >>docker-compose.yml + cat .templates/deconz/service_conbee_II.yml >>docker-compose.yml + ;; + "ConBee") + echo "...copied ConBee config from template" + echo "" >>docker-compose.yml + cat .templates/deconz/service_conbee.yml >>docker-compose.yml + ;; + "RaspBee") + echo "...copied RaspBee config from template" + echo "" >>docker-compose.yml + cat .templates/deconz/service_raspbee.yml >>docker-compose.yml + ;; + esac From 9fc4d6780025c185e2d931a77363cba9a23d9a0b Mon Sep 17 00:00:00 2001 From: DIY techie Date: Sat, 9 May 2020 09:29:16 +0200 Subject: [PATCH 4/7] Create service_conbee.yml --- .templates/deconz/service_conbee.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .templates/deconz/service_conbee.yml diff --git a/.templates/deconz/service_conbee.yml b/.templates/deconz/service_conbee.yml new file mode 100644 index 00000000..c23a9a84 --- /dev/null +++ b/.templates/deconz/service_conbee.yml @@ -0,0 +1,21 @@ + deconz: + image: marthoc/deconz + container_name: deconz + restart: unless-stopped + ports: + - '8090:80' + - '443:443' + - '5901:5900' + volumes: + - ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ + devices: + #ConBee: + - /dev/ttyUSB0 + environment: + - DECONZ_VNC_MODE=1 + - DECONZ_VNC_PASSWORD=changeme + - DEBUG_INFO=1 + - DEBUG_APS=0 + - DEBUG_ZCL=0 + - DEBUG_ZDP=0 + - DEBUG_OTAU=0 From c2d231c6aedb123a4a44c48f10dc2f45e4b8e29d Mon Sep 17 00:00:00 2001 From: DIY techie Date: Sat, 9 May 2020 09:29:58 +0200 Subject: [PATCH 5/7] Create service_conbee_II.yml --- .templates/deconz/service_conbee_II.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .templates/deconz/service_conbee_II.yml diff --git a/.templates/deconz/service_conbee_II.yml b/.templates/deconz/service_conbee_II.yml new file mode 100644 index 00000000..da9d99e6 --- /dev/null +++ b/.templates/deconz/service_conbee_II.yml @@ -0,0 +1,21 @@ + deconz: + image: marthoc/deconz + container_name: deconz + restart: unless-stopped + ports: + - '8090:80' + - '443:443' + - '5901:5900' + volumes: + - ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ + devices: + #ConBee II: + - /dev/ttyACM0 + environment: + - DECONZ_VNC_MODE=1 + - DECONZ_VNC_PASSWORD=changeme + - DEBUG_INFO=1 + - DEBUG_APS=0 + - DEBUG_ZCL=0 + - DEBUG_ZDP=0 + - DEBUG_OTAU=0 From d09497e809ace7ad8fad35dca055f528e3106866 Mon Sep 17 00:00:00 2001 From: DIY techie Date: Sat, 9 May 2020 09:30:52 +0200 Subject: [PATCH 6/7] Create service_raspbee.yml --- .templates/deconz/service_raspbee.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .templates/deconz/service_raspbee.yml diff --git a/.templates/deconz/service_raspbee.yml b/.templates/deconz/service_raspbee.yml new file mode 100644 index 00000000..4aedca66 --- /dev/null +++ b/.templates/deconz/service_raspbee.yml @@ -0,0 +1,22 @@ + deconz: + image: marthoc/deconz + container_name: deconz + restart: unless-stopped + ports: + - '8090:80' + - '443:443' + - '5901:5900' + volumes: + - ./volumes/deconz/:/root/.local/share/dresden-elektronik/deCONZ + devices: + #RaspBee: + - /dev/ttyAMA0 + #alternatively - /dev/ttyS0 + environment: + - DECONZ_VNC_MODE=1 + - DECONZ_VNC_PASSWORD=changeme + - DEBUG_INFO=1 + - DEBUG_APS=0 + - DEBUG_ZCL=0 + - DEBUG_ZDP=0 + - DEBUG_OTAU=0 From a483b4317404f4f777f906a712867a1e23208163 Mon Sep 17 00:00:00 2001 From: DIY techie Date: Sat, 9 May 2020 13:58:29 +0200 Subject: [PATCH 7/7] fixing typos and simplifying with gif --- docs/deconz.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/deconz.md b/docs/deconz.md index 45442f28..92ff6f09 100644 --- a/docs/deconz.md +++ b/docs/deconz.md @@ -3,17 +3,18 @@ - [Docker](https://hub.docker.com/r/marthoc/deconz) - [Website](https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/README.md) -## Accessing Phoscon ui -deCONZ should now be available at http://ip.address.of.your.IOTstack.pc.here:8090/ +## Pre-installation +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): + +`sudo usermod -a -G dialout pi` (pi user being used as an example) + +## Accessing the Phoscon UI +The Phoscon UI is available using port 8090 (http://your.local.ip.address:8090/) ## Viewing the deCONZ Zigbee mesh The Zigbee mesh can be viewed using VNC (port 5901). The default VNC password is "changeme". ## Connecting deCONZ and Node-RED -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) -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) -3) Open deCONZ (http://ip.address.of.your.IOTstack.pc.here:8090/) and open settings>gateway>advanced. Click "Authenticate app". -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. +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: -![installing deCONZ](https://github.com/DIYtechie/resources/blob/master/images/deconz%20authenticate.png?raw=true) -![installing deCONZ](https://github.com/DIYtechie/resources/blob/master/images/deconz%20node%20red%20config.png?raw=true) +![installing deCONZ](https://github.com/DIYtechie/resources/blob/master/images/Setup%20deCONZ%20in%20Node-RED.gif?raw=true)