Zigbee motion sensors missing events (or not working at all) since latest HA update


For over a year now I have a few in ceiling presence sensors (more or less unbranded: TS0601 TZE204_xxxxxx devices).
Previously I didn’t have any problems with these, other than the initial installation and quirks that were needed to be able to setup the devices properly.
I’ve created a topic about this around a year ago, see here: Getting ZHA custom quirks to work with Tuya TS0601 in-ceiling motion sensor

The thing is that since i’ve updated from HA 2023.10.x to 2023.12.x the devices sort of stopped working.
Although not quite… What is see is that currently most events (from detected to clear state) are not registered at all.
Or if the state changes from clear to detected it will not revert back to clear again. Even after many many hours.
This is obviously quite annoying since they run most of the lighting in the house…
It is not all sensors that are disfunctioning at the same time, but the problem just seem to move every few minutes. Sometimes it works, sometimes it does not.
The interesting bit is that the Illuminance values seems to be updated while motion is not registered at all.
Although this value seems to be old as well sometimes (probably would be better to start monitoring RSSI for instance)

What i’ve tried:

  • Cycle power to the devices - This seems to help at first, but only for a few minutes. Or it just moves the problem to other sensors.
  • Restart home assistant - Same happens, it works for a bit, then the problem sort of “moves” again.
  • Re-plug the SONOFF ZigBee 3.0 stick i am using - Same as above
  • Hitting the Migrate radio button on the ZHA integration - Nothing seems to change
  • Changing channel from 15 to 20 or 26 - Nothing seems to happen. it still remains on channel 15.
    What I did see with one of those options tried above (not sure which attempt anymore) is that i could see in the logs that some devices were going from the available state to the unavailable sate every 2 seconds or so. Only way to get them out of that scenario is to cycle power to them.

What I did see in the logs a day or so ago is that it is logging this:

2023-12-18 09:24:11.528 WARNING (MainThread) [zigpy.application] Zigbee channel 15 utilization is 92.96%!

That is not exactly ideal i think, but that shouldn’t necessarily be a problem?

Not sure if this is related but WiFi and Zigbee use the same frequency: A few months ago I was having many issues with my wireless Shelly devices. I have around 40 of them on the same network. If you are interested in those problems see here
It wasn’t exactly resolved, it just started to work magically again and not having any issues anymore since…

Any help would be appreciated, Thanks!

But you can space them out a bit:

Have you checked your channel usage? If you click download diagnostics on the ZHA integration page, they should include a summary (right at the bottom). Mine looks like this:

      "11": 2.84844209578687,
      "12": 73.50699819621309,
      "13": 88.70042934643088,
      "14": 80.38447947821754,
      "15": 59.15797905332195,
      "16": 1.9464625152460222,
      "17": 13.711043742539033,
      "18": 12.244260188723507,
      "19": 4.15070068297423,
      "20": 65.26028270288712,
      "21": 1.5075412082833717,
      "22": 4.15070068297423,
      "23": 15.32285793082191,
      "24": 2.509919386096536,
      "25": 0.9017765778954641,
      "26": 17.086630587133605

My Zigbee channel is 20 - only 65% - local wi-fi (including my neighbours’) is mostly down on wi-fi channel 1, which overlaps with Zigbee 15.

Did you use the GUI when you were changing Zigbee channels? I went from 15 to 20 recently and it was relatively painless - nearly all my devices followed automatically, with just a couple of contact sensors to re-pair.

