[Feature request]: Save last message route used when receiving a message
Is your feature request related to a problem? Please describe
I recently had trouble with a single lightbulb (Ikea Tradfri) misbehaving. While I could see downstream end devices properly sending messages, they never made it to the zigbee coordinator. In this case, I had previously started sniffing packets, so I could see the last route that did work, identifying that it wasn't the contact sensor but the bulb that was the problem. I was able to fix it by power cycling the bulb.
Describe the solution you'd like
It would have been much faster if zigbee2mqtt had shown the route the last message had taken to reach the coordinator. In otherwords, kind of like saving a persistent copy of the map.
Describe alternatives you've considered
I'm not sure if the data is available to reconstruct the route for incoming messages. If not, perhaps just saving the map results after a scan for future reference would be helpful. In the case of an unavailable device, the map doesn't help because it shows them as disconnected.
Additional context
Another option would be instead of saving the whole route on each device, just save the last parent node. Then you could click through the chain until you got back to the coordinator.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days
I discovered that ZHA keeps a persistent map instead of requiring a scan, though you can force a scan to update it. It's really nice!
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days
I'm still intending to work on this in the above PRs, but the holidays caught up to me. The next step is to change it so that instead of always emitting events, it stores the source routes in memory only until requested.
Using the various draft PRs, I identified that my 10 Enbrighten switches were almost always at fault when devices weren't working. I split them off into a separate network and zigbee2mqtt instance, and I've gone from almost daily issues to zero in 30+ days.
Given I don't personally need this functionality anymore, that there's work to do / architectural concerns, and no stampede of users also asking for this, I'm going to close this out. Perhaps that will change if my network starts acting up again. Thanks for the feedback in the PRs!