Problem with ZHA network visualization

What are people using for a Zigbee coordinator, with Zigbee2MQTT?

Thanks. All these appear to be host-controlled devices, rather than a stand alone coordinator.

I believe that the Sonoff Zigbee unit is about the only ‘open’ device I’ve seen that is not USB or direct bus connected to a host CPU. And the experts do not think that the wifi tcp socket connection that is used between the Sonoff Zigbee bridge and the host CPU is reliable.

And, we’re back:

Sorry to post a problem here but this seems a very “ZigBee Educated” thread.

I posted this in another thread but didn’t really get an answer.

My setup
Home Assistant docker (latest version)
Conbee II (latest firmware)
ZHA (I recently switched from DeCONZ to see if this would help the problem but it didn’t)
Philips Hue bulbs (mainly)
Philips Hue motion sensors (x4)
Philips Hue smart button (only 1)
Aquara Temperature sensor
Aquara Switch sensor
Trafri GU10 bulbs (only 2)
Tradfri mains outlet socket
Innr mains outlet socket

All has worked fine for over a year and I have been slowly growing my zigbee devices. Then about 2 months ago (just before I started adding bulbs that were non-Philips Hue) the following issue started.

Power-on a light from a physical light switch that had been previously switched off at the physical light switch. The light would switch on as expected but then the following would happen.
After a small amount of time being switch on (say 30 seconds) the light that was switched on would flash (off then back on) in about half a second. Then anything between 5 and 10secs after that it would do it again. It would repeat this a random amount of times. Sometimes once, sometimes 2,3 4, 5 and so on. Sometime this might go on for 5 mins repeating flash, wait, flash etc…
Also a nearby light that was already on may also emit the off/on flash (normally only once but sometimes multiple times).

This was initially just 1 or 2 lights then more started to do this.

I’ve been racking my brain Googling and trying to figure it out and come to the conclusion this is some sort of mesh reconfigure/reset that is going on when the light is powered-on from previously being powered-off. First I noticed lights that had been powered-off (via a physical switch) overnight would do this (others in the family haven’t got out of the habit of switching the light off before bedtime).

Hence a light that had been off for a number of hours was re-announcing itself to the mesh. What’s strange is the “powering-off lights” from a physical switch has always been there but the flashing only started recently,

Also until recently this theory held but then lights that may have been powered off for 20 or so minutes might emit the problem.

Another thing, some light regularly do this from power-on (like almost every time) and other much less frequently and even never.

I switched from DeCONZ to ZHA over the weekend as read somewhere someone saying DeCONZ previously had a similar issue with flashing lights as a light discovered sensors in the mesh. But it still happens in ZHA.

This is obviously very annoying and pretty much halted my HA project as its driving the household mad.

So…

Is this normal behaviour for the lights to flash and under what circumstance might this happen ?

Do I have some sort of issue somewhere ?

How do I troubleshoot and find the problem using ZHA, logging, visualisation etc…

Any help appreciated.

PS. I’ve still got my Philips Hue hub and may move all devices to that temporarily to see if it happens there also.

Toggling the power to a zigbee device of any kind is really not the ‘best proactice’ for the use of a zigbee network. I know you say it ‘work’ at times. But basically everytime a device joins (and leaves) the network a somewhat chaotic period begins for the next several hours as all the devices decide on new neighbor connections. Yes, the network should handle this without flashing bulbs, but devices like the Aqara’s and maybe others don’t seem to do as good a job of conforming to zigbee standards as others.

I know my above ‘opinion’ does not help you in any way. Maybe useful questions:

did problems start after some particular device was added? think about the Innr socket as it probably a router and I don’t know much about if anyone else is reporting compatibility issues to level of Aqara devices.

firmware version on all devices, especially all the bulbs? with my Ikea bulb ‘flashing’ issue on my Hue zigbee network, I suspect a firmware change on Hue bulbs may have changed the occurrences of this occurring. I’m pretty sure the only way I got rid of the problem was removing Ikea bulbs from Hue network.

painful, but you might need to segregate your devices to separate zigbee network. About the only way to do this is multiple zigbee2mqtt networks, or separate proprietary Hue and Ikea and ZHA networks.

any chance one or more of your bulbs or devices has a direct control, or grouping setup in it at the zigbee level? For example a Hue motion sensor that has had a config saved in it to turn on a zigbee group of individual bulb?

Hope there is some here with good knowledge to help you!

1 Like

Thanks for the reply. I agree powering down a zigbee device isn’t the best of ideas but find it surprising the response to this when the device is powered on is to flash bulbs. I can’t see how that as “a standard” would catch on as “the user” would find it most annoying after a time.

I started my config on deCONZ with a few hue bulbs and a single Aqara temp sensor. Then slowly added more hue bulbs and hue motion sensors. That config was rock solid and never had any issues (where the bulbs were powered off or not). Then I added more hue bulbs and motion sensors as part of a Black Friday binge. So end of Nov 2020 all was ok.

Then I started to notice a single light doing the flashing very infrequently. When the flashing started I only had the Aqara temp sensor that was non-hue which has been in my zigbee setup since day one.

Then I noticed the Ikea Tradfri bulbs were half the price of hue bulbs so thought I’d give them a try (bad idea!). I got GU10’s and E14’s. The E14’s were a nightmare (saying they were on when they were off etc.) so got rid of them after a day or so but the GU10’s I only had 2 of and seemed ok so I kept them. I bought the Tradfri sockets and Innr Sockets about the same time to control some Xmas lights so all were added around the same time, Since then the problem has probably worsened.

I pretty sure which lights will do the flashing thing but there are some that have never done it. For instance in my hallway I have 2 lights near the back in separate fittings but 3 at the front in a single fitting (all hue). The 3 at the front are grouped in HA but also all hallway lights are grouped. All of these are controlled by a single physical switch so all switch on at the same time. When I switch on the 3 lights at the front randomly flash but to date the 2 at the rear I don’t think have ever flashed.

One other light I have pretty much always flashes. Power it off for 20 mins or so then power it on and it flashes for about 5mins before it settles. Very annoying but at least I have 1 light I know I can recreate the issue with some monitoring (if I only know what to look for). This is also probably now the nearest light to my HA/Conbee box. Although to troubleshoot the issue I moved my HA box as well and the light flashed as bad before I moved it.

I thought it was light groupings but I have other lights not in groups that flash but its funny you mentioned about groupings as when I moved to ZHA I noticed in the Configuration, Integrations, ZHA, Configure, Groups screen there were 4 groups. One called “Default Lightlink Group” and 3 others

  • “No name group 0x0005”
  • “No name group 0xFFF0”
  • “No name group 0xE646”

The first 2 contain bulbs and the last the Conbee device. I didn’t create these, they just appeared in ZHA but they seem to follow my HA light groups I created so thought it had something to do with that.

My next plans are to go through the firmware revisions of all my devices as you suggested and update where possible and also to teardown the whole zigbee setup and start with my original setup on ZHA and work on slowly from there.

But whilst its in the “broken” state it would be nice to troubleshoot and find the issue.

Well, to quote Ringo, unscrewing all those bulbs… ‘I GOT BLISTERS ON MY FINGERS!!!’" :smile:

Your right, random flashing is not a ‘standard’, however this does seem to be the way manufactures do communicate with us humans for the blubs.

One thing I thought about with the flashing on power on, however perhaps your last post threw water on, what that the bulbs that flash do so because they cannot find a coordinator. This might happen if the flashing bulb had it ‘save’ best next hop as a bulb that was also off. But I’m way out of my depth on how the zigbee mesh network sets up.

Do you have ZHA network diagram of how your network graph looks when every thing is truned on? This might shed some light on how the devices are connecting between themselves.

Again, beyond my paygrade, but having those groups hanging around don’t see right, especially after a fresh setup of everything.

Looking that ZHA config page for one of my devices, in this case an OSRAM bulb, you might try some combo of ‘reconfigure device’ (I’m still not sure exactly what this does) and ‘manage clusters’, see if the bulbs have any groups or devices that don’t look like defaults (for example OTA is a buiild in group you want), and get rid of them.

You have to know that the devices keep information about the network. So if you take a device and add it to a “new” network it will still remember things from the past.

I did some test: I moved from a ZHA network to a deCONZ network and back to ZHA. I was surprised that routers and coordinator would remember some neighbors that were not recognized by ZHA. @Adminiuga told me that this was because the ConBee II was aware of devices in neighbors table that ZHA/Zigpy did not know as the devices where not yet discovered. It seems that by default when you start a new network the coordinator uses the last PAN ID and therefore do not flush its internal tables (same for connected routers). You can find lot of useful information if you take time to read this https://github.com/home-assistant/core/issues/44954

The group information is located inside the Zigbee devices and therefore it make sense that they are found even though ZHA is not aware of them.

For your problem of flashing bulbs, I think that @dproffer is right the light are flashing probably to indicate that they are joining the network. On my test network, I only have hue bulb and Aqara devices. I can do a test to see if light flashes when rejoining the network.

If you have a ConBee coordinator, you have to know that ZHA is using the deCONZ Zigbee stack and therefore it is normal to find information from previous experiment. If you want to start from scratch, you could change the PanID, Extended PanID and the network key, which would equate to a brand new network.

1 Like

Thanks for the info…
How do I reset/change the PAN ID ?
There doesn’t seem to be an option in the GUI or configuration.yaml options
I plan to reset everything tonight and start again, slowing adding devices to see if the issue comes back.
I’ll start with the original setup I had and run that for a number of days before adding anything else.

