EDIT: Zigbee2mqtt is now natively integrated to Gladys!
Hello everyone,
After months of waiting, here is a new test image of Gladys including the Zigbee2mqtt service.
On this version, everything is automatic: there is no longer any need to use commands to launch the Docker containers manually.
So, I added a view to monitor the service’s operating status at the time of its activation:
I also left the table with the container status, just in case, to troubleshoot a user if necessary, but I think I will remove it in the version that will be integrated to Gladys.
You can download the image on dockerhub:
For information, I tagged it with the Gladys version it is based on, and to which I added a -n where n represents the evolutions of the Zigbee2mqtt service.
Thus, this version is named v4.0.0-1.
If you install it with the latest tag and watchtower is running on your machine, it will be automatically updated with each evolution.
Or install it and run it directly with the command indicated in the Gladys documentation:
Compared to the Gladys documentation, I added the option -v /run/udev:/run/udev:ro which allows to obtain more information about USB devices (especially the manufacturer). This makes it possible to differentiate the dongles if you insert, for example, a Zigbee2mqtt dongle and a Z-wave dongle.
Do not hesitate to comment on your feelings in this topic and even to file issues on my github to identify bugs and devices that are not supported. However, please detail your installation as much as possible and how you produced the bug.
Thank you all for your patience, hoping that it will work as best as possible.
For info, I already have an MQTT container on the host and a Zigbee2mqtt container. Can we have the possibility to just specify an MQTT address in this case?
Edit: My Zigbee2mqtt container already existed under this name, so it doesn’t work. I think we need to add a prefix.
Based on what I see in your logs, there are no errors in the installation and startup of the containers.
This is surprising since you mentioned already having a container with that name.
The MQTT broker is launched on port 1884 to avoid conflict with the MQTT service.
If I understand correctly, @pierre-gilles preferred a separate broker.
So, for your connection issue, could you check the logs of the 2 containers of the service?
Hello, first I would like to thank you for your work, it will be great to be able to do without a Xiaomi gateway
I have a permission issue on my installation, the MQTT container starts but restarts in a loop because it cannot open its config file (mqtt container log: 1605448659: Error: Unable to open config file /mosquitto/config/mosquitto.conf).
I do have the mapping $DATA_PATH/gladys_zigbee:/var/lib/gladysassistant in my volumes and I also forced Gladys to use the root user (user: « 0:0 ») in my docker-compose file but nothing works…
OK, I’ll check it out tonight, but the issue is that since the container already exists, it’s not configured for the MQTT container created by the service.
This must be a rights issue.
Check the rights on the file /var/lib/gladysassistant/zigbee2mqtt/mqtt/mosquitto.conf.
In the mqtt container, the user is not root but mosquitto. This could be the problem.
The file permissions are correctly set to root/root with the value 644, whether I add or not in my docker-compose the value user: "0:0".
So, would there be a way to specify the user to use for the MQTT container? (If it’s the same as Gladys’s, it would make things easier, I think, and avoid this kind of trouble in the future).
EDIT: or to use an alternative image?
In my case, in previous tests, I was using the eclipse-mosquitto image, which, if my memory serves me right, runs as root by default (even if it’s not necessarily great in terms of security…).
For root usage, it was just a test (this is not how I usually launch it) to see if adding a user changed the permissions on the Mosquitto config file, but it made no difference.
It must therefore come from HypriotOS, since all of Gladys’s files are created by root…
This is indeed the container without the root user and with prior cleaning, I think that by default on HypriotOS, the user who has rights on Docker is root, no matter which container I launch, the persistent data is always root…
I couldn’t test more because we need to handle this error (send the info in the UI)
2020-11-15T18:05:02+0100 <error> installMqttContainer.js:43 (Zigbee2mqttManager.installMqttContainer) MQTT broker failed to install as Docker container: Error: (HTTP code 500) server error - toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
at /src/server/node_modules/docker-modem/lib/modem.js:257:17
at IncomingMessage.<anonymous> (/src/server/node_modules/docker-modem/lib/modem.js:284:9)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1223:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
reason: 'server error',
statusCode: 500,
json: null
}
This never happened to me before, anyway I didn’t have the info that something went wrong
You can do a « docker login » on your Docker host, which allows you to connect to Docker Hub, which now requires authentication due to a limit on the number of pulls from this Docker Hub…