-
Notifications
You must be signed in to change notification settings - Fork 41
Treat messages from unknown devices as implicit joins and discover IEEE addresses #73
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #73 +/- ##
==========================================
+ Coverage 98.42% 98.44% +0.01%
==========================================
Files 43 44 +1
Lines 3681 3719 +38
==========================================
+ Hits 3623 3661 +38
Misses 58 58
Continue to review full report at Codecov.
|
Combining this change with the zigpy initialization refactor (zigpy/zigpy#744) let me import most of my network into a fresh HA installation in like 30-40s after "rebooting" my house at the circuit breaker: Aqara quick initialization also works quite well, all of my motion and temperature sensors were instantly initialized after poking the button. In the future it would be interesting to see if the zigpy topology scanner (or maybe some broadcast that every single device can reply to?) can be used to speed this up or automate it, for installations where physically cutting power isn't simple. |
Interesting if the router is "rejoining" and ZHA is doing one topography scan and reading the neighbor table of the router then you is getting the coordinator is getting the address of the SED the router is having. The next is then the SED is doing one check in or reporting attribute (if the coordinator have the same IEEE) and the coordinator can configuring them. By the way as normal great work done !!!!! |
If we implement this at in zigpy, then in ZNP you would need to implement only ZDO_IeeeAddr_req handler? |
Z-Stack for some reason omits the |
I was thinking about sending the request directly to the unknown device, since the device just messaged and is listening for the incoming traffic. Alternatively, could just define a method in zigpy and leave to the radio lib to implement it. |
Yeah, that's what my current implementation does. I think it's better to start using more ZDO commands from zigpy. Should allow for energy scanning and stuff like this to be implemented in zigpy instead of duplicated in every radio library. |
86c0e3a
to
ca4572e
Compare
Devices that somehow manage to change their NWK address without notifying the coordinator are impossible to contact. Instead of dropping packets from them, we can discover their IEEE address and either update the NWK in zigpy's database or treat the device as a new join.
This allows for ZHA to be started up with a completely "unknown" network and for it to pick up devices as they're used.