Hello, I don’t have a problem with GLADYS but as soon as I add my key in the Gladys integration it launches the z2m-mqtt and Zigbee2Mqtt containers but error
on gladys container
connect.js:46 (MqttClient.\u003canonymous\u003e) Error whi
le connecting to MQTT - Error: Connection refused: Not authorized
and on z2m-mqtt container
I’ve already heard about errors with USB devices on Synology, a permissions issue.
Can you check who owns the USB devices directory if that’s possible on Syno?
I don’t know how to do it on Syno
Thanks for your reply; I’ve already set permissions in the task scheduler:
/sbin/modprobe usbserial
/sbin/modprobe ftdi_sio
/sbin/modprobe cdc-acm
chmod 777 /dev/ttyACM0
I don’t have a Synology, so I’ll let those with more experience answer you.
For Synology owners there is this dongle that works on a network port or USB and even over Wi‑Fi!
Can you provide us with the logs of the following two containers?
docker logs gladys-z2m-mqtt
docker logs gladys-z2m-zigbee2mqtt
sudo docker logs gladys-z2m-mqtt
1714725063: mosquitto version 2.0.15 starting
1714725063: Config loaded from /mosquitto/config/mosquitto.conf.
1714725063: Opening ipv4 listen socket on port 1884.
1714725063: Opening ipv6 listen socket on port 1884.
1714725063: mosquitto version 2.0.15 running
1714725069: mosquitto version 2.0.15 terminating
1714725069: Saving in-memory database to /mosquitto/config//mosquitto.db.
1714725069: mosquitto version 2.0.15 starting
1714725069: Config loaded from /mosquitto/config/mosquitto.conf.
1714725069: Opening ipv4 listen socket on port 1884.
1714725069: Opening ipv6 listen socket on port 1884.
1714725069: mosquitto version 2.0.15 running
1714725108: New connection from ::1:34525 on port 1884.
1714725108: Client gladys-main-instance-493679 disconnected, not authorised.
1714725114: New connection from ::1:34528 on port 1884.
1714725114: Client gladys-main-instance-493679 disconnected, not authorised.
1714725119: New connection from ::1:34531 on port 1884.
1714725119: Client gladys-main-instance-493679 disconnected, not authorised.
1714725124: New connection from ::1:34535 on port 1884.
1714725124: Client gladys-main-instance-493679 disconnected, not authorised.
1714725125: New connection from ::1:34536 on port 1884.
sudo docker logs gladys-z2m-zigbee2mqtt
Using '/app/data' as data directory
[2024-05-03 08:31:54] info: z2m: Logging to console, file (filename: log.log)
[2024-05-03 08:32:08] info: z2m: Starting Zigbee2MQTT version 1.37.0 (commit #46f34c8)
[2024-05-03 08:32:08] info: z2m: Starting zigbee-herdsman (0.45.0)
[2024-05-03 08:32:11] warning: zh:ezsp: Deprecated driver 'ezsp' currently in use, 'ember' will become the officially supported EmberZNet driver in next release. If using Zigbee2MQTT see https://github.com/Koenkk/zigbee2mqtt/discussions/21462
[2024-05-03 08:32:16] info: zh:controller: Wrote coordinator backup to '/app/data/coordinator_backup.json'
[2024-05-03 08:32:17] info: z2m: zigbee-herdsman started (resumed)
[2024-05-03 08:32:17] info: z2m: Coordinator firmware version: '{"meta":{"maintrel":"1 ","majorrel":"7","minorrel":"3","product":12,"revision":"7.3.1.0 build 176"},"type":"EZSP v12"}'
[2024-05-03 08:32:17] info: z2m: Currently 0 devices are joined:
[2024-05-03 08:32:17] info: z2m: Zigbee: disabling joining new devices.
[2024-05-03 08:32:17] info: z2m: Connecting to MQTT server at mqtt://localhost:1884
[2024-05-03 08:32:17] error: z2m: MQTT error: Connection refused: Not authorized
[2024-05-03 08:32:18] error: z2m: MQTT failed to connect, exiting...
[2024-05-03 08:32:18] info: z2m: Stopping zigbee-herdsman...
[2024-05-03 08:32:18] info: zh:controller: Wrote coordinator backup to '/app/data/coordinator_backup.json'
[2024-05-03 08:32:19] info: z2m: Stopped zigbee-herdsman
Using '/app/data' as data directory
[2024-05-03 08:32:33] info: z2m: Logging to console, file (filename: log.log)
[2024-05-03 08:32:41] info: z2m: Starting Zigbee2MQTT version 1.37.0 (commit #46f34c8)
[2024-05-03 08:32:41] info: z2m: Starting zigbee-herdsman (0.45.0)
[2024-05-03 08:32:43] warning: zh:ezsp: Deprecated driver 'ezsp' currently in use, 'ember' will become the officially supported EmberZNet driver in next release. If using Zigbee2MQTT see https://github.com/Koenkk/zigbee2mqtt/discussions/21462
[2024-05-03 08:32:48] info: z2m: zigbee-herdsman started (resumed)
[2024-05-03 08:32:48] info: z2m: Coordinator firmware version: '{"meta":{"maintrel":"1 ","majorrel":"7","minorrel":"3","product":12,"revision":"7.3.1.0 build 176"},"type":"EZSP v12"}'
[2024-05-03 08:32:48] info: z2m: Currently 0 devices are joined:
[2024-05-03 08:32:48] info: z2m: Zigbee: disabling joining new devices.
[2024-05-03 08:32:48] info: z2m: Connecting to MQTT server at mqtt://localhost:1884
[2024-05-03 08:32:49] error: z2m: MQTT error: Connection refused: Not authorized
[2024-05-03 08:32:49] error: z2m: MQTT failed to connect, exiting...
[2024-05-03 08:32:49] info: z2m: Stopping zigbee-herdsman...
[2024-05-03 08:32:49] info: zh:controller: Wrote coordinator backup to '/app/data/coordinator_backup.json'
[2024-05-03 08:32:49] info: z2m: Stopped zigbee-herdsman
Using '/app/data' as data directory
[2024-05-03 08:33:00] info: z2m: Logging to console, file (filename: log.log)
[2024-05-03 08:33:08] info: z2m: Starting Zigbee2MQTT version 1.37.0 (commit #46f34c8)
[2024-05-03 08:33:08] info: z2m: Starting zigbee-herdsman (0.45.0)
[2024-05-03 08:33:10] warning: zh:ezsp: Deprecated driver 'ezsp' currently in use, 'ember' will become the officially supported EmberZNet driver in next release. If using Zigbee2MQTT see https://github.com/Koenkk/zigbee2mqtt/discussions/21462
[2024-05-03 08:33:15] info: z2m: zigbee-herdsman started (resumed)
[2024-05-03 08:33:15] info: z2m: Coordinator firmware version: '{"meta":{"maintrel":"1 ","majorrel":"7","minorrel":"3","product":12,"revision":"7.3.1.0 build 176"},"type":"EZSP v12"}'
[2024-05-03 08:33:15] info: z2m: Currently 0 devices are joined:
[2024-05-03 08:33:15] info: z2m: Zigbee: disabling joining new devices.
[2024-05-03 08:33:15] info: z2m: Connecting to MQTT server at mqtt://localhost:1884
[2024-05-03 08:33:15] error: z2m: MQTT error: Connection refused: Not authorized
[2024-05-03 08:33:15] error: z2m: MQTT failed to connect, exiting...
[2024-05-03 08:33:15] info: z2m: Stopping zigbee-herdsman...
[2024-05-03 08:33:16] info: zh:controller: Wrote coordinator backup to '/app/data/coordinator_backup.json'
[2024-05-03 08:33:16] info: z2m: Stopped zigbee-herdsman
Using '/app/data' as data directory
[2024-05-03 08:33:25] info: z2m: Logging to console, file (filename: log.log)
[2024-05-03 08:33:33] info: z2m: Starting Zigbee2MQTT version 1.37.0 (commit #46f34c8)
[2024-05-03 08:33:33] info: z2m: Starting zigbee-herdsman (0.45.0)
For additional information I installed Docker using the Docker from Synology’s Package Center, as well as the USB drivers from the SynoKernel community (SynoKernel Usb serial drivers)
version 1.1-8
Thanks. No problem on the USB ports side ![]()
It looks like the containers can’t communicate with each other or the passwords are wrong ![]()
Did you deploy the Gladys Docker with network_mode: host?
Can you connect to the MQTT server from a tool like MQTTX?
Here is an example configuration (you’ll find the password in /var/lib/gladysassistant/zigbee2mqtt/z2m/configuration.yaml)
One possible solution is to disable/re-enable the Zigbee2Mqtt service from the Integrations > Zigbee2MQTT > Configuration page
The Gladys Docker is correctly running in host mode.
I can’t connect to the MQTT server from the MQTTX tool.
The configuration.yaml file is in /volume1/docker/gladysassistant/zigbee2mqtt/z2m/ as specified on the site:
sudo \
docker run -d \
--log-driver json-file \
--log-opt max-size=10m \
--restart=always \
--privileged \
--network=host \
--cgroupns=host \
--name "gladys" \
-e NODE_ENV=production \
-e SERVER_PORT=8420 \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /volume1/docker/gladysassistant/:/var/lib/gladysassistant \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /dev:/dev \
gladysassistant/gladys:v4
Also, you need to remove the two timezone lines since they’re already managed by Synology, otherwise you’ll get an error.
With MQTTX I get the same connection error « Error: Connection refused: Not authorized » when I add my IP address in the 2nd host parameter. However, if I leave the config at its default with broker.emqx.io instead of the IP address it works. I don’t know if this helps you — I completely reinstalled and the same issue persists.
To improve readability, can you put your logs between code tags or put ``` before and after your code.
Thanks in advance
It’s done
The MQTT passwords are not the ones known to Gladys and Z2M.
I recommend that you:
- disable the zigbee2mqtt service from Gladys
- delete the folder
/volume1/docker/gladysassistant/zigbee2mqtt - re-enable the zigbee2mqtt service from Gladys
Thanks, but I can’t bring Zigbee2mqtt back up — the button moves to the right but immediately returns, and on Docker I get a « bind mount failed » message: the directory volume1/docker/gladysassistant/zigbee2mqtt/mqtt does not exist.
He’s a stubborn one, that rascal.
The MQTT directory is located under zigbee2mqtt, so I deleted everything. I’m going to try to create an MQTT integration only with Gladys
Same problem — I reinstalled everything once again. I think like you that it’s a password that doesn’t match, but I don’t know if we can change them via the command line or otherwise.
Can you check the password directly in the file zigbee2mqtt/mqtt/mosquitto.conf (the one in zigbee2mqtt) and also in /zigbee2mqtt/z2m/configuratiion.yaml to see if it’s consistent with what you enter.
For the MQTT password, it needs to be decoded; it’s SHA-256, I think.
You can, but I don’t know the command. And above all, you shouldn’t have to do all that. The idea behind Gladys is that you click and it works.
We need to find what’s different in your installation
