zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Sensors stop communicating with Z2M after some time

Open beped opened this issue 2 years ago • 16 comments

What happened?

My sensors stop communicating with the Z2M after some time. Sometimes that time is a few minutes, sometimes a few hours, sometimes it's 2 days. It's never accurate, but after a while they all need to be paired again, sometimes having to delete them from the device list and re-enter.

What did you expect to happen?

What sensors i have: 8 x ZBSA-MS (inside Z2M it shows as SNZB-03) https://www.aliexpress.com/item/1005002468620848.html?spm=a2g0o.order_list.order_list_main.52.2f991802aZKwBg 2x SONOFF SNZB-01 2x SONOFF SNZB-02 6x SONOFF SNZB-03

Some of those sensors are 20cm from the coordinator, even so they eventually stop responding.

What has been tested so far:

  • Changed the position of the zigbee dongle to see if some kind of interferense
  • Changed the dongle firmware to a newer and even to a older version to see if theres any difference.
  • Changed all sensors batteries
  • Paired using the specific permit join (nearest router)

My map: image

Devices: Btw, Motion 2 is 30 cm from the coordinator image

All sensors and routers are in a area of 15m x 10m well distributed with routers in every room. I dont have any issues with the routers, only the sensors.

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.30.4-1

Adapter firmware version

20221226

Adapter

Sonoff Zigbee dongle P (with a extension cable)

Debug log

No response

beped avatar May 27 '23 00:05 beped

I have the same problem, except for me the problem also involves the routers. The entire network stops. A restart of z2m fixes the problem, but often it stops again after a while. I upgraded to 1.31.2, but it didn't change the behaviour. I have adapter firmware 20220726, and was thinking about updating, but it doesn't seem to make a difference?

RonnyRusten avatar Jun 08 '23 17:06 RonnyRusten

in my case it made no difference to upgrade the routers. I currently downgraded and it is running on version 20221226. But the problem continues, eventually the sensors stop communicating with the HA and only work again after pairing again.

beped avatar Jun 10 '23 18:06 beped

Same issue here with SNZB-03. I have tried two different sensors and as OP sais here, they stop communicating after some time. Also, the time for the stop of communication can not be defined clearly. To make it work again, i have to unpair a SNZB-03 device and pair it again. After that it works for some period unless it stops again

Sonoff Dongle zStack3x0, coordinator version: 20221226, 1.31.2

Raemsna avatar Jun 22 '23 06:06 Raemsna

are there any logs we can provide to get a hint on this error?

edit: I read here that although the sensor showing a full battery state, the problems are solved using a new / fully charged battery. I have just replaced the battery at one of my "faulty" sensors and will report back if maybe this will solve the issue.

edit 2: At one of my "faulty" sensor I replaced the battery 5 days ago, although the battery state of the "factory" battery was showing nearly 100%. Since then the sensor was working flawless. It truly seems that a new battery solves the error and the sensor does not stop communicating

edit 3: ok, it worked for some time, but also the sensor with the new battery stopped responding. So this is not a solution

Raemsna avatar Jun 26 '23 12:06 Raemsna

have you all checked that you do not have WiFi interference? I used to have a very unstable network until I made sure that my WiFi routers all ran on channels far away from zigbee channel.

marc-gist avatar Jul 12 '23 13:07 marc-gist

@beped I even can't use my SNZB-03 motion sensor because of the crash on connect. What version of zigbee2mqtt are you using?

denis-obukhov avatar Jul 28 '23 08:07 denis-obukhov

I would like to bump this issue, because this is exactly my problem.

I have SNZB-01 SNZB-02 which stop communicating after some time. SNZB-03 however are used frequently (they are used on our main staircase) and work without problems.

The Button and Temperature-Sensors however stop working after some time.

I am willing to provide you with all the details you need.

