Can anyone explain the visualisation?

Using ZHA can anyone explain or point me in the direction of what the number, colours and different types of numbers mean?

I have red, grey single digit numbers from 0 to 107 I have one line that say 1/1 another with 87/156.
One device that has no line to anything but seems to work just fine.

5 Likes

Some info about that available here.

Your end devices ( like temp sensor ) will only have 1 value because they only send data. Your router devices will show 2 because they can send and receive data.

Basically, the higher the number the better. Green lines=strong signal. With the Grey lines, not sure, might be worse than Red.

2 Likes

Thanks, I came across that trying to find some info and wasn’t sure if that code just got absorbed into HA.
Either way there doesn’t seem to be any official HA documentation for it.

1 Like

That’s exactly what I’m interested in, too. The official documentation on GitHub only explains the colours (green, yellow and red). Why sometimes two numbers are displayed, why some lines are grey and much more is not even mentioned there. I’m surprised that you can’t find any information about this at all. Does everyone understand this immediately, or does no one really care?

A quick look at the code confirms the following:
The numbers represent signal quality (LQI). When there are two numbers it’s simply because it’s a two-way connection, and each number represents how the signal as perceived by the device on each side of the connection.
Higher numbers are better. Grey connections indicate is a LQI value <= 80. I.e., any other color is better than grey.

1 Like
_getLQI(lqi) {
    if (lqi > 192) {
      return { color: "#17ab00", highlight: "#17ab00" }; <-- green
    } else if (lqi > 128) {
      return { color: "#e6b402", highlight: "#e6b402" }; <-- yellow
    } else if (lqi > 80) {
      return { color: "#fc4c4c", highlight: "#fc4c4c" }; <-- red
    }
    return { color: "#bfbfbf", highlight: "#bfbfbf" }; <-- gray
  }

From the code
Not sure who wrote this, but gray apparently is worse then the red…

There should be a legend in the chart, Thread my ass, we are not ready even for zigbee…

10 Likes

Thanks for the clarification.

I don’t know, but I think the values are unrealistic. Most of the lines in my chart are gray and only a few are red. At first I thought there was something seriously wrong with my network since I basically don’t have any device with a LQI better than 128. To this day, I still can’t figure out why this is the case, even with mains-powered routing devices mounted right next to each other. That’s when I lost interest in network optimization and never looked at the visualization again.

Also, it seems I’m not the only one with a network like this, as you can see in this post:

The screenshot shows a chart where a device with an LQI of 33 is still green and the only yellow device has an LQI of 21, which seems much more reasonable than the ZHA visualization.

1 Like

Those are my chosen colours.

1 Like

I see. Nevertheless, I think the values are plausibly chosen and I wish they were closer to reality in the official version too.

My understanding is that the LQI value is a subjective number that when it is calculated by a devices has no correlation to the LQI number of a device by a different vendor. I say when it is calculated, because from my understanding when you see a 255 or 254 value for a LQI this more often than not means the device is not even calculating a value for LQI. Layer on top of this, to my understanding, there is no definition as to which device is reporting the values for a link. If you think about it, there should be four value for any given link, with each end reporting it’s two numbers. It is pretty amazing that with the length of time zigbee has been around, the tools to view the network are so limited and poorly defined.

3 Likes

I tried recolouring the lines on my screen so that they were all green, but as soon as i scroll they go back to the old colours. Any suggestions welcome.

While I have ready this type of interpretation numerous times, I just migrated from a Sonoff coordinator (D) with a TI chip to a Sonoff coordinator (E) with a SiLabs chip, and the LQI changed dramatically. With the TI based coordinator no LQI was over 200, while I have a lot that are over 200 and even at 255 with the SiLabs coordinator. I don’t interpret this as the SiLabs chip being better, but just that the two coordinators calculate the LQI differently. In other words, I am saying I believe it is the coordinator that calculates the LQI, not the device. On the other hand, the device is most likely the source of it’s own RSSI.

Even with 38 devices (out of 85) at =>192 LQI, I still have a lot of yellow and red because, I believe, it shows alternate routes and not just its preferred route.