Will try to change the channel again. I think this is quite self explanatory…:

    "energy_scan": {
      "11": 9.713248103580147,
      "12": 15.32285793082191,
      "13": 17.086630587133605,
      "14": 6.011489450827149,
      "15": 91.05606689948522,
      "16": 93.76433891498253,
      "17": 92.95959997754716,
      "18": 98.21983128611214,
      "19": 93.76433891498253,
      "20": 46.26944564832987,
      "21": 8.631361812931262,
      "22": 15.32285793082191,
      "23": 8.631361812931262,
      "24": 6.011489450827149,
      "25": 5.317630506738386,
      "26": 55.9836862725909

I’ve now changed it to use channel 25, now this is the energy_scan result:

   "energy_scan": {
      "11": 10.914542804728702,
      "12": 10.914542804728702,
      "13": 10.914542804728702,
      "14": 13.711043742539033,
      "15": 39.90320178295578,
      "16": 95.69133648577223,
      "17": 85.82097888710312,
      "18": 98.62178092672917,
      "19": 93.76433891498253,
      "20": 43.057636198227904,
      "21": 31.01324838787301,
      "22": 15.32285793082191,
      "23": 10.914542804728702,
      "24": 5.317630506738386,
      "25": 75.96022321405563,
      "26": 55.9836862725909

I only have 12 devices in the zigbee network. So not too bad. I would think that the usage should not be 75% already?
Bad luck with inteference and better pick channel 11/12 or so?

@Stiltjack - Now it only works for a few hours, then i get this repair showing up:

Here you can also see the state of one of the sensors:

You see 2 unavailable blocks here as I’ve temporarily fixed it already one time.

What I did to get it fixed (for a few hours that is) is to restore this backup, as it seems the integration lost all its settings.
Then its again at channel 15 and i have to manually update that again.
Any ideas why HA thinks the integration is broken after a while?

Edit: Its even more interesting. If you change the channel after restoring the backup to a channel that was not last used (so in my case 21), then it will not work. I really have to update the channel to the one that was set when they worked, as sensors will not get the channel update.

When you get the “settings have changed” message, you click on “Keep the new settings”. Future backups will be of the new channel.

@Stiltjack I thought all was fine until now, but since yesterday I am encountering similar issues again.

This is the current energy scan:

   "energy_scan": {
      "11": 9.713248103580147,
      "12": 15.32285793082191,
      "13": 25.74050169409602,
      "14": 23.33483723001185,
      "15": 92.95959997754716,
      "16": 92.0598007161209,
      "17": 92.0598007161209,
      "18": 98.62178092672917,
      "19": 94.48255331375627,
      "20": 55.9836862725909,
      "21": 31.01324838787301,
      "22": 4.15070068297423,
      "23": 6.011489450827149,
      "24": 89.93931580241996,
      "25": 6.789392891308996,
      "26": 96.64469941013013

This morning i’ve updated from channel 23 to 24 in the hopes the percentage drops a bit. But its almost the same at 89% usage. Which is still quite high i think with only 12 zigbee devices. I know people that have around 50 and that works without any problems.

I’ve also updated to version of HA that was released yesterday as it had ZHA dependency updates.

At least what i can confirm is that there was no channel swap the last month or so on my wifi network.

Getting diagnostics was also not very helpful, half of the time i got this “site is not responding” on the download popup after clicking the button.
It requires restart of HA to get this to work again. Could there be something up with the Zigbee adapter or addon?
Or do i just need to pick exactly the right zigbee channel? Still odd that it worked without any issue before though.

Have you been able to resolve your issue? Unfortunately I seem to be experiencing similar issues of non-working Zigbee motion sensors since I upgraded to 2024.1.0.

My energy scan shows (after switching from channel 20 to 26):

"energy_scan": {
      "11": 39.90320178295578,
      "12": 17.086630587133605,
      "13": 80.38447947821754,
      "14": 25.74050169409602,
      "15": 95.12234809209261,
      "16": 33.860880820104335,
      "17": 46.26944564832987,
      "18": 25.74050169409602,
      "19": 59.15797905332195,
      "20": 68.14622793558128,
      "21": 75.96022321405563,
      "22": 36.830390267097734,
      "23": 49.512515447068886,
      "24": 36.830390267097734,
      "25": 33.860880820104335,
      "26": 93.76433891498253

However, I am bound to believe that this is not the problem as all other Zigbee devices are working OK. I am using TS0601 by _TZE200_3towulqd (3 of them) and Ikea TRADFRI motion sensors (4 of them) and all stopped working.

@sbockting No, i have not been able to resolve it fully.
It is relatively stable the last week or so though. But sometimes (i believe i had it yesterday) that one of the sensors didn’t respond. Or well… HA didn’t receive the event that is. I believe the sensors themselves are not the problem here :slight_smile:

Decided to replace the sensors by Philips Hue motion sensors. Working perfect for now. Added bonus is many more temperature sensors throughout the house.