SONOFF SNZB-02B (and SNZB-02LD) join successfully, then leave the network after ~21 s (Ember / SONOFF Dongle-M)
What happened?
Title: SONOFF SNZB-02B (and SNZB-02LD) join successfully, then leave the network after ~21 s (Ember / SONOFF Dongle-M)
What happened?
The SONOFF SNZB-02B temperature/humidity sensor pairs without any problem (interview OK, device identified as SNZB-02B, configure OK, readings arrive with LQI ~160β196), but about 21β22 seconds after joining, Z2M logs "Device left the network" and the device is removed. As long as permit join is active, the sensor re-joins on its own and leaves again, so the device appears and disappears in Home Assistant.
The SNZB-02LD shows the same symptom (found, then lost) [I can provide a debug log for it as well]. Two SNZB-02D sensors in the same network work without problems (firmware 2.3.0).
What I observed in the debug log (attached):
- Join 12:58:42,
ezspTrustCenterJoinHandler ... status=DEVICE_LEFT policyDecision=NO_ACTION parentOfNewNodeId=32238at 12:59:03 (21 s later). - Trust center link key exchange succeeds:
TC_RESPONDED_TO_KEY_REQUESTandTC_REQUESTER_VERIFY_KEY_SUCCESS(12:58:44). - Interview, all binds and configure reporting succeed. The device is silent for about 14 s after configure, then leaves. I see no leave request sent by the device itself in the log before
DEVICE_LEFT. - I also see
TC_REQUESTER_VERIFY_KEY_TIMEOUTwith partner0xffffffffffffffffwhen I disabled permit join (12:58:58), probably unrelated.
The timing is reproducible and independent of the parent:
- Parent = coordinator: left after 22 s, 22 s and 21 s in separate attempts (plus an early leave after ~3 s in some attempts, followed by an automatic re-join).
- Parent = a router (Blitzwolf Zigbee plug) with the sensor held directly next to it: left after 22 s.
- Parent = router 0x7DEE (this attached log): left after 21 s.
- Permit join closed 1 s after joining (no re-join loop): still left after 21 s.
- Sensor factory-reset before each attempt (button 5 s), distance < 1 m, battery 100 %.
What did you expect to happen?
The sensor stays in the network after pairing, like the SNZB-02D does.
How to reproduce it
- Factory-reset the SNZB-02B (hold button 5 s).
- Enable permit join (all, via coordinator, or via a router).
- Hold the sensor close to the coordinator/router.
- Z2M finishes interview and configure, then reports "left the network" after about 21 s.
Zigbee2MQTT version
[Z2M 2.14.2], zigbee-herdsman 10.10.0, zigbee-herdsman-converters 26.115.1
Adapter firmware version
EmberZNet 7.4.5 (SONOFF Dongle-M firmware V1.0.0, SDK 7.4.5; ESP32 bridge firmware V1.0.10, connected via LAN/PoE)
Adapter
SONOFF Dongle-M (EFR32MG24 + ESP32), adapter: ember, port: tcp://dongle-m.local:6638, baudrate: 115200, rtscts: false
Setup
Home Assistant [OS/Container], Zigbee2MQTT [add-on/Docker], about 60 devices (mostly mains-powered routers plus battery sensors). No other Zigbee coordinator running nearby [please confirm].
Debug log
(attached as file: join at 12:58:42 until after the leave at 12:59:03)
Additional
I also opened a ticket with SONOFF support and will report their answer here. I can test a second coordinator after the autumn holidays.
What did you expect to happen?
I exapted, that the integration of the device will stay in homeassistant, but it always leaves.
How to reproduce it (minimal and precise)
start joining in Z2M, reset device for pairing
Zigbee2MQTT version
2.14.2
Adapter firmware version
26.115.1
Adapter
Sonoff Dongle max - EmberZNet - Revision: 7.4.5 [GA]
Setup
Homeassistant OS at proxmox (mini-pc)
Device database.db entry
'{"data":{"friendly_name":"0xa4c138184493ffff","ieee_address":"0xa4c138184493ffff","status":"started"},"type":"device_interview"}'
Debug log
Notes
No response
Sounds very similar to Telink/Tuya router devices join, interview successfully, then leave in a loop this is the same behaviour I'm observing.
Also device keeps rejoining during pairing - will not join for good. two sonoff devices so far affected. #33293 ]
Feels like a widespread issue for many devices.
Glad I'm not the only one having this issue. I have 2 Sonoff iPlugs and a TubeSZ router that keeps falling off the network. Was fine until this last update (2.14.2) Looking into rolling back.
Here are the instruction from Sonoff Support, which helps to integrate all devices, I can't intergrate before. Sonoff SNZB-02B, SNZB-02DR2, SNZB-02LD and Tuya ZY-ZTH02 are running now.
Copy from mailing: Based on the Zigbee2MQTT logs you provided, the SNZB-02B successfully joins the Zigbee network, completes device configuration, and begins reporting temperature and humidity data; however, it then automatically leaves the network after approximately 20 seconds. This occurred four consecutive times in the logs from September 29th.
We have identified a similar case within the Zigbee2MQTT community:
https://github.com/Koenkk/zigbee2mqtt/issues/30455
In that instance, a user utilizing a SONOFF Dongle Max encountered the same issue: new devices would automatically leave the network about 20 seconds after a successful pairing. Investigation revealed a mismatch between the coordinator's Node EUI64 and the Trust Center EUI64; once this was corrected, the devices maintained a stable connection.
While we cannot yet confirm whether your issue stems from the same cause, we recommend checking your coordinator for an EUI64 mismatch.
First, have you ever replaced your Zigbee coordinator, or migrated/copied the IEEE address from an old coordinator to your current SONOFF Dongle Max? I changed from "Sonoff USB-Dongle E" to "Sonoff Dongle max" (LAN)
Second, we suggest using the ember-zli tool to perform a check.
Please be aware that this tool may automatically apply a fix if it detects an EUI64 mismatch. Therefore, please ensure you back up your Zigbee2MQTT configuration and coordinator network data before proceeding, to avoid any disruption to your existing Zigbee network.
Steps to follow:
- Stop the Zigbee2MQTT service.
- Install
ember-zlion a computer located on the same local network as the SONOFF Dongle Max. - Execute
ember-zli stackin your command-line interface. - Follow the on-screen prompts to establish a connection using the coordinator's IP address and TCP port.
- Navigate to
RepairsβCheck for EUI64 mismatch.
Interpreting the results:
- If the output reads
EUI64 match. No fix required., it indicates that no EUI64 address mismatch was found. - If the messageFixing EUI64 mismatch...appears, it indicates that an address mismatch has been detected, and the tool will attempt to fix it automatically.
Related instructions:
Installation guide: https://github.com/Nerivec/ember-zli/wiki#installation
EUI64 check guide: https://github.com/Nerivec/ember-zli/wiki/Stack#check-for-eui64-mismatch
Once completed, please share the check results or screenshots of the interface with us for further analysis.
Given that you currently have approximately 60 Zigbee devices operating normally, we do not recommend clearing the NVM3, performing a factory reset on the coordinator, or rebuilding your Zigbee network at this time.
@ThomasWirth57 Interesting. About 9 months ago I did change my controller (SLZB-06M (zstack) to SLZB-06Mg24 (ember) ) but I thought I cloned the IEEE address from the old controller at that point, regardless it's been working since then & only recently there were problems adding new devices hitting the join/drop off loop.
Even with the installation instructions, I'm a bit stuck - where do you run these?
I installed ember-zli on my windows 11 desktop (over Windows powershell: npm install -g ember-zli)
Important: your zigbee-gateway must be in the same network than the computer with the ember-zli
Thanks so much @ThomasWirth57. I've been fighting with this exact issues with some new Sonoff devices. Your solution was exactly the issue!
I did have issues running ember-zli on my machine, in that it would only pickup bluetooth com port devices, with no opportunity to enter in the tcp address. To get it working I:
- Selected one of the COM devices to configure.
- When ember-zli attempted to connect to that device, I did Ctrl-C to exit.
- I edited the conf_port.json (under the ember-zli data directory. On my Windows machine this was C:\Users<username>\ember-zli\conf_port.json
- Changed the path to be the "tcp://
: " string. - Saved and then launched ember-zli. When it restarted, it asked to use that value.
- Rest of the fix was as per your instructions above.
Iβd like to understand your migration process and why it causes this behavior.
I've resolved a similar issue on my ember set-up by resolving post-IEEE migration EUI64 / Trust Center Link Key (TCLK) mismatch using ember-zli
I've documented this at https://github.com/Koenkk/zigbee2mqtt/issues/33560#issuecomment-6561582450
Same here on Z-Stack (Sonoff Dongle-PP10, CC2674P10, fw 20250321, Z2M 2.14.3): new devices from several vendors join and are removed by leaveInd exactly 19-20 s after their last tcDeviceInd. Details in #33293. Looks like it is not adapter-specific (Ember + Z-Stack both affected).
Thanks for the Ember confirmation. On Z-Stack (Sonoff Dongle-PP10, fw 20250321, Z2M 2.14.3) I see the same symptom without any IEEE migration, so the EUI64 mismatch doesnβt explain it:
A brand-new network on the same dongle (new key/PAN, channel 20 and also 11, empty NV): GL-C-008P, two Girier TS011F plugs and a Sonoff ZBMINIL2 all join and stay. Restoring the original network (39 devices, 44 entries in the backup) from coordinator_backup.json after clearing NV: the problem returns, and new devices leave ~20 s after the last join, also with permit join on the coordinator only. This is not a coordinator IEEE migration: the network was created on this dongle from the start (no coordinator was ever replaced). So the EUI64/TCLK fix from ember-zli does not seem to apply here.
Is there a Z-Stack equivalent of that check, or a way to inspect the trust center link key table?