# Zigbee2mqtt 2.0 : Approche à prendre?

**URL:** <https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222>\
**Category:** Développement\
**Created:** [Décembre 6, 2024, 9:16 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222 "2024-12-06T09:16:01Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 6, 2024, 9:16 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/1 "2024-12-06T09:16:01Z")

</div>

Salut les [@contributors](https://community.gladysassistant.com/groups/contributors) !

Zigbee2mqtt 2.0 débarque le 3 janvier 2025 :

> **[Release 1.42.0 · Koenkk/zigbee2mqtt](https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.42.0)**
>
> Upcoming Zigbee2MQTT 2.0.0 release
> All the preparations for the 2.0.0 release have now been completed. Note that this release will contain breaking changes which can be found here. Starting from 2 ...

Il y a des changements breaking :

> **[Zigbee2MQTT 2.0.0 breaking changes · Koenkk/zigbee2mqtt · Discussion #24198](https://github.com/Koenkk/zigbee2mqtt/discussions/24198)**
>
> This discussion contains a list of breaking changes for Zigbee2MQTT 2.0.0. TipMost of the breaking changes are about removing legacy features that have been deprecated for years (replaced & improve...

En lisant rapidement, je n’ai pas l’impression que les breaking change nous concernent, mais il faudra naturellement tout tester.

**2 possibilités :**

1. Soit on fait les tests avant le 3 janvier, et si on considère que la 2.0.0 ne va rien changer pour Gladys, on ne touche à rien, et Zigbee2mqtt sera automatiquement mis à jour chez les utilisateurs
2. Soit on préfère une approche «&nbsp;safe&nbsp;», on fait nos tests avant le 3 janvier, mais on fixe la version de Zigbee2mqtt dans Gladys et on déclenchera la mise à jour de manière contrôlé plus tard. Ce mécanisme existe déjà ( Il faut modifier cette ligne : [Gladys/server/services/zigbee2mqtt/docker/gladys-z2m-zigbee2mqtt-container.json at dfff5d2d18470b82b90e170ee4009f027d011ee9 · GladysAssistant/Gladys · GitHub](https://github.com/GladysAssistant/Gladys/blob/dfff5d2d18470b82b90e170ee4009f027d011ee9/server/services/zigbee2mqtt/docker/gladys-z2m-zigbee2mqtt-container.json#L3) + cette ligne [Gladys/server/services/zigbee2mqtt/lib/constants.js at dfff5d2d18470b82b90e170ee4009f027d011ee9 · GladysAssistant/Gladys · GitHub](https://github.com/GladysAssistant/Gladys/blob/dfff5d2d18470b82b90e170ee4009f027d011ee9/server/services/zigbee2mqtt/lib/constants.js#L39) )

Je suis personnellement pour l’approche 2), la stabilité étant une valeur importante du projet.

En plus, de manière plus opérationnelle, je serais en congés de Noël le 3 Janvier, et donc absolument pas disponible en cas de souci 😅

Qu’en pensez-vous ?

Est-ce que quelqu’un voudrait m’aider pour tester la 2.0 ?

---

<div class="post-metadata">

**Author:** ![cicoub13](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cicoub13/32/4482_2.png) [@cicoub13](https://community.gladysassistant.com/u/cicoub13)\
**Post date:** [Décembre 6, 2024, 9:53 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/2 "2024-12-06T09:53:42Z")

</div>

Hello.

Approche 2 sans hésitation (même si on modifie les lignes, il faut forcer les installations actuelles à remplacer leurs containers).

Nous pourrions aussi ajouter les lignes recommandés dans la configuration

```auto
advanced:
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
device_options:
  legacy: false

```

La partie `illuminance_lux`/ `illuminance` touche pas mal d’appareils.

Je te proposerai bien mon aide pour tester, mais le temps manque un peu en ce moment. En best effort sinon 😅

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 6, 2024, 12:25 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/3 "2024-12-06T12:25:00Z")

</div>

> [@cicoub13](#):
>
> Approche 2 sans hésitation (même si on modifie les lignes, il faut forcer les installations actuelles à remplacer leurs containers).

Je suis d’accord! Oui, le code actuel force bien les installations à remplacer leurs containers

> [@cicoub13](#):
>
> nous pourrions aussi ajouter les lignes recommandés dans la configuration

ça par contre je suis moins sûr, si on rajoute ça, ça va justement faire en 1.x le même fonctionnement qu’en 2.0, je pense il faut pour l’instant figer la version dans Gladys et c’est tout.

De notre côté, on pourra en parallèle tester l’image 2.0 (sur le tag `latest-dev` côté Z2M)

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 6, 2024, 12:34 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/4 "2024-12-06T12:34:43Z")

</div>

La PR :

> <https://github.com/GladysAssistant/Gladys/pull/2180>
>
> \### Pull Request check-list
> 
> To ensure your Pull Request can be accepted as fa…st as possible, make sure to review and check all of these items:
> 
> \- \[\] If your changes affects code, did your write the tests?
> \- \[\] Are tests passing? (\`npm test\` on both front/server)
> \- \[\] Is the linter passing? (\`npm run eslint\` on both front/server)
> \- \[\] Did you run prettier? (\`npm run prettier\` on both front/server)
> \- \[\] If you are adding a new features/services, did you run integration comparator? (\`npm run compare-translations\` on front)
> \- \[\] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community (\[french forum\](https://community.gladysassistant.com/)/\[english forum\](https://en-community.gladysassistant.com/)) for testing before merging.
> \- \[\] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
> \- \[\] If you are adding a new features/services which needs explanation, did you modify the user documentation? See \[the GitHub repo\](https://github.com/GladysAssistant/v4-website) and the \[website\](https://gladysassistant.com).
> \- \[\] Did you add fake requests data for the demo mode (\`front/src/config/demo.js\`) so that the demo website is working without a backend? (if needed) See \[https://demo.gladysassistant.com\](https://demo.gladysassistant.com).
> 
> NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
> 
> \### Description of change
> 
> Because of Zigbee2mqtt 2.0, we fix the version of Z2M to 1.42.0 to avoid issues the 3rd of January 2025

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 6, 2024, 1:27 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/5 "2024-12-06T13:27:10Z")

</div>

Testé chez moi avec succès :

```auto
2024-12-06T14:23:28+0100 <info> init.js:63 (Zigbee2mqttManager.init) Zigbee2mqtt USB dongle attached to /dev/ttyUSB0
2024-12-06T14:23:28+0100 <info> checkForContainerUpdates.js:14 (Zigbee2mqttManager.checkForContainerUpdates) Checking for current installed versions and required updates...
2024-12-06T14:23:28+0100 <info> checkForContainerUpdates.js:40 (Zigbee2mqttManager.checkForContainerUpdates) Z2M container: update #4 of the container required...
2024-12-06T14:23:28+0100 <info> checkForContainerUpdates.js:57 (Zigbee2mqttManager.checkForContainerUpdates) Z2M container: update #4 of the container done
2024-12-06T14:23:28+0100 <info> installMqttContainer.js:114 (Zigbee2mqttManager.installMqttContainer) MQTT broker container successfully started
2024-12-06T14:23:28+0100 <info> installZ2mContainer.js:50 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt is being installed as Docker container...
2024-12-06T14:23:28+0100 <info> installZ2mContainer.js:51 (Zigbee2mqttManager.installZ2mContainer) Pulling koenkk/zigbee2mqtt:1.42.0 image...
2024-12-06T14:23:29+0100 <info> installZ2mContainer.js:54 (Zigbee2mqttManager.installZ2mContainer) Configuration of Device /dev/ttyUSB0
2024-12-06T14:23:29+0100 <info> installZ2mContainer.js:59 (Zigbee2mqttManager.installZ2mContainer) Creation of container...
2024-12-06T14:23:29+0100 <info> installZ2mContainer.js:62 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt successfully installed and configured as Docker container
2024-12-06T14:23:29+0100 <info> configureContainer.js:23 (Zigbee2mqttManager.configureContainer) Z2M Docker container is being configured...
2024-12-06T14:23:29+0100 <info> configureContainer.js:36 (Zigbee2mqttManager.configureContainer) Z2M configuration file already exists.
2024-12-06T14:23:29+0100 <info> installZ2mContainer.js:84 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container is (re)starting...
2024-12-06T14:23:34+0100 <info> installZ2mContainer.js:90 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container successfully started
2024-12-06T14:23:34+0100 <info> connect.js:25 (Zigbee2mqttManager.connect) Connecting Gladys to mqtt://localhost:1884 MQTT broker...
2024-12-06T14:23:34+0100 <info> connect.js:35 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2024-12-06T14:23:34+0100 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#

```

Et le résultat est là :

 ![Screenshot 2024-12-06 at 14.26.35](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/a/d/ad4e54e1058c0449a3c6a3060812f0ffe71216f1.jpeg)

Je merge et je fais une release de Gladys

---

<div class="post-metadata">

**Author:** ![Prof\_Techno](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/prof_techno/32/19038_2.png) [@Prof\_Techno](https://community.gladysassistant.com/u/Prof_Techno)\
**Post date:** [Décembre 8, 2024, 3:46 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/6 "2024-12-08T15:46:43Z")

</div>

sans hesitation la 2

stabilite est mere de surete surtout que cela pendant les vacances scolaires du coup si certain ne son pas chez eux cela peux affecter chauffage alarme etc

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [Décembre 8, 2024, 7:08 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/7 "2024-12-08T19:08:04Z")

</div>

Ayant mon docker z2m géré à l’extérieur de gladys, je viens de bloquer en 1.42.0 au lieu de latest comme préconisé et c’est une très bonne préco 🙂

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Décembre 9, 2024, 7:08 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/8 "2024-12-09T07:08:18Z")

</div>

C’est bien le cas depuis Gladys Assistant 4.50.2 du coup 🙂

Pas de passage en 2.0 forcé en janvier, on fera ça en douceur plus tard

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [Février 17, 2025, 4:51 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/9 "2025-02-17T16:51:32Z")

</div>

Bien content d’avoir attendu !

Sur Reddit : [All devices offline - upgrade to Z2M v. 2.1.1 solved the problem - what’s going on?](https://www.reddit.com/r/Zigbee2MQTT/comments/1io0u3b/all_devices_offline_upgrade_to_z2m_v_211_solved/)

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [Février 17, 2025, 7:02 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/10 "2025-02-17T19:02:34Z")

</div>

C’est comme quand tu gères un système critique d’entreprise (réseau, outil de sécurité, etc.), il vaut mieux laisser les autres gérer les pots cassés et directement passer sur la version majeure patché 😅😅  
Merci @pierre-gilles d’avoir fait ça avec Gladys ! Ça nous évite bien des ennuis !

---

<div class="post-metadata">

**Author:** ![prohand](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/prohand/32/15713_2.png) [@prohand](https://community.gladysassistant.com/u/prohand)\
**Post date:** [Mai 22, 2025, 2:53 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/11 "2025-05-22T14:53:39Z")

</div>

Je sais pas si le sujet à avancé de votre côté mais je penses que du mien je vais revoir toute mon installation afin de passer par un zigbee2mqtt externe et acheter / utiliser le SLZB-MR1 que @mutmut parlait ici : [Quel hub pour Matter? - #5 par mutmut](https://community.gladysassistant.com/t/quel-hub-pour-matter/9512/5)

Cela me permettra de monter un second Z2M en version 2 de test avec un Gladys de test à côté sans impacter les appairages et aussi d’être compatible matter 😉

Si vous avez des remarques n’hésitez pas ^^

---

<div class="post-metadata">

**Author:** ![mutmut](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/mutmut/32/14064_2.png) [@mutmut](https://community.gladysassistant.com/u/mutmut)\
**Post date:** [Mai 22, 2025, 3:08 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/12 "2025-05-22T15:08:44Z")

</div>

salut @prohand  
je parlais à l’instant de z2m externe avec montée de version et de ma gestion des docker via Portainer [ici](https://community.gladysassistant.com/t/capteur-thermostat-aqara-w100-capteur-de-temperature-et-humidite-zigbee-matter-thread/9500/34) et mes tests en cours [là](https://community.gladysassistant.com/t/z2m-premiers-tests-en-zigbee2mqtt-1-42-0-2-1-3-2-2-1/9421/1).

---

<div class="post-metadata">

**Author:** ![prohand](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/prohand/32/15713_2.png) [@prohand](https://community.gladysassistant.com/u/prohand)\
**Post date:** [Mai 22, 2025, 3:13 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-2-0-approche-a-prendre/9222/13 "2025-05-22T15:13:52Z")

</div>

Ah cool merci 🙂
