dmulcahey / zha-network-visualization-card

Lovelace custom element for visualizing the ZHA Zigbee network
35 stars 20 forks source link

Different LQI than zha-network-card / coordinator connected without line #46

Open energywave opened 3 years ago

energywave commented 3 years ago

I have a perfectly working ZHA environment using a Conbee II in the attic and various repeaters in first floor, ground floor and cellar. In my configuration the map rendered with this component has totally different LQI if compared to the table generated by zha-network-card! Furthermore zigbee devices that connects directly to coordinator doesn't have a line. Please take a look here (note link colors): image

Then take a look at the zha-network-card data: zha-network-map

Who is right? My ZHA devices are working very well so I tend to believe that the table data are right as watching the map it seems that my network is a total disaster!

One last thing: are these two cards depending upon zha_map or not? In the last commit you removed zha_map from the readme but in zha_map you tells that's a prerequisite of these cards... Can I safely remove zha_map?

dmulcahey commented 3 years ago

zha_map is no longer a requirement for this card and it never was for the table.

This card is going to be deprecated VERY soon as it has been integrated into HA and will be available in the config area in .119.

As for the LQI information: the 2 values are from different areas so the fact that they are different makes sense. 1 is the link quality for the last hop of the last message sent and 1 is for the connection to the neighbor itself IIRC. I’d have to double check the spec to give further detail. @Adminiuga am I right here or am I misremembering this?

Adminiuga commented 3 years ago

Yes, the zha network card shows the lqi from the last hop which relayed request to coordinator.

energywave commented 3 years ago

I've checked and rechecked and there should be a bug there. Hopefully you can resolve it before .119 publishing! Now @Adminiuga says that the LQI shown in the table is the link quality of only the last hop but maybe it was a mistake and the table shows the overall LQI while the map shows only the hop where the value is placed... At least that would make a lot of sense while not the opposite (or I'm missing something...) But in every case the two values are so different that there should be something wrong somewhere... Let's take an example of my zigbee network (that is working flawlessy, I love ZHA and I'm a big supporter of this integration in the Italian community :) )

Please take this part of my map as a reference (hey, it comes from the far future!!! Take a look at the date in upper left corner!): image A question: but the value shown on lines is that LQI or what? Because the color seems not related to that value...

Please note the table (screenshot at the same time of the map): zha-network-table Let's follow from Coordinator do device "Finestra Cucina" on the lower right on map then on the table (I'll presume that the value on line is LQI...): MAP: Coordinator --- 95 --- Tostapane --- 103 --- Finestra cucina TABLE: Coordinator --- 255 --- Tostapane --- 255 --- Finestra cucina

There is something wrong or that I don't understand. I only hope you'll use this information to create something great for the .119 update that I can't wait to see :)

Adminiuga commented 3 years ago

The map show LQI of a all the neighbors for a particular device, averaged over multiple packets. The network-card shows LQI of the last packet received by the radio from the last relaying hop.

  1. Those will never match and map LQI generally tends to be lower.
  2. Different vendors calculate LQI differently, so even on the map, LQI of 255 and LQI of 200 could mean the same thing for different vendors
energywave commented 3 years ago

Thank you for explanation. Ok, so in short LQI that I see there are totally not useful to understand and debug an hypothetic communication problem...? Please note I'm not saying it's your fault, I'm trying to understand as in Deconz and Zigbee2mqtt maps seems to have a correlation to the effective quality of communication, I remember different data on Deconz map. I'm very confused about where to search weak point of my zigbee network :(

Adminiuga commented 3 years ago

Use the map LQI as the guide line. Don't use network card lqi