Aqara sensors work flawlesly - sadly I bought a bunch of sonoff beforehand, but they are really not as reliable as the Aqara ones. :(

linuxstony avatar Aug 14 '23 09:08 linuxstony

I would like to add that my problem is only with Sonoff sensors - I use a LOT of devices and only the products from sonoff leave the "party" after some time.

I have absolutely no problems with all my Aqara sensors.

I am sorry to say that in this state you should remove the sonoff sensors from "supported devices"

Zigbee2MQTT Version 1.32.2 commit: 1ec1e57 Coordinator-Typ ConBee2/RaspBee2 Coordinator-Version 0x26720700

ksnip_20230817-081424

linuxstony avatar Aug 17 '23 06:08 linuxstony

I have two SNZB-02 . They both got "stuck" at different times in their lifetime (a couple of weeks, a month). They re-pair just fine (use "force remove" in the zigbee2mqtt UI, pair again), but then go dormant and stop reporting data. I tried re-pairing a bunch of times, same behaviour.

Today I managed to unstuck a sensor (haven't tried with the second one yet):

  • On the sensor, long press the reset button for 5s until the LED indicator flashes three times, which means the device has entered pairing mode. No need to remove it from zigbee2mqtt first.
  • When the sensor checks in, in zigbee2mqtt hit the "reconfigure" button (yellow button with two arrows)
  • In the "reporting" tab for the device, hit "apply" for every single item (just use the default values)

This suggests the sensors lose the notion of how often they should be sending data, so they just stop trying. Reconfiguring the reporting intervals seems to get them back to doing their job, at least temporarily... Should zigbee2mqtt be expected to refresh the config every now and then?

EDIT: just wanted to mention that the sensors are still reporting (so no issues between Sep 4th and today Oct 19th)

giuliano108 avatar Sep 04 '23 20:09 giuliano108

For me the solution was to repair a couple of the routers that had stopped reporting (Availability: Offline). I didn't think this would affect the entire network, but it obviously did. This was devices I really don't use much, and located in a location we seldom use, so I just thought I'd do it "some other time". My advice is: "Fix your routers asap, or remove them from the network".

RonnyRusten avatar Sep 05 '23 07:09 RonnyRusten

I have the same problem with the SNZB-03, tried it with the Sonoff dongle P and Sonoff dongle E version. The motion sensor works perfect for a couple of days. However, after a couple of days the sensor does not change the occupancy, and restart solves the problem for a couple of days. The link quality is 252lqi (just 3 meters from the coördinator).

The Sonoff SNZB-04 devices (open and close sensor) in my network appear not to have this problem, but I still need to monitor this more closely.

The other zigbee motion sensor devices from Phillips (Hue) and Xiaomi (Aqara) work fine (have 57 zigbee devices).

Palthe avatar Sep 17 '23 07:09 Palthe

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Oct 18 '23 00:10 github-actions[bot]

I've recently started experiencing this exact problem. [SNZB-04] Device has been working fine for 2+years and recently while it shows as online, when I trigger it I can see the led on the sensor flash, but the binary sensor state doesn't change and nothing is sent on MQTT topic.

rodders99 avatar Oct 30 '23 10:10 rodders99

Same problem here, I have 5 SNZB-03 sensors and the same thing happens to all of them, they unpair every few days and you have to delete them and pair them again for them to work, with the addition that it is necessary to perform the operation several times because They frequently report configuration errors when pairing.

chemuki205 avatar Dec 11 '23 18:12 chemuki205

I also have one SNZB-03 that "stops" communicating around ~8-20h after pairing. (distance to coordinator SLZB-06 is around 6m through two brick walls)

I sniffed the radio and actually it is still transmitting correct occupancy data but the coordinator sends a "leave and rejoin" request right after receiving. The transmitted occupancy data is somewhere lost/rejected on the way to GUI/MQTT.

The coordinator also ACKs the received data. But the "leave and rejoin" request seems to be completely ignored by SNZB-03 - even not an ACK.

Does anybody know what triggers the "leave and rejoin" request? Might this due to missing sequence numbers or any other timeouts (battery reporting)?

(Battery level does not seem to be related, additional capacitor on PIR seems to do nothing, no interference sources measured)

zigbee firmware: 20230507 SLZB-06 firmware: 2.0.13-dev 251223 (connected by ethernet) Zigbee2MQTT version: 1.35.0, commit: b5a90e9

krisha avatar Jan 17 '24 21:01 krisha

I keep having this issue with all Aqara sensors. I purchased a bunch on sale and built in HA zigbee had known issues and many ppl recommend Zigbee2mqtt to replace and it is amazing. But I keep getting my Aqara sensors dropping after a few weeks/months. I can push the button on the. And they check in and update. But then no more. I have to delete the device and then rejoin it.

mharris1984 avatar May 16 '24 15:05 mharris1984

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days

github-actions[bot] avatar Nov 13 '24 00:11 github-actions[bot]

I have the same with Xiaomi MCCGQ01LM door / window sensors. When pairing it works, and they continue to work for a while. But when inactive for a bit they all drop off and don’t report new state back to z2m.

I’ve had these running on Phoscon/Deconz for years without problems. I guess I might have to migrate back T_T, as the sensors are essential in my case to trigger automations etc.

Had anyone ever had a fix for this?

Tosko4 avatar Dec 21 '24 06:12 Tosko4

I have a same problem. System uptime 14 day. An Aqara motion sensor [RTCGQ11LM] today random stopped working/ not responding. I had to reset it and it has worked again since then. I have 25 end devices and randomly just dropped this one. I have another RTCGQ11LM device, but nothing wrong with it.

SLZB-06 -> 20240710 | v2.6.8.dev23 Proxmoy/HA - everything up to date

litecross91 avatar Jan 02 '25 17:01 litecross91

@litecross91 RTCGQ11LM are sensors that are known to not function depending on what they are connected to. I don't have the links to the docs handy, but you need to ensure your RTCGQ11LM is connected either directly to your controller or is connected to a router that will ping it every so often. I know the IKEA wall repeaters work for this. Your issue is likely not related to the issue in this thread.

sstarcher avatar Jan 02 '25 19:01 sstarcher

@litecross91 RTCGQ11LM are sensors that are known to not function depending on what they are connected to. I don't have the links to the docs handy, but you need to ensure your RTCGQ11LM is connected either directly to your controller or is connected to a router that will ping it every so often. I know the IKEA wall repeaters work for this. Your issue is likely not related to the issue in this thread.

What I don't understand is why it has been working for two weeks without any errors. Then it stopped responding for no reason at all. I did nothing to the network or system.

litecross91 avatar Jan 02 '25 19:01 litecross91

If you walk by the sensor a few times a day it will keep working. If you don't walk by it for 24ish hours it likely breaks. Walking by it triggers it to send data. The issue with RTCGQ11LM is common and sometimes breaks when not being used depending on what it's connected to. I pulled up the docs for you https://www.zigbee2mqtt.io/devices/RTCGQ11LM.html#troubleshooting-device-stops-sending-messages-disconnects-from-network

sstarcher avatar Jan 02 '25 19:01 sstarcher

I recently switched from Deconz (using their RaspBee module), which had been working flawlessly for years with zero latency and no dropped connections. However, I found that Zigbee2MQTT (Z2M) offers better support for the diverse range of devices I now use. Additionally, Z2M allows for more customization and advanced modifications that Deconz doesn’t support.

The switch was prompted by an accidental reset of my Deconz setup, which caused me to lose all paired devices. Unfortunately, I didn’t have a backup (stupid, I know…), so rather than re-pair everything in Deconz, I decided to take the opportunity to migrate to Z2M—a change I’d been considering for some time.

Now, I’d like to ensure that these door/window sensors are connected directly to the coordinator. While some of these sensors are within range, others are upstairs, and I’m concerned that forcing them to communicate directly with the coordinator might result in poor connectivity (if it’s even possible). How can I optimize this setup while maintaining reliable connections?

Should I purchase these IKEA signal repeaters? Do they require some kind of setup/pairing?

Tosko4 avatar Jan 02 '25 19:01 Tosko4

@Tosko4 are you also having issues with RTCGQ11LM all of my comments are only directed at RTCGQ11LM devices.

sstarcher avatar Jan 02 '25 19:01 sstarcher

If you walk by the sensor a few times a day it will keep working. If you don't walk by it for 24ish hours it likely breaks. Walking by it triggers it to send data. The issue with RTCGQ11LM is common and sometimes breaks when not being used depending on what it's connected to. I pulled up the docs for you https://www.zigbee2mqtt.io/devices/RTCGQ11LM.html#troubleshooting-device-stops-sending-messages-disconnects-from-network

@sstarcher Thank you very much! I read it, but I don't think that's the case. We were away from home 5 days out of 14 during the holidays but it worked when we got home. Today it worked fine from the morning and then suddenly stopped working in the afternoon.

litecross91 avatar Jan 02 '25 19:01 litecross91

@sstarcher Oops, looks like I pulled a classic thread hijack move! My bad. I’m actually rocking the Xiaomi MCCGQ01LM, so I guess I just crashed the wrong party. But hey, maybe the solution for your RTCGQ11LM could work for me too? Fingers crossed for some crossover magic!

Tosko4 avatar Jan 02 '25 20:01 Tosko4

Have similar but not the same issue and only with Sonoff SNZB-02.

At some point in time no more reading appears ion Z2M and sensor become Offline. It happens with any previously reported battery level, f.e. 68%. I can re-pair device, it came to Online (till again claimed as Offline), but still no more measurements... If change battery and re-pair - same stuff: re-pair happens but nothing more.

Already have 4 sensors, which can re-pair, but no readings sent/received/appears. As well pushin button does not awake device (loks like), as no reading when and not possible to drop device from network.

Masterz69 avatar Jan 26 '25 06:01 Masterz69