zha-ng / zha-map

Build ZHA network topology map.
MIT License
57 stars 17 forks source link

Routers with coordinator as parent don't show parent relationship #8

Closed walthowd closed 4 years ago

walthowd commented 4 years ago

Looking at tweaking the vis-network and it would be nice to have working parents listed for each device.

In my setup, routers that are (I assume) directly connected to the coordinator don't show the relationship as parent.

Two examples are: cc:cc:cc:ff:fe:c3:2c:44 https://paste.c-net.org/CampedBreathes

00:0d:6f:ff:fe:7c:bf:0f https://paste.c-net.org/IntroDeserved

zha_map: https://paste.c-net.org/ColonialMagnum

Adminiuga commented 4 years ago

Well, Routers don't have parents technically. I also suspect the neighbour table on each device is limited, so it may not contain all the "routers" in vicinity.

In your case, ::2c:44 has the Coordinator in the neighbour table, but coordinator does not have it in its table.

Routers are supposed to have routing table, allowing you to identify which neighbour is being used for particular destination, but support for it was spotty between the manufacturers. If running on EZSP, you may use zigpy.device.Device.relays list which may contain list of hops coordinator is using to reach a particular device and based on that you could find the "parent" "uplink device" that a router is using for communication with coordinator/HASS

walthowd commented 4 years ago

Thanks @Adminiuga -- Trying to decipher zigbee routing and come up with ways to improve the network visualization.

I'm assuming in 90% of setups people will primarily be concerned with coordinator to device traffic routes,so I look into the relays list, at least for EZSP users. Thanks!