Making sense of this Zigbee Routing Table Neighbors

Gents I have been reading as many threads on the Zigbee Routing table as possible. My confusion lies in who is considered to be neighbors. The Hub is a room I have called the "Equipment room". It is in the basement. There are 70+ devices as repeaters so that wasn't an issue. But the hub has switches and dimmers listed as it's neighbor that are on a completely different story in the house, rather than the close by devices. In fact, less than half of the neighbor devices are within 50ft of the hub and some are clear in the opposite corner of the house such as Master Bathroom Shower Fan. I tried the trick of shutting off the hub for an hour or two to let the routing rebuild but there seems to be no difference. Thoughts?

Parent child parameters
EzspGetParentChildParametersResponse [childCount=0, parentEui64=0000000000000000, parentNodeId=65535]

Child Data

Neighbor Table Entry
[Kitchen Flood Lights, 116F], LQI:255, age:3, inCost:1, outCost:1
[Family Room Fan Light, 4251], LQI:255, age:0, inCost:1, outCost:0
[Kerry's Office Lights, 49AE], LQI:255, age:3, inCost:1, outCost:1
[Pool Room Fan Lights, 4D2E], LQI:252, age:2, inCost:3, outCost:0
[Master Bathroom Shower Fan, 5328], LQI:255, age:3, inCost:1, outCost:1
[Lower Patio Right Light, 55C4], LQI:255, age:0, inCost:1, outCost:0
[Basement Stair Lights, 55CF], LQI:255, age:3, inCost:1, outCost:1
[Back Yard Flood Lights, 5DAC], LQI:251, age:1, inCost:3, outCost:0
[Pool Patio Track Lights, 610A], LQI:254, age:4, inCost:1, outCost:1
[Guest Room 2 Lights, A09A], LQI:255, age:1, inCost:1, outCost:0
[Rec Room Spot Lights, A7D9], LQI:255, age:3, inCost:1, outCost:1
[Master Bathroom Bathtub Lights, BF33], LQI:255, age:3, inCost:1, outCost:1
[Master Bedroom Hall Lights, CD35], LQI:255, age:0, inCost:1, outCost:0
[Pool Room Far Wall Light, D8BF], LQI:255, age:3, inCost:1, outCost:1
[Rec Room Flood Lights, DF4C], LQI:255, age:3, inCost:1, outCost:1
[Rec Room Bar Light, E80B], LQI:255, age:3, inCost:1, outCost:1

Route Table Entry
status:Active, age:32, routeRecordState:2, concentratorType:Low Ram, [Guest Room 1 Lights, 66D3] via [Pool Patio Track Lights, 610A]
status:Active, age:64, routeRecordState:2, concentratorType:Low Ram, [Family Room Mantel Lights, ED32] via [Kitchen Flood Lights, 116F]
status:Active, age:32, routeRecordState:2, concentratorType:Low Ram, [Master Bathroom Overhead Light, 1A3A] via [Master Bathroom Bathtub Lights, BF33]
status:Active, age:64, routeRecordState:2, concentratorType:Low Ram, [Foyer Lights, 7CD4] via [Pool Patio Track Lights, 610A]
status:Active, age:64, routeRecordState:2, concentratorType:Low Ram, [Master Bathroom Shower Lights, 5E5F] via [Rec Room Bar Light, E80B]
status:Active, age:64, routeRecordState:2, concentratorType:Low Ram, [Kerry's Office Lights, 49AE] via [Kerry's Office Lights, 49AE]
status:Active, age:32, routeRecordState:2, concentratorType:Low Ram, [Pool Track Lights, 3FA4] via [Rec Room Spot Lights, A7D9]
status:Active, age:32, routeRecordState:2, concentratorType:Low Ram, [Pool Room Wall Lights, 216D] via [Basement Stair Lights, 55CF]
status:Active, age:32, routeRecordState:2, concentratorType:Low Ram, [Dining Room Wall Sconces, FB63] via [Kitchen Flood Lights, 116F]
status:Active, age:32, routeRecordState:2, concentratorType:Low Ram, [Pool Room Far Wall Light, D8BF] via [Pool Room Far Wall Light, D8BF]
status:Active, age:64, routeRecordState:2, concentratorType:Low Ram, [Kitchen Cabinets Right Lights, 32BA] via [Kerry's Office Lights, 49AE]
status:Active, age:64, routeRecordState:2, concentratorType:Low Ram, [Back Patio Light Right, FB80] via [Rec Room Bar Light, E80B]
status:Active, age:32, routeRecordState:2, concentratorType:Low Ram, [Guest Bedrooms Hall Lights, 2B67] via [Rec Room Spot Lights, A7D9]
status:Active, age:64, routeRecordState:2, concentratorType:Low Ram, [Laundry Room Lights, 9A5A] via [Kitchen Flood Lights, 116F]
status:Active, age:64, routeRecordState:2, concentratorType:Low Ram, [Basement Stair Lights, 55CF] via [Basement Stair Lights, 55CF]
status:Active, age:32, routeRecordState:2, concentratorType:Low Ram, [Master Bedroom Hall Lights, CD35] via [Master Bathroom Bathtub Lights, BF33]

TL; DR: The Neighbors Table should be the 16 devices with the best likelihood of delivering an error free packet, as determined by measures made at each end of the link. You'd be right to expect that the closest devices would have the best links. But how those measures are made depends on the device implementation and may produce unexpected results.

The intent of the protocol is that Zigbee routers populate their neighbor table with the devices that have the most viable RF links; they'll get aged out if they stop providing timely link status updates or evicted in favor of a better neighbor if the cost figures-- there are seperate metrics for inbound and outbound link costs-- are more favorable. How well this scheme actually works in reality depends on the specifics of the hardware itself, as there is a bit of lattitude in how the spec was written. Cost figures have to be mapped from LQI numbers in a certain way, but how the actual LQI figure gets generated is left up to the implementation. Silicon Labs, TI, NXP, and anyone producing hardware conforming to the IEEE spec may use a different but still compliant scheme.

So the cost numbers get derived from the LQI figure that each receiving chipset reports (there's the LQI from the hub's chipset that you see in the neighbor table, but there's also an LQI generated at the other end of the link by the neighbor's receiver which is the basis for the outCost figures). Depending on the actual hardware implementation, this computed LQI can either take into account an actual hardware detected link error rate, or simply be based on RSSI (the total RF energy seen on the channel, not specific to the actual data link content); this means that even in some noisy environments (if the noise falls in the right frequency bands during the sample period) a high LQI can falsely imply a 'good' cost figure.

There's also a Silicon Labs specific issue (corrected in their more recent Zigbee stacks) that erroneously assigned high costs to routers with stable links; the result was that they would not be chosen as preferred routers in the neighbor table (you can read the details here: LQI in Silicon Labs EM3xx and EFR32 Parts).

So all that said, how is your Zigbee network performing?

Lol, I was just linking to your fantastic explanation:

2 Likes

Not particularly great. I have about a dozen devices that do what they are told about 50% of the time. I have Alexa tied in as well and I get constant errors back from her that devices aren't responding. Lots of flakiness across the board. I just moved into this house and replaced all 70+ switches and dimmers at once. I had GREAT luck with the GE/Jasco switches at my last home and so far at this new place, it has been a source of constant frustration.

Assuming the usual causes of RF troubles have been ruled out, I'd be tempted to try eliminating a few of those outlier neighbor routers to see how things change (turn one or more of them off for a while, if it is feasible to do so) just in case the protocol is being led astray by some bogus link metric. Sometimes different mixes of devices just don't play well together for reasons that are buried deep in the specs.

I assume that your reference to Alexa is voice control via HE? Or do you also have an Echo device hosting its own Zigbee network?

Thats a good idea @Tony but unfortunately I can't turn any of them off. All my devices are currently switches and dimmer. I also have not added back in my contact sensors yet. I decided to wait until the rest of the devices settled down first. Yes you are correct about Alexa. She is simply doing voice control of the devices that are managed through HE.