[Tuto] ⏩ Plugin Deconz et Jeedom / Docker / Réseau macvlan

Mise à jour :sparkles:
08/01/2023 : Migration vers deconzcommunity/deconz GitHub - deconz-community/deconz-docker
26/01/2021 : Création du tuto


Sujet dédié à l’installation du plugin Deconz avec jeedom en Docker et un réseau macvlan

:low_brightness: Pour installer Jeedom sur Docker avec un réseau macvlan, je vous invite à lire le sujet :low_brightness:
[Tuto] ⏩ Installation de Jeedom sur Synology / docker / debian buster / réseau macvlan

Il vous indiquera notamment comment créer ou utiliser :
:small_blue_diamond: docker-compose
:small_blue_diamond: réseau macvlan
:small_blue_diamond: conteneur
:small_blue_diamond: PuTTy en SSH
:small_blue_diamond: etc.

------------------------------------------------------------------------------------
                    Création du fichier "docker-compose.yaml"
------------------------------------------------------------------------------------

Pour créer notre conteneur, nous allons utiliser un fichier de configuration docker-compose.yaml

:small_blue_diamond: Voici le contenu du fichier docker-compose.yaml

version: "2"

networks:
     default:
         external:
             name: macvlan
services:
     deconz:
         image: deconzcommunity/deconz:latest
         container_name: deconz-community
         privileged: false
         restart: always
#         tty: true
         networks:
             default:
                 ipv4_address: 192.168.1.245
         volumes:
           - /volume1/docker/deconz-community:/opt/deCONZ
         devices:
           - "/dev/ttyACM1:/dev/ttyACM1"
         environment:
           - PUID=1032
           - PGID=101
           - DECONZ_WEB_PORT=80
           - DECONZ_WS_PORT=443
           - DEBUG_INFO=1
           - DEBUG_APS=0
           - DEBUG_ZCL=0
           - DEBUG_ZDP=0
           - DEBUG_OTAU=0
           - DECONZ_VNC_MODE=1
           - DECONZ_VNC_PORT=5900
           - DECONZ_NOVNC_PORT=6080
           - DECONZ_DEVICE=/dev/ttyACM1
           - DECONZ_VNC_PASSWORD=password
           - DECONZ_UID=0
           - DECONZ_GID=0
           - TZ=Europe/Paris


Explication :

:low_brightness: Voir le tuto en introduction pour plus d’informations :low_brightness:

:small_blue_diamond: networks: notre conteneur sera attaché à notre réseau macvlan

:small_blue_diamond: ipv4_address: 192.168.1.245 Adresse IP pour joindre Deconz
:black_small_square: choisir une IP différente de jeedom et dans la plage du réseau macvlan

:small_blue_diamond: volumes: Répertoire « miroir » où sera installé Deconz

:small_blue_diamond: devices: C’est le port USB utilisé par la clé Combee 2

:small_blue_diamond: PUID et PGID ID de l’utilisateur propriétaire.

:small_blue_diamond: DECONZ_WEB DECONZ_WS Port d’accès par défaut à Phoscon

:small_orange_diamond: Lancer notepad++, faite un copier-coller du code et sauvegarder le fichier docker\deconz-community\docker-compose.yaml

------------------------------------------------------------------------------------
                    Téléchargement de l'image deconzcommunity/deconz:
------------------------------------------------------------------------------------

Nous allons utiliser l’image officiel de Deconz pour créer un conteneur

:small_blue_diamond: Dans le registre Docker du Synology, rechercher l’image deconzcommunity/deconz: et cliquer sur Télécharger
et choisissez latest
image

------------------------------------------------------------------------------------
              Création du conteneur `deconz-community`      
------------------------------------------------------------------------------------

:small_orange_diamond: Lancer la commande cd /volume1/docker/deconz-community pour changer de répertoire

:small_orange_diamond: Lancer la commande docker-compose up -d

:small_blue_diamond: Votre conteneur deconz-community est créé

------------------------------------------------------------------------------------
                      Vérification de l'installation de Deconz
------------------------------------------------------------------------------------

:small_blue_diamond: Pour vérifier que l’installation de Deconz est correct, nous allons « rentrer » à l’intérieur de notre conteneur

:small_orange_diamond: Lancer la commande sudo docker exec -it deconz-community /bin/bash
:small_orange_diamond: Lancer la commande apt show deconz pour vérifier si l’installation de Deconz est présente

:small_orange_diamond: Lancer la commande GCFFlasher_internal -l pour vérifier si la clé ConBee 2 est reconnu

image

:small_orange_diamond: Lancer la commande Ctrl+c
:small_orange_diamond: Lancer la commande exit pour sortir du conteneur

------------------------------------------------------------------------------------
                     Configuration du plugin Deconz
------------------------------------------------------------------------------------

:small_orange_diamond: Procéder à l’installation des Dépendances

:warning: N’installez pas le Deconz local :warning:

Si vous l’avez fait, il faut « rentrer » à l’intérieur du conteneur Jeedom pour désinstaller
:small_orange_diamond: Lancer la commande sudo docker exec -it jeedom-v4 /bin/bash
:small_orange_diamond: Lancer la commande sudo apt-get --purge remove deconz
:small_orange_diamond: Lancer la commande Ctrl+c
:small_orange_diamond: Lancer la commande exit pour sortir du conteneur

:small_orange_diamond: Saisissez l’IP, le port, le port Socket et sauvegarder
image

:small_orange_diamond: Lancer le démon

:small_blue_diamond: Il faut maintenant récupérer la clé API de Phoscon

:small_orange_diamond: Dans votre navigateur internet saisissez 192.168.1.245:80

:small_orange_diamond: Cliquer sur Proceed withot lights
image

:small_orange_diamond: Allez dans le menu de configuration Gateway / Authenticate app
uZufkSs53F

:small_orange_diamond: Vous avez 60s pour cliquer sur Récuperer clef API dans le plugin
image

:small_blue_diamond: La clef API doit apparaitre :+1:

------------------------------------------------------------------------------------
                                        Bon à savoir
------------------------------------------------------------------------------------

:small_blue_diamond: Procéder à l’inclusion de vos équipements (Devices) Zigbee directement à partir du site Phoscon

:small_blue_diamond: Cliquer sur le bouton Synchronisation dans le plugin pour rapatrier les équipements inclus

:small_blue_diamond: Le répertoire deconz-community comporte les fichiers de configuration. Pensez à sauvegarder

:small_blue_diamond: Si vous souhaitez faire la mise à jour de Deconz dans sa derniére version :
:small_orange_diamond: Arrêter le conteneur
:small_orange_diamond: Lancer la commande cd /volume1/docker/deconz-community pour changer de répertoire
:small_orange_diamond: Lancer la commande docker-compose pull
:small_orange_diamond: Lancer la commande docker-compose up -d