I am in the process of eliminating my Jasco zigbee outlets as they all seem to have very poor link/signal performance, and when there are power issues they appear to get stuck in some weird state that causes network issues… if they don’t die due to the well known bad capacitor issue. I had mostly installed them to build out my network given most switches/dimmers were zwave, but now that I am upgrading them all to Inovelli, I have using zwave switches/dimmers, and zigbee exhaust/ceiling fan switches to build out both networks. I will likely use Inovelli’s unreleased outlet to build out Thread, or Zigbee if I convert their fan switches to Thread (they are upgradeable).

If I also want to buy another Sonoff chip with another chip, first, how do i indetify my current chip used?
Second, if I buy online, will they provide this data? or can you provide a purchase link?

I see many times this as a property of the Sonoff zigbee dongle:
Base on TI CC2652P + CP2102N

If i do an lsusb on my system i see Silicon Labs CP210x UART Bridge, which i suppose it is the zigbee dongle. So CP210x is Silicon labs, but then the listing says TI +CP (where TI is Texas Instruments…:S

what about those lines that are among Router elements? I understand that some of the devices can “route” zigbee signals further to expand the coverage, but don’t they just cause more problems? I live in a 50nm flat, i have 13 zigbee devices but my graph shows that many of the EndDevices (light bulb) and Routers (smart wall plug) too are also connected to other Routers with crappier signal. Eventually, my coordinator is connected to a door sensor and two power outlets. Many of my other devices are connected to a lightbulb…

Isn’t there any way to manually optimize this?

While HA shows whether it is TI or Silicon Labs, I did not see any reference to the specific chip. However, a quick search online should provide you the chip number.

Sonoff dongle based on Silicon Labs EFR32MG21 chip:

Sonoff dongle based on Texas Instruments CC2652P chip:

Both product pages show what chip is used. Where to buy them depends on where you are in the world.

Silicon Labs CP210x UART Bridge is just the USB to serial chip that can be used by both SiLabs and TI chips. Below are a couple internal shots of both the E and P versions of the Sonoff dongle:


Multiple routes to the coordinator add to the resilience of the mesh network. It is a good thing. As far as I know the optimization of a zigbee mesh network is automated, and the only things you can do are ensuring a good number of routers are well distributed around the coverage area. Light bulbs are usually not repeaters as their power could be cut off impairing the mesh network. Ensure no routers are disconnected and/or moved.

Anyhow, if by 50nm you meant 50 square meters, I would expect the Zigbee coordinator to not have any issues reaching all devices directly (depends on walls/material found in between). There is a limit to how many devices can connect to it directly but I believe that differs by chipset and firmware version and either way I believe you are still far from that number.

In my case, too many devices, devices that are too chatty, or even devices I suspect don’t behave properly were my top issues. For that reason I only purchase reputable brands, and Zigbee 3.0 certified compliant devices.

Thanks, so it’s P and E that decides at the back, what chip is used. Mine is P :slight_smile:

Regarding the other mesh question, I see that they use my IKEA bulb as a repeater/router, and almost all my devices connect to it even those that are closer to the sonoff coordinator itself…that’s why wanted to optimize it.

So far I specifically changed the lowest channel (11) for my zigbee coordinator in HA and increase my Router’s 2.4GHz channel to the highest one (11) to avoid direct interference; cannot control the neighbors WiFi though haha…but so far the connection seems a bit more stable. My motion sensors lost the connection but it happens once in a while - just need to read them/reset them.

Thanks for all your input @aruffell

1 Like

@cs.lev If your IKEA bulb is a router, make sure to never cut power to it. Use zigbee to turn it off, that way you don’t break your mesh.

I use Wifi ch 1, 6, and 11 on 2.4GHz across 5 APs around the house, and my zigbee coordinator is set to ch25, however everything seems to work fine even though there has to be some degree of interference.

Thanks, these are common sense and use/set them accordingly :slight_smile:

ZHA integration documentation does have some info on ZHA network visualization:

Also see this pull request (PR) draft with an update to that last section:

If you like to see the ZHA documentation improved then please contribute PR or issues as feedback:

PS: Regardless, be sure to try to follow all best practice tips in this guide:

See these two thread for details& differences between “Sonoff ZBDongle-P” and “Sonoff ZBDongle-E”: