ZHA Visualisation

Hello,
I had a SONOFF switch go offline today. As it is one of the most distant ZHA devices in my network, I wanted to try to get it to come back without physically opening up the crawlspace access.

I looked at the Zigbee visualisation and showed the extractor was weakly connected to a lamp two rooms away - there are not many other ZHA devices nearer to it.

To try to regain control of the extractor, I added a Hue bulb to the ZHA network and placed it within two meters of the extractor. After some minutes I was able to control the ventilator again. :slight_smile:

I carried on checking the Zigbee topology and the ventilator was still shown as poorly connected to a living room lamp and the newly added test bulb (which is quite responsive) is not showing as connected to anything! The refresh topology does not seem to change the results on demand. I then powered off the living room lamp to try to force the issue, an after around 30 minutes the nodes did change on the graph:

The extractor is connected to another lamp in the living room (even more distant) that has stronger connection. The test bulb has now meshed to 19 other devices and the extractor just one.
What is the refresh topology button supposed to do - is it the same as refreshing the browser or does it request a scan from the ZHA Coordinator?

regards
Steve

It’s rather difficult to manage complex networks of autonomous nodes - (n*(n-1)) meshes so my approach has been not to look too closely at the detail, but trust the individual nodes to “do the right thing” and just help them see enough RF energy from neighbours. RSSI and other measures are a snapshot in time, and can change due to many invisible factors.

There’s several threads on the forum looking at Zigbee issues and this one, so I suggest some reading, and add more mains-powered devices in the area of the hard to physially reach device.

1 Like

Thank you, there are some good notes there that I’ll study. I’m in a rural location, so there is little chance of external interference.

On the visualisation map I wish there was a way to manually arrange the nodes and memorise that layout.

I wrote some code a while back to try and ‘look inside’ my ZHA network. I think some folks forked this and did more and I believe there might be some more extensive tools out there now. I’ve since shutdown my ZHA setup and moved to a pair of Zigbee2MQTT networks in docker container. I have found this stable enough that I do not need to do any of the sort of probing that I was trying to do in ZHA.

IMHO, the issue with the current visualisations both ZHA and Zigbee2MQTT is that they are only a ‘current point in time’. I wanted to ‘see’ how the Zigbee mesh changed over time and the idea was to be able to maybe understand what was causing devices to change their routes or lose connections. Perhaps some of this might give you some ideas, as I said, for me just moving to Zigbee2MQTT with Texas Instrument devices as the zigbee coordinators has made it solid enough that I rarely futz around with zigbee any more. Good hunting!

1 Like

You can also use ”zha-toolkit” to export data from ZHA → "zha-toolkit" - a big set of Zigbee commands on top of ZHA/zigpy

FYI, Update zha.markdown with info on visualization by Hedda · Pull Request #26848 · home-assistant/home-assistant.io · GitHub has now been merged to at least bring some basic information about the visualizarion map and how to interpret RSSI/ LQI, but note that this new ZHA integration documentation section on this still need to be improved so please feel free to modify and/or provide feedback on what needs to be added or changed, same as for the rest of the ZHA integration documentation-> https://www.home-assistant.io/integrations/zha/#zigbee-network-visualization-in-zha-ui

Again, please note that initial only provides some basic information that probably needs to be fleshed out further by ZHA developers and more advanced Zigbee users. That is, I do not think that the initial commit in that first PR alone currently provides all the information that is asked for by many users here, still, I hope that it can be good enough for some now so that it can later be fleshed out by others.

That is what I assumed too, except that it can take a day or two for a new device to add to the visualisation. However one of my repeaters has been unplugged and sitting on my desk for 3 weeks … and the visualisation is still showing it with green lines.

I also used zha-toolkit a couple of times, and have created a lovelace panel listing the LQI or RSSI of all wireless devices (initially to quickly see which are “unavailable”)

I now seriously question where and when the visualisation is getting its data. However after recreating my zigbee network (described in another thread) it now seems to be pretty stable, so I’m also no longer paying it much attention.

Yes, there are quite a few threads about zigbee, but mostly they seem to be ‘the blind leading the blind’, repeating the same basic advice. If zigbee nodes were “doing the right thing” these threads wouldn’t have happened.

Yes the zigbee “user documentation” could be a lot more helpful, and I gave serious thought to putting effort into revising the documentation. And that’s what made me realise that no-one who knows how zigbee actually works is able to explain it in user language; and my revision would just be to repeat others suggestions which helped me. Namely:

  • delete your whole ZHA network - which has probably grown ad-hoc
  • plan your network layout- which channel, and where to place repeaters (routers) in central locations
  • add ZHA integration, and repeaters one at a time
  • then add end devices.
1 Like

I would suggest creating new issues for such problems in the future in the hope that ZHA developers can resolve them for everyone → https://www.home-assistant.io/integrations/zha#reporting-issueshttps://github.com/home-assistant/core/issues

Agree, however, I have tried to improve the “user documentation” for the ZHA integration as best I could over the last few years to hopefully make it a little more useful, but I still refer people to this guide too for all the reasons you mentioned and others → Guide for Zigbee interference avoidance and network range/coverage optimization

Good observations. I’ve seen similar behaviors when I was running ZHA. I’ve not taken the time to look at what Zigbee2MQTT is doing when it creates it’s visualization (not taken the time 'cause my Zigbee2MQTT networks work fine 99% of the time), however Zigbee2MQTT seems to do some rather ‘active’ work in the course of building it’s visualization vs. what to me appears in ZHA as just creating a graph visualization from the contents of the ZHA .db database file.

Your steps to build out a solid mesh network are a good base. If you have this done, the problems seems to occur when you add a device, most often an end device that does not ‘abide’ by the rules. In the ZHA world you are often left just scratching your head. At least in the Zigbee2MQTT world you seem to statistically have a greater likelihood of finding someone with a similar problem. If there is not a solution path from experience there, and least you can commiserate with at least one other :wink: