# Zigbee2mqtt : Prise en charge des clés SMLIGHT via réseau

**URL:** <https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045>\
**Category:** Demandes livrées\
**Tags:** feature-integration, in-progress\
**Created:** [Février 23, 2026, 8:58 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045 "2026-02-23T08:58:35Z")\
**Posts on this page:** 9\
**Page:** 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:** [Février 23, 2026, 8:58 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/1 "2026-02-23T08:58:35Z")

</div>

Bonjour,

Suite à mon tutoriel ici :

[https://community.gladysassistant.com/t/connexion-cle-smlight-a-zigbee2mqtt-sur-gladys-full-ssl-tls-mqtt-et-z2m-externe](https://community.gladysassistant.com/t/connexion-cle-smlight-a-zigbee2mqtt-sur-gladys-full-ssl-tls-mqtt-et-z2m-externe)

J’ouvre cette demande de fonctionnalité concernant la prise en charge des clés SMLIGHT via le réseau sur le zigbee2mqtt de gladys 🙂

Merci

---

<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:** [Août 17, 2026, 8:31 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/2 "2026-08-17T08:31:49Z")

</div>

Salut @prohand,

Claude a fait ce développement dans cette PR :

> <https://github.com/GladysAssistant/Gladys/pull/2901>
>
> Implements feature request: https://community.gladysassistant.com/t/zigbee2mqtt-…prise-en-charge-des-cles-smlight-via-reseau/10045
> 
> This PR was opened by an automated Claude Code run. It needs human review and real-hardware testing: no network Zigbee coordinator (SMLIGHT SLZB-06/SLZB-07 or similar) was available in the environment, so the Docker/Zigbee2mqtt side was only validated through unit tests, not against a real gateway.
> 
> \### Description
> 
> Until now the Zigbee2mqtt integration only supported a Zigbee coordinator plugged in over USB: the setup page listed USB serial ports and the generated Z2M container always got the USB device passed through with \`HostConfig.Devices\`. Network coordinators (SMLIGHT SLZB-06/SLZB-07, ZigStar, TubesZB…) are reached over TCP instead — \`serial.port: tcp://\<host\>:\<port\>\` plus an explicit \`serial.adapter\` in Zigbee2mqtt's \`configuration.yaml\` — which was impossible to configure from Gladys. The author of the request had to run MQTT and Zigbee2mqtt manually outside Gladys (\[his tutorial\](https://community.gladysassistant.com/t/connexion-cle-smlight-a-zigbee2mqtt-sur-gladys-full-ssl-tls-mqtt-et-z2m-externe/10041)).
> 
> The "Installation from Gladys" setup mode now asks how the Zigbee coordinator is connected:
> 
> \- \*\*USB dongle\*\* — unchanged, still the default (existing installations keep working exactly as before, the stored variable is simply absent);
> \- \*\*Network coordinator\*\* — the user enters \`tcp://\<host\>:\<port\>\` (the \`tcp://\` prefix is optional) and picks the Zigbee2mqtt adapter type (\`ember\`, \`zstack\`, \`deconz\`, \`ezsp\`, read from the existing \`/api/v1/service/zigbee2mqtt/adapter\` route).
> 
> Server side:
> 
> \- 3 new service variables following the existing \`Z2M\_\*\` pattern: \`Z2M\_ADAPTER\_MODE\` (\`usb\` / \`network\`), \`Z2M\_NETWORK\_ADAPTER\_URL\`, \`Z2M\_NETWORK\_ADAPTER\_TYPE\`. They are part of \`SETUP\_VARIABLES\`, saved/loaded like the others and destroyed by the reset route.
> \- New \`services/zigbee2mqtt/utils/validateSetup.js\`: validates the adapter mode and the adapter type against the known Z2M adapter keys, validates and normalizes the URL (host shape, \`tcp://\` scheme, port between 1 and 65535) and throws \`BadParameters\` (HTTP 400) otherwise, like the neighbouring routes.
> \- \`configureContainer\` writes \`serial.port\` / \`serial.adapter\` for a network coordinator, and restores the USB device path when switching back. A USB configuration that is already in place is left untouched.
> \- \`installZ2mContainer\` creates the container without any device passthrough in network mode, and removes/recreates the container when switching between USB and network so the device binding stays in sync.
> \- \`init\` treats a configured network coordinator like a connected dongle to start the MQTT + Z2M containers; a new \`networkAdapterConfigured\` flag is exposed in the service status.
> 
> Front side: USB/network radio choice, the two new fields, updated summary and setup requirements, i18n in \*\*en\*\*, \*\*fr\*\* and \*\*de\*\*.
> 
> Notes:
> \- The MQTT broker and Zigbee2mqtt containers are still managed by Gladys in this mode — only the coordinator is remote.
> \- The Zigbee2mqtt service has no README documenting the setup, so no documentation file was updated.
> 
> \## Forum
> 
> Forum: https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045
> 
> \### Checklist
> 
> \- \[x\] Tests pass: \`cd server && npm run coverage\` (Codecov requires 100% coverage on changed lines) and Cypress (\`npm run cypress:run\`) if the UI changed
> - The Zigbee2mqtt suites were run with coverage: 330 passing, 100% statements/branches on every file changed by this PR (the only uncovered lines in \`configureContainer.js\` are the pre-existing \`portfinder\` fallback). The full server suite was run too; the only failures are pre-existing environment ones in this sandbox (\`sqlite3\` binary missing for the backup/restore tests, outbound calls for the gateway/AI tests) and are unrelated to this change.
> - \*\*Cypress was NOT run\*\*: the Cypress binary is not installed in this environment. The existing Zigbee2mqtt setup specs and fixtures were updated for the new request payload and status field, but they have not been executed — please let CI run them.
> \- \[x\] Linter and prettier pass on both front and server (\`npm run eslint\`, \`npm run prettier\`) — plus \`npm run compare-translations\` and \`npm run build\` on the front.
> \- \[x\] No undocumented breaking change
> 
> 
> \---
> \_Generated by \[Claude Code\](https://claude.ai/code/session\_013yxguVaLdJ8ZKmw5x3HePT)\_
> 
> 
> \## Summary by CodeRabbit
> 
> \- \*\*New Features\*\*
> - Zigbee2MQTT setup now supports network-connected coordinators alongside USB dongles.
> - Configure connection mode, network address, and adapter type.
> - Setup summaries, requirements, and status now reflect the selected coordinator.
> \- \*\*Bug Fixes\*\*
> - Improved network address validation, normalization, and port checks.
> - Switching between USB and network coordinators now updates container configuration correctly.
> \- \*\*Localization\*\*
> - Updated English, German, and French translations for network coordinator setup.

Je suis preneur de tests 😃

Il y a un build amd64 sur cette image :

```auto
ghcr.io/gladysassistant/gladys-preview:claude-z2m-network-adapter

```

---

<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:** [Août 17, 2026, 8:58 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/3 "2026-08-17T08:58:56Z")

</div>

Merci 😉

Je test ce soir et te fais un retour 😉

---

<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:** [Août 17, 2026, 3:52 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/4 "2026-08-17T15:52:59Z")

</div>

Bonne nouvelle déjà cela ne casse rien à l’installation existante

Du coup sur mon installation de dev j’ai reset completement zigbee2mqtt et au demarrage de zigbee2mqtt j’ai ceci :

> [2026-08-17 15:47:34] error: zh:zstack:znp: Socket error Error: connect ECONNREFUSED 192.168.xx.xx:7638  
> [2026-08-17 15:47:34] error: z2m: Error while starting zigbee-herdsman  
> [2026-08-17 15:47:34] error: z2m: Failed to start zigbee-herdsman  
> [2026-08-17 15:47:34] error: z2m: Check [Zigbee2MQTT fails to start/crashes runtime | Zigbee2MQTT](https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html) for possible solutions  
> [2026-08-17 15:47:34] error: z2m: Exiting…  
> [2026-08-17 15:47:34] error: z2m: Error: Error while opening socket  
> at Socket. (/app/node\_modules/.pnpm/zigbee-herdsman@10.4.0/node\_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:160:24)  
> at Socket.emit (node:events:520:35)  
> at emitErrorNT (node:internal/streams/destroy:170:8)  
> at emitErrorCloseNT (node:internal/streams/destroy:129:3)  
> at processTicksAndRejections (node:internal/process/task\_queues:90:21)  
> [2026-08-17 15:47:34] info: zh:zstack:znp: Port closed
> 
> /app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_writable.js:264  
> var er = new ERR\_STREAM\_WRITE\_AFTER\_END();  
> ^  
> Error: write after end  
> at writeAfterEnd (/app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_writable.js:264:12)  
> at File.Writable.write (/app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_writable.js:300:21)  
> at DerivedLogger.ondata (/app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_readable.js:629:20)  
> at DerivedLogger.emit (node:events:520:35)  
> at addChunk (/app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_readable.js:279:12)  
> at readableAddChunk (/app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_readable.js:262:11)  
> at DerivedLogger.Readable.push (/app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_readable.js:228:10)  
> at DerivedLogger.Transform.push (/app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_transform.js:132:32)  
> at DerivedLogger.\_transform (/app/node\_modules/.pnpm/winston@3.19.0/node\_modules/winston/lib/winston/logger.js:337:12)  
> at DerivedLogger.Transform.\_read (/app/node\_modules/.pnpm/readable-stream@3.6.2/node\_modules/readable-stream/lib/\_stream\_transform.js:166:10)

L’erreur provient très certainement de ma prod qui est déjà connecté au socket du controleur réseau SLZB  
Vu qu’il y a un risque que ma prod soit cassé je ne pourrai pas aller plus loin dans les tests de mon côté

Edit : Je suis en train de voir mais il y a une seconde radio sur le SLZB-MR01 donc je suis en train de la configurer pour fonctionner avec Zigbee

---

<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:** [Août 17, 2026, 4:05 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/5 "2026-08-17T16:05:38Z")

</div>

@pierre-gilles

Je confirme que tout est ok 🙂

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/8/4/843813d09880f25b2090a24a422f016280f231ba.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/2/9/29e6a068c99054dfbbc172c724af9578de462c0f.png)  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/d/c/dc89199c74ddcc6c49410506ac8fb112e446d17c.png)

---

<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:** [Août 17, 2026, 5:06 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/6 "2026-08-17T17:06:05Z")

</div>

Incroyable, merci pour les tests !!

---

<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:** [Août 17, 2026, 7:06 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/7 "2026-08-17T19:06:30Z")

</div>

Et donc si je suis le truc, on va pouvoir sélectionner le SMLIGHT en IP dan Gladys avec un Z2M interne ?  
Actuellement la configuration de mon SMLIGHT est liée à mon Z2M externe.

Il serait top d’avoir un lien direct pour s’y connecter lorsque l’on a des màj à faire sur le firmware (comme le lien vers Z2M).  
Si je pousse encore plus loin, avoir une notif lorsqu’il y a un nouveau firmware (comme sur HA) 😜

---

<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:** [Août 17, 2026, 7:10 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/8 "2026-08-17T19:10:26Z")

</div>

> [@mutmut](#):
>
> Et donc si je suis le truc, on va pouvoir sélectionner le SMLIGHT en IP dan Gladys avec un Z2M interne ?

Oui c’est exactement ça 😉

---

<div class="post-metadata">

**Author:** ![cursor-bot](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/cursor-bot/32/22252_2.png) [@cursor-bot](https://community.gladysassistant.com/u/cursor-bot)\
**Post date:** [Août 28, 2026, 12:30 UTC](https://community.gladysassistant.com/t/zigbee2mqtt-prise-en-charge-des-cles-smlight-via-reseau/10045/9 "2026-08-28T12:30:37Z")

</div>


