Turning lights on/off in a group or scene doesn't work reliably

Hi,

I’m having problems with lights seemingly randomly not working when triggering a scene or turning on or off all lights in a group. Individually the lights work fine, but when done as a group or in a scene one or more will often fail to change state.

I’ve been digging around and found that one or more of the lights will fail with a DeliveryError, “Message send failure”. The log below is from turning on a group of 4 lights, and the last light has failed to turn on.

2022-08-16 15:53:28.923 DEBUG (MainThread) [homeassistant.components.zha.entity] light.innr_rs_229_t_e98069fe_level_light_color_on_off: setting transitioning flag to True
2022-08-16 15:53:28.927 DEBUG (MainThread) [homeassistant.components.zha.entity] light.innr_rs_229_t_f5e4e0fe_level_light_color_on_off: setting transitioning flag to True
2022-08-16 15:53:28.930 DEBUG (MainThread) [homeassistant.components.zha.entity] light.bollard_light_3_level_light_color_on_off: setting transitioning flag to True
2022-08-16 15:53:28.932 DEBUG (MainThread) [homeassistant.components.zha.entity] light.bollard_light_4_level_light_color_on_off: setting transitioning flag to True
2022-08-16 15:53:29.029 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x4DC9:1:0x0006]: command failed: 'on' args: '()' kwargs '{}' exception: '[0x4dc9:1:0x0006]: Message send failure'
2022-08-16 15:53:29.029 DEBUG (MainThread) [homeassistant.components.zha.entity] light.bollard_light_4_level_light_color_on_off: starting transitioning timer for 1.25
2022-08-16 15:53:29.030 DEBUG (MainThread) [homeassistant.components.zha.entity] light.bollard_light_4_level_light_color_on_off: turned on: {'on_off': DeliveryError('[0x4dc9:1:0x0006]: Message send failure')}

This doesn’t happen every time, sometimes they all come on, but more often than not at least one fails.

I’m not sure what the error code 0x4dc9:1:0x0006 means or how to look that up. Can anyone explain what that error means in more detail?

What are the best next steps to debug this issue?

Thanks in advance for your help!
Tony

ps. My set up is a Raspberry Pi 3B+ running Home Assistant 2022.8.5 with a Conbee II and the latest firmware (0x26780700).

Tony,
My guess would be that the network is getting busy with each of the lights in the group being told to do something at the same time and then dropping messages. I could never get groups of 6 IKEA bulbs to turn on/off highly reliably so I gave up on that. (They are all in one fixture, so I just put a plug switch on it instead.) You can setup Zigbee groups directly so that there is much less communication, and that should solve this, but I haven’t experimented with that myself. The other option is to manually put in a delay: so switch 3 devices, wait one second, then switch the other three.

-David

1 Like

Hi David,

That makes sense, but I’m sure you agree from what you’ve experienced it’s not ideal… Do you know where abouts in the code this error is coming from? Perhaps it would be possible to add some retry logic so that if any fail on the first attempt it can automatically retry after a short delay.

I’m happy to take a look at implementing that, but I would have thought that the concept of retrying to send commands exists somewhere in HA already so any pointers would be appreciated.

Thanks,
Tony

1 Like

There was a long thread on this earlier. Read the thread. There is indications conbee2 is not optimal with many lights in a scene.

I have switched the conbee2 to a Sonoff 3.0 Dongle and I have changed from ZHA to Z2M (Zigbee2MQTT). I do not see the errors any more, however a lot of other changes have also happened with new devices etc affecting the zigbee network.

The simple metohd to turn off the lights, would be to create a “Zigbee Lightgroup”. These can be created both in ZHA and Z2M. As the zigbee network will only send one command to a group, it will solve the specific problem.

1 Like

This may or may not help, but I was having a problem with scenes where randomly blinds would not change their state. It worked fine if every blind was listed in the automation, and if I put all the blinds in a script and ran it they would work as well. So I finally gave up on the scenes and created scripts for each “scene” and then called the script from the automation. I haven’t had any problem since. I’m beginning to wonder if the script is calling each device sequentially (which would limit the traffic on the zigbee/zwave network) where maybe the scene is calling the devices all at once.

2 Likes

I’ve managed to get this working reliably in my local environment and I’ve submitted a PR with the change. Leaving it here for anyone else having this problem in case you want to try it.

1 Like

@tonyroberts That’s really cool, and sounds like the right solution.

A few questions:

  1. Did updating the Conbee firmware help at all? (I haven’t since I’m on a VM and it’s “not supported”.)
  2. Do you know if we can put the concurrent-request limit into our HA config file to get it to zigpy currently?
  3. Do you have the possibility to try another radio? (I’ve got two ConBees for two networks but haven’t tried anything else.)

Thanks!
-David

@tonyroberts I see from the PR that changing the limit in the zigpy config didn’t help. Good luck with getting the retry logic in there!
-David

Exact same problem here with my blinds. I’m going to switch to a script as scenes seem flaky (and not easy to set up).