Also how can I check the device firmware versions via ZHA ?
In deCONZ I could find these but can’t see how to do so in ZHA.

To change the PAN ID I do not know the answer.
You will get a lot of useful information by turning on the debug Flags. Follow this LINK

Once you have turned on the debug flag look for the following in the HA log file
2021-01-08 18:31:54 DEBUG (MainThread) [zigpy_deconz.api] Command Command.version (0,)
2021-01-08 18:31:54 DEBUG (MainThread) [zigpy_deconz.api] Version response: 26580700

This is suppose to be the latest. Go to deconz-firmware to get the latest firmware

Actually, your problem raises interesting questions. Normally a router is supposed to be always power on in order to listen to broadcast commands that affects the network. I will not go into details, but, under certain circumstances, it seems possible that a router will not be able to rejoin the network if it has been down for some times. Furthermore, it does not seems that the behavior of a router when it restarts is fully defined (e.g. rejoin command not mandatory). So different brand will behave differently.

However your setup is quite common particularly for bulb lights. Personally, I will put some switches on the bulb lines so that if the home automation system is down I can at least turn on my lights.

Philips is definitively a major player in Zigbee and it making very good products, but that does not mean that it provides 100% Zigbee compliant devices. For example, according to @MattWestb some old Philips bulbs (but not so old) do not implement neighbor aging algorithm correctly. Therefore, you can be left with long time gone devices still reported by the router.

You may be tempted to keep Philips devices all grouped under a Hue hub and the rest of your Zigbee devices connected to the ConBee. This will work but by doing so you are removing many routers from your network which seems a bad idea as it seems that the more routers you have the more robust your network is (especially to interference).

I just power down few hours ago one of my Hue bulb router with an Aqara end device directly connected to it. I will wait until tomorrow to see what is the behavior of the bulb when I turn it back on. Normally it is possible to specify the behavior of the bulb when the power comes back (on, off, same state). This is easy with the Hue application but hard with ZHA.

One thing I do not like in HA is the fact that when a Zigbee device is gone (or down) there does not seem to be any indication in HA. For the Philips bulb (down) if I try to turn on the bulb with an HA button after a few seconds the button goes back to off state without any indication (error message). I suppose the command is sent but obviously not received by the device and HA must try to read the status back and not receive anything. In such a case, it would be nice to “grey” the device to indicate that it can’t be reached. oops it works as it should - just have to wait that it gets detected as not available

Note that the Zigbee graphs (default visualization or Zigzag) do not reflect the fact that the device is off. This kind of make sense as the graphs are updated every 3-4 hours and furthermore the device is probably still in the neighbor tables but it would be nice to get “real time” information. Even zha-network-card display the device as “online = true”?

FYI after few hours the zha-network card and Zigzag report the device as offline. This means that a network scan has been done.

Zigzag reports the device in red = not available
According to @Adminiuga : not available =

ok, so this has just gone to a whole new level of “weird”

Yesterday evening whilst thinking of resetting everything it occurred to me that I hadn’t seen (and no one had moaned) that any lights had flashed. So I tested a couple and no flash.

So I didn’t change anything and let everything carry on as normal (lights being turned off overnight etc.) then this morning thus far… No flashes ???

I have 2 bulbs that for the last month or so you could guarantee will flash after power on yet this morning neither flashed.

I’m loosing it :rofl:

So I did some digging around last night and whilst it might have been obvious to others in this thread it wasn’t to me but seems the only way to update Hue bulb firmware is via the hue hub/hue app which I was hoping to do away with using the ZHA/Conbee II stick.

So that leaves me with deciding whether

  1. Stay as I am (ZHA/Conbee II), figure out all the glitches and never update firmware ?
  2. Replace ZHA/Conbee II with my Hue hub move all devices to it and use the HA Hue integration ?
  3. Run dual Hue & ZHA/Conbee II zigbee networks ?

I suspect not all devices will be hue hub compatible which is why I put in option 3.

Any one got comments or good/bad experiences of the above to share ?

You can update the firmware with ZHA:

What is the procedure?
Can you detail please

What I did, install deconz add-on and start it with the conbeeII as device. In the web UI you can update the stick. After this delete the add-on en reload ZHA.

Using home assistant OS 5.11 and conbee II. I agree it’s not the way you want, but it works.

So what’s the consensus to take away from this thread?
to have an optimum zigbee mesh in a house , use routers/repeater plug ins?
do you recommend any particular reliable brands?
I have conbee 2 stick and use ZHA integration with 90% of my end devices from aqara.
Thank you for all the research and testing you did OP

If many devices and/or large house then get at least a few known devices working as Zigbee routers:

https://www.home-assistant.io/integrations/zha#best-practices-for-avoiding-pairing-difficulties

https://www.home-assistant.io/integrations/zha#using-router-devices

https://github.com/home-assistant/home-assistant.io/pull/18864