-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit nwk event on concentratorIndCb #992
Conversation
Tests are failing due to decreasing coverage - no new failures introduced. I can update tests once I have confirmation the change itself is OK. |
Nice finding! Once tests are updated this can be merged. |
I added some comments explaining why we're mixing and matching commands and events, and added a test. My original question about collapsing the Aside, this was the first time I'd encountered "concentrator" and was having trouble finding good upstream docs for it. I think this chat does a reasonably OK job of explaining it. I totally thought it was hallucinating the https://chat.openai.com/share/2ac8ee11-31f4-48bc-9f6d-5fb3f3b3c874 |
@Koenkk Looking at this and the mentioned discussion, I'm wondering if this is the famous address conflict that you guys are seeing like this with zStack, except it has a more "generic" callback than ember and just reports as "a new route from concentrator"?
Note: That kind of problem should be entirely solvable when we implement the full ZDO spec, since we can then trigger a proper network address request by IEEE when a device gets in that state to figure out if it's really gone, or if it just changed network address and "we missed it". |
This is what zstack already does:
|
Thanks! |
I ran into another situation where zigbee2mqtt had a stale network address, similar to Koenkk/zigbee2mqtt#15874, but with https://www.zigbee2mqtt.io/devices/43076.html#enbrighten-43076 instead of the Sonoff ZBMINI.
I think this was triggered when I had circuits off as I was installing a new relay. I flipped the breakers several times in the process, so many devices were restarting over a 1 hour period.
I turned on debug logging and sniffed traffic, and saw the switch sending updates that weren't making it up the stack to zigbee2mqtt. It would respond to group broadcasts.
zigbee-herdsman/src/controller/controller.ts
Lines 632 to 638 in 0a06211
As well, I could see the device sending many route request and link status packets which seemed much higher than normal. While I could see what looked to be On / Off events triggered at the switch in Wireshark, for some reason it wasn't able to decrypt them normally.
In Herdsman, I saw that there were many messages being sent with the command
concentratorIndCb
. That data contained both the IEEE and the short address, so it seemed like a good place to check for network address changes.With this PR, the switch came back online shortly after starting zigbee2mqtt. The "Many-to-one" route requests stopped being spammed.
What I'm not sure is:
concentratorIndCb
is. So, I'm not sure if this is the right place to improve or fix this.