Hi @contributors !
Zigbee2mqtt 2.0 is arriving on January 3, 2025:
There are breaking changes:
From a quick read, I don’t think the breaking changes concern us, but of course everything will need to be tested.
2 options:
Either we run the tests before January 3, and if we consider that 2.0.0 won’t change anything for Gladys, we don’t touch anything, and Zigbee2mqtt will be automatically updated for users
Or we prefer a « safe » approach: we run our tests before January 3, but we pin the Zigbee2mqtt version in Gladys and will trigger the update in a controlled way later. This mechanism already exists (You need to modify this line: Gladys/server/services/zigbee2mqtt/docker/gladys-z2m-zigbee2mqtt-container.json at dfff5d2d18470b82b90e170ee4009f027d011ee9 · GladysAssistant/Gladys · GitHub + this line Gladys/server/services/zigbee2mqtt/lib/constants.js at dfff5d2d18470b82b90e170ee4009f027d011ee9 · GladysAssistant/Gladys · GitHub )
I’m personally in favor of approach 2), stability being an important value of the project.
Also, more practically, I’ll be on Christmas leave on January 3, and therefore absolutely not available in case of any issue
What do you think?
Would anyone like to help me test 2.0?
2 Likes
Hello.
Approach 2 without hesitation (even if we modify the lines, you must force current installations to replace their containers).
We could also add the recommended lines in the configuration
advanced:
homeassistant_legacy_entity_attributes: false
homeassistant_legacy_triggers: false
legacy_api: false
legacy_availability_payload: false
device_options:
legacy: false
The illuminance_lux/ illuminance part affects quite a few devices.
I’d offer my help to test, but I’m a bit short on time at the moment. Best effort otherwise
I agree! Yes, the current code indeed forces installations to replace their containers
That, on the other hand, I’m less sure about; if we add that, it will make 1.x behave the same as 2.0. I think for now we should freeze the version in Gladys and that’s it.
On our side, we can simultaneously test the 2.0 image (using the latest-dev tag on the Z2M side)
1 Like
Tested successfully on my machine:
2024-12-06T14:23:28+0100 \u003cinfo\u003e init.js:63 (Zigbee2mqttManager.init) Zigbee2mqtt USB dongle attached to /dev/ttyUSB0
2024-12-06T14:23:28+0100 \u003cinfo\u003e checkForContainerUpdates.js:14 (Zigbee2mqttManager.checkForContainerUpdates) Checking for current installed versions and required updates...
2024-12-06T14:23:28+0100 \u003cinfo\u003e checkForContainerUpdates.js:40 (Zigbee2mqttManager.checkForContainerUpdates) Z2M container: update #4 of the container required...
2024-12-06T14:23:28+0100 \u003cinfo\u003e checkForContainerUpdates.js:57 (Zigbee2mqttManager.checkForContainerUpdates) Z2M container: update #4 of the container done
2024-12-06T14:23:28+0100 \u003cinfo\u003e installMqttContainer.js:114 (Zigbee2mqttManager.installMqttContainer) MQTT broker container successfully started
2024-12-06T14:23:28+0100 \u003cinfo\u003e installZ2mContainer.js:50 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is being installed as Docker container...
2024-12-06T14:23:28+0100 \u003cinfo\u003e installZ2mContainer.js:51 (Zigbee2mqttManager.installZ2mContainer) Pulling koenkk/zigbee2mqtt:1.42.0 image...
2024-12-06T14:23:29+0100 \u003cinfo\u003e installZ2mContainer.js:54 (Zigbee2mqttManager.installZ2mContainer) Configuration of Device /dev/ttyUSB0
2024-12-06T14:23:29+0100 \u003cinfo\u003e installZ2mContainer.js:59 (Zigbee2mqttManager.installZ2mContainer) Creation of container...
2024-12-06T14:23:29+0100 \u003cinfo\u003e installZ2mContainer.js:62 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully installed and configured as Docker container
2024-12-06T14:23:29+0100 \u003cinfo\u003e configureContainer.js:23 (Zigbee2mqttManager.configureContainer) Z2M Docker container is being configured...
2024-12-06T14:23:29+0100 \u003cinfo\u003e configureContainer.js:36 (Zigbee2mqttManager.configureContainer) Z2M configuration file already exists.
2024-12-06T14:23:29+0100 \u003cinfo\u003e installZ2mContainer.js:84 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container is (re)starting...
2024-12-06T14:23:34+0100 \u003cinfo\u003e installZ2mContainer.js:90 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container successfully started
2024-12-06T14:23:34+0100 \u003cinfo\u003e connect.js:25 (Zigbee2mqttManager.connect) Connecting Gladys to mqtt://localhost:1884 MQTT broker...
2024-12-06T14:23:34+0100 \u003cinfo\u003e connect.js:35 (MqttClient.\u003canonymous\u003e) Connected to MQTT container mqtt://localhost:1884
2024-12-06T14:23:34+0100 \u003cinfo\u003e subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
And here’s the result:
I’ll merge and make a Gladys release
1 Like
Without hesitation, the second
Stability is the mother of safety, especially since this is during the school holidays; if some people are not at home, it can affect heating, alarms, etc.
1 Like
mutmut
December 8, 2024, 7:08pm
7
Since my z2m Docker is managed outside of gladys, I just pinned it to 1.42.0 instead of latest as recommended, and that’s a very good recommendation
1 Like
That’s been the case since Gladys Assistant 4.50.2 then
No forced switch to 2.0 in January — we’ll do it gradually later
It’s like when you’re managing a company’s critical system (network, security tool, etc.), it’s better to let others deal with the fallout and just switch straight to the patched major version
Thanks @pierre-gilles for doing that with Gladys! It saves us a lot of trouble!
1 Like
I don’t know if this topic has progressed on your end, but I think that on my side I’m going to review my entire setup to move to an external zigbee2mqtt and buy
2 Likes
mutmut
May 22, 2025, 3:08pm
12
hi @prohand
I was just talking about external z2m (zigbee2mqtt) with a version upgrade and about my management of Docker via Portainer here and my ongoing tests there .
2 Likes