I’m sure this is an age-old problem, but I’ve just added 50 Hue outdoor lights to my system via Zigbee2mqtt. I’m facing all sorts of delays in these and other Zigbee devices receiving commands, leaving lights on or off for a few seconds sometimes longer after a motion sensor has been activated or a manual request from me to turn a light on or off or change colour, etc.
Physically, all devices are within x metres of each other and on the latest firmware.
I’m running Unifi wifi and it has been set to adjust its channels each night in case of any interference.
Even before adding all these Zigbee devices, I had some delays, I think it is worse now though.
I have 73 zigbee devices integrated with z2m. As delays goes this in my experience could be mqtt issue. Sometimes I have ie. light switch or smart bulb became unresponsive or unavailable in dashboard. When I check it in mqtt integration it’s unresponsive / unavailable there also. But if I open device in z2m I can turn it on/off. When I do that in z2m device became available in mqtt. I don’t know why this is happening. Never get to the bottom of it.
I noticed that devices were a little bit more responsive through the HA dashboard than through Apple’s Home app, so I’ve disabled the HASS bridge to see if that is contributing to the problem.
You should consider putting the lights into a Zigbee group (instead of a HA group). Zigbee groups appear as additional entity in HA and turning on/off that group will turn on/off the group‘s lights almost immediately.
That‘s because the group is handled by the Zigbee network and neither HA nor MQTT are involved, once the request to the group has been made.
I tried you solution on terrace lights that are on the other side of the house. Those switches are the most distant switches from coordinator and this is working with no problem. I used before light group created as a helper and there was some delays as @benflux described in his post.
@Nick4 yes, it has been much better, at least they all go off at once with this group too, rather than seeing them go 1 by 1. The biggest improvement seems to be removing the HASS integration, I’ll try that on again soon before I conclude.
I noticed one thing. The problem with zigbbe devices is in avability. Default ping for devices that uses electrical power is 10 minutes. So every 10 minutes coordinator will ping those devices. I set ping to 2. minutes. It helped.
I noticed that when you have 10 minute ping and device doesn’t respond to ping it became unavailable in mqtt integration. But it is still available in z2m and you can turn it on off. When I do that devices became availabe in mqtt.
I don’t know why there is sometimes problem with pinging zigbee devices but this is, as I saw, in direct connection with mqtt.
You can change settiings in z2m webui under settings → availability. Doc is here.
Imho availability settings should be tweak.
In my case always the same switches have the problem. I’m currently experimenting with settings.
Maybe 2 minutes will be to stressfull on coordinator. So, tweaking configuration.yaml on the device that have problem might be better solution like this
Wow, I spent days here trying to find some sources of interference because the more Hue lamps I added via Zigbee2mqtt, the more unstable it became and it felt like Home Assistant forgot to turn off more and more lamps until you came along with your glorious forum post… Damn THANKS! All problems solved!
I’m having similar issues with my Zigbee network consisting of about 40 hue lights and some sensors.
I have tried the zigbee groups in Zigbee2MQTT and this does not help alot to be honest. Also they they become super unresponsive in the Apple Home App. Do you also see this behaviour or did you stop using the Apple Home app?
PS: my network bands are configured Zigbee 11 and 2.4 wifi also at 11 (the biggest gap possible)