Salut @Reno et congrats pour ce travail monstrueux !
Effectivement, c’est une intégration qui est très attendue et qui va faire des heureux.
Génial, tout ce qui fallait. Beau travail.
Clairement. ça va éviter d’avoir des problèmes à l’avenir, et surtout ça permet de supporter les gens qui ont un broker externe pour le MQTT, mais qui ne veulent pas forcément l’utiliser pour le Zigbee2mqtt (ça n’aurais pas de sens)
Petite question: comment appelle tu le container mosquitto ? Il faut que son nom soit bien distincte de celui du service MQTT.
Merci @Reno pour tout ton travail !
Il me tarde de tester ça rapidement !
Juste une petite question, j’ai un RPi qui tourne avec l’image officielle de Gladys (v4)
Je peux utiliser ton image en parallèle sur le même RPi sans créer de conflits (en changeant les ports pour l’UI forcément) ? Ou bien il serait judicieux de faire des tests sur une carte dédiée à ça ?
Au top @VonOx ! Je fais ça et je vous ferai quelques retours rapidement avec mon matériel Xiaomi (ouverture de porte, vibration, luminosité, bouton poussoir, etc…)
pi@gladys:~ $ docker logs gladys-zigbee2mqtt
gladys-server@ start:prod /src/server
cross-env NODE_ENV=production node index.js
Initialising OpenZWave 1.6.1051 binary addon for Node.JS.
OpenZWave Security API is ENABLED
ZWave device db : /usr/local/etc/openzwave
User settings path : /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
2020-11-16T11:59:39+0100 <info> service.start.js:53 (Service.start) Service mqtt is not configured, so it was not started.
2020-11-16T11:59:39+0100 <info> index.js:20 (Object.start) Starting Open Weather service
2020-11-16T11:59:39+0100 <info> service.start.js:53 (Service.start) Service openweather is not configured, so it was not started.
2020-11-16T11:59:39+0100 <info> init.js:38 (Zigbee2mqttManager.init) Zigbee2mqtt USB dongle not attached
2020-11-16T11:59:39+0100 <info> index.js:15 (Object.start) Starting Bluetooth service
2020-11-16T11:59:40+0100 <info> index.js:16 (Object.start) Starting zwave service
2020-11-16T11:59:40+0100 <info> service.start.js:53 (Service.start) Service zwave is not configured, so it was not started.
2020-11-16T11:59:40+0100 <info> index.js:13 (Object.start) Starting usb service
2020-11-16T11:59:40+0100 <info> index.js:19 (Object.start) Starting telegram service
2020-11-16T11:59:40+0100 <info> service.start.js:53 (Service.start) Service telegram is not configured, so it was not started.
2020-11-16T11:59:40+0100 <info> index.js:63 (Server.<anonymous>) Server listening on port 1080
2020-11-16T12:02:59+0100 <info> init.js:49 () Zigbee2mqtt USB dongle attached to /dev/ttyACM0
2020-11-16T12:03:10+0100 <info> init.js:49 () Zigbee2mqtt USB dongle attached to /dev/ttyACM0
2020-11-16T12:03:10+0100 <info> installMqttContainer.js:30 (Zigbee2mqttManager.installMqttContainer) MQTT broker is being installed as Docker container...
2020-11-16T12:03:10+0100 <info> installMqttContainer.js:31 (Zigbee2mqttManager.installMqttContainer) Pulling eclipse-mosquitto:latest image...
2020-11-16T12:03:21+0100 <info> installMqttContainer.js:34 (Zigbee2mqttManager.installMqttContainer) Preparing broker environment...
2020-11-16T12:03:21+0100 <info> installMqttContainer.js:38 (Zigbee2mqttManager.installMqttContainer) Creating container...
2020-11-16T12:03:21+0100 <info> installMqttContainer.js:52 (Zigbee2mqttManager.installMqttContainer) Zigbee2MQTT MQTT broker is starting...
2020-11-16T12:03:27+0100 <info> installMqttContainer.js:58 (Zigbee2mqttManager.installMqttContainer) Creating user/pass...
2020-11-16T12:03:27+0100 <info> installMqttContainer.js:69 (Zigbee2mqttManager.installMqttContainer) MQTT broker container successfully started
2020-11-16T12:03:27+0100 <info> installZ2mContainer.js:29 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is being installed as Docker container...
2020-11-16T12:03:27+0100 <info> installZ2mContainer.js:30 (Zigbee2mqttManager.installZ2mContainer) Pulling koenkk/zigbee2mqtt:latest image...
2020-11-16T12:04:10+0100 <info> installZ2mContainer.js:33 (Zigbee2mqttManager.installZ2mContainer) Preparing Zigbee2mqtt environment...
2020-11-16T12:04:10+0100 <info> installZ2mContainer.js:39 (Zigbee2mqttManager.installZ2mContainer) Creating container...
2020-11-16T12:04:14+0100 <info> installZ2mContainer.js:47 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully installed as Docker container
2020-11-16T12:04:14+0100 <info> installZ2mContainer.js:59 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is starting...
2020-11-16T12:04:20+0100 <info> installZ2mContainer.js:71 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully started
2020-11-16T12:04:20+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:04:20+0100 <warn> connect.js:41 (MqttClient.<anonymous>) Disconnected from MQTT server
2020-11-16T12:04:25+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:04:30+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:04:35+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:04:40+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:04:45+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:04:50+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:04:55+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:00+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:05+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:10+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:15+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:20+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:25+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:30+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:35+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:40+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:45+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:50+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:05:55+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:00+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:05+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:10+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:15+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:21+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:26+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:31+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:36+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:41+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:46+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:51+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:06:56+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:01+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:06+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:11+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:16+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:21+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:26+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:31+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:36+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:41+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:46+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:51+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:07:56+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:01+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:06+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:11+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:16+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:21+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:26+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:31+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:36+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:41+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:46+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:51+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:08:56+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:09:01+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:09:06+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:09:11+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:09:16+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:09:21+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:09:26+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
2020-11-16T12:09:31+0100 <warn> connect.js:32 (MqttClient.<anonymous>) Error while connecting to MQTT - Error: Connection refused: Not authorized
Par contre, je pensais avoir résolu le problème car ça ne le faisait plus chez moi.
Une autre solution consiste à désactiver le service puis à le réactiver depuis l’interface.
@Reno je te conseille de voir ce qui a été fait sur le service MQTT, tu as regardé les derniers changements récents? Il y a eu des petits détails mis en place pour que ce genre de bug n’arrive pas. Notamment des temporisations et des checks pour ne lancer le container que quand c’est prêt.
Hello,
Pour ma part j’ai continué les tests, il semblerait que le problème de droit d’accès sur les fichiers soit du à docker-compose, un simple docker run a l’air de fonctionner sur les deux environnement : l’image de Gladys officielle et HypriotOS.
J’ai donc réussi à y associer deux Xiaomi MiJia wireless switch, et un Xiaomi Mi/Aqara smart home cube donc plus qu’à tester l’utilisation de ceux ci pour lancer des scènes
Merci pour ces tests rapides. Ça fait plaisir des retours comme ça.
@Albenss, tu as eu, toi aussi, les mêmes soucis de connexion des containers entre eux, au démarrage ?
J’avais effectivement bien vu des choses qui ne m’apparaissaient pas forcément « utiles » mais il me semblait pourtant avoir tout laissé tel quel. Je vais jeter un oeil et faire une mise à jour, si nécessaire.