Merci pour vos message !
J’ai suivi vos différents conseils, j’ai commencé par désinstaller Mosquito et ZGB2Mqtt, puis j’ai supprimé les fichiers du répertoire /config/zigbee2mqtt
, et j’ai rebooté.
Ensuite j’ai réinstallé Mosquito, je l’ai démarré, il est apparu dans les intégrations, je l’ai configuré.
Les logs au démarrage:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[20:31:06] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[20:31:09] INFO: Starting NGINX for authentication handling...
[20:31:09] INFO: Starting mosquitto MQTT broker...
2023-06-15 20:31:09: Warning: Mosquitto should not be run as root/administrator.
[20:31:12] INFO: Successfully send discovery information to Home Assistant.
[20:31:13] INFO: Successfully send service information to the Supervisor.
J’ai réinstallé ZGB2Mqtt, je l’ai configuré via le fichier YAML avec les paramètres suivants:
data_path: /config/zigbee2mqtt
socat:
enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: "-d -d"
log: false
mqtt:
base_topic: zigbee2mqtt
server: mqtt://core-mosquitto:1883
serial:
port: /dev/ttyACM0
adapter: deconz
J’ai démarré ZGB2Mqtt, log au démarrage
[20:33:35] INFO: Preparing to start...
[20:33:37] INFO: Socat not enabled
[20:33:44] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info 2023-06-15 20:33:58: Logging to console and directory: '/config/zigbee2mqtt/log/2023-06-15.20-33-58' filename: log.txt
Zigbee2MQTT:info 2023-06-15 20:33:59: Starting Zigbee2MQTT version 1.31.2 (commit #unknown)
Zigbee2MQTT:info 2023-06-15 20:33:59: Starting zigbee-herdsman (0.14.117)
Zigbee2MQTT:info 2023-06-15 20:34:00: zigbee-herdsman started (resumed)
Zigbee2MQTT:info 2023-06-15 20:34:00: Coordinator firmware version: '{"meta":{"maintrel":0,"majorrel":38,"minorrel":120,"product":0,"revision":"0x26780700","transportrev":0},"type":"ConBee2/RaspBee2"}'
Zigbee2MQTT:info 2023-06-15 20:34:03: Currently 0 devices are joined:
Zigbee2MQTT:info 2023-06-15 20:34:03: Zigbee: disabling joining new devices.
J’ai attendu un peu puis ouvert l’UI ZGB2Mqtt, toujours l’erreur « Bad Gateway »
J’ai arrêté ZG2Mqtt, j’ai copié les paramètres que j’avais mis dans l’onglet configuration et je suis allé les coller dans le fichier /config/zigbee2mqtt/configuration.yaml
Je redémarre, toujours la même erreur…
J’essai quelques changements, bien sûr j’arrête et redémarre ZGB2Mqtt à chaque fois.
- Ajout d’un user + password (existant dans les personnes déclarées dans HA)
user: mqtt
password: mqtt
- Je change l’adresse du serveur par celle ci
server: mqtt://127.0.0.1:1883
Toujours rien de mieux… je reviens 30min plus tard le temps de me rafraichir avec une petite bière, je vais voir les logs de Mosquitto et là je vois plein de messages de connexion au broker
2023-06-15 20:31:09: mosquitto version 2.0.15 starting
2023-06-15 20:31:09: Config loaded from /etc/mosquitto/mosquitto.conf.
2023-06-15 20:31:09: Loading plugin: /usr/share/mosquitto/go-auth.so
2023-06-15 20:31:09: ├── Username/password checking enabled.
2023-06-15 20:31:09: ├── TLS-PSK checking enabled.
2023-06-15 20:31:09: └── Extended authentication not enabled.
2023-06-15 20:31:09: Opening ipv4 listen socket on port 1883.
2023-06-15 20:31:09: Opening ipv6 listen socket on port 1883.
2023-06-15 20:31:09: Opening websockets listen socket on port 1884.
2023-06-15 20:31:09: mosquitto version 2.0.15 running
2023-06-15 20:31:10: New connection from 127.0.0.1:35560 on port 1883.
2023-06-15 20:31:10: Client <unknown> closed its connection.
2023-06-15 20:31:24: New connection from 172.30.32.1:38377 on port 1883.
2023-06-15 20:31:24: New client connected from 172.30.32.1:38377 as 5ahBZoMTDQEfjTc7LbjAnr (p2, c1, k60, u'homeassistant').
2023-06-15 20:32:20: New connection from 172.30.32.2:37324 on port 1883.
2023-06-15 20:32:20: Client <unknown> closed its connection.
2023-06-15 20:34:20: New connection from 172.30.32.2:39214 on port 1883.
2023-06-15 20:34:20: Client <unknown> closed its connection.
2023-06-15 20:36:20: New connection from 172.30.32.2:57528 on port 1883.
2023-06-15 20:36:20: Client <unknown> closed its connection.
2023-06-15 20:38:20: New connection from 172.30.32.2:46634 on port 1883.
2023-06-15 20:38:20: Client <unknown> closed its connection.
2023-06-15 20:40:20: New connection from 172.30.32.2:56292 on port 1883.
2023-06-15 20:40:20: Client <unknown> closed its connection.
2023-06-15 20:42:20: New connection from 172.30.32.2:54764 on port 1883.
2023-06-15 20:42:20: Client <unknown> closed its connection.
2023-06-15 20:44:20: New connection from 172.30.32.2:45078 on port 1883.
2023-06-15 20:44:20: Client <unknown> closed its connection.
2023-06-15 20:46:20: New connection from 172.30.32.2:33704 on port 1883.
2023-06-15 20:46:20: Client <unknown> closed its connection.
2023-06-15 20:48:20: New connection from 172.30.32.2:57732 on port 1883.
2023-06-15 20:48:20: Client <unknown> closed its connection.
2023-06-15 20:50:20: New connection from 172.30.32.2:51064 on port 1883.
2023-06-15 20:50:20: Client <unknown> closed its connection.
2023-06-15 20:52:20: New connection from 172.30.32.2:51116 on port 1883.
2023-06-15 20:52:20: Client <unknown> closed its connection.
Je ne sais pas d’où sort l’adresse 172.30.32.2, elle ne correspond en rien à mon réseau… mais en tout cas à priori il y a un moment ou la connexion à été acceptée
2023-06-15 20:31:24: New connection from 172.30.32.1:38377 on port 1883.
2023-06-15 20:31:24: New client connected from 172.30.32.1:38377 as 5ahBZoMTDQEfjTc7LbjAnr (p2, c1, k60, u'homeassistant').
Le pb c’est que les logs de Mosquitto on un comportement très curieux, au boot les 1ères lignes apparaissent en live, mais celle juste au dessus mettent quasiment 30min à apparaitre, bien qu’elles soient horodatées à la suite de celle du boot… du coup c’est très compliqué de savoir ce qu’il se passe à un instant t.
Donc là je suis revenu à la config initiale, sans mon user spécifique mqtt, et j’attends au moin 30min pour voir les logs de Mosquitto, je vous tient au courant.