Channel Change API #1185
Replies: 5 comments 1 reply
-
Good timing! zigpy-cli has had something similar for a while now for testing, relying on per-radio specialization where necessary (really only ZNP).
|
Beta Was this translation helpful? Give feedback.
-
FYI, for reference, a couple of previous questions and discussions about Zigbee channel changing can be found in these other four requests:
@puddly Was your idea also to have an easy UI in ZHA to allow users to change Zigbee channel later in an already formed Zigbee network? That is, at least from an end-users point-of-view have a UI option to change the Zigbee channel without performing backup and restore?
As mentioned in those other linked discussions/requests, some other Zigbee implementations allow changing the Zigbee channel on-the-fly. I think allowing changing the Zigbee channel on an existing already formed Zigbee network via ZHA UI would be awesome, though such a feature would of course need to come with a disclaimer/warning about the fact that not only will some devices probably need to be manually power-cycled if they do not reconnect automatically after a while but also provide information up front that there is a potential risk that some devices might not reconnect at all and if so those devices will have to be manually re-paired/re-joined. @pipiche38 You mentioned that a feature for this has been implemented in your ZigbeeforDomoticz plugin and at least works well with devices that are fully Zigbee 3.0 compliant:
|
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for getting back to me so quickly and in detail! This is all over the place now, sorry: I will take a look at the ZDO commands to implement a base command in zigpy and, if I have some time left, I will take a look at HA frontend development, too. Tbh, if you already have channel changes on your radar, you might be quicker just copying whatever seems worth copying - please just let me know if you would prefer that. Regarding # 4: All ~80 routers in my network perfectly switched channel with the "broadcast" 0xFFFB address. It would be awesome, if end devices could be switched over too. Maybe we can split up the request into 2 different functions.
Then, a channel change could look somewhat like this:
I was shortly thinking about sending the request to the routers one by one, but I think the broadcast is the better approach. |
Beta Was this translation helpful? Give feedback.
-
Some interesting reading then rolling the network key in 3.4: an1233-zigbee-security.pdf. Its looks unnicast is not recommended if you not dont have special requirements and doing broadcast and waiting before roiling the network key is the normal way to doing it. |
Beta Was this translation helpful? Give feedback.
-
Is now implemented. Thanks, puddly! |
Beta Was this translation helpful? Give feedback.
-
Hi!
I was having channel noise issues and looked into changing the channel of my network, which at the moment does not seem to be possible, so I spent some time gathering information and came up with this procedure:
How to change the channel (no UI yet)
(await hassConnection).conn.sendMessage({"id": 99999, "type": "zha/channel_change", "channel": 25})
After these steps my coordinator and all routers / powered devices where on the new channel (15->25)
Battery powered devices behaved differently. My Philips Hue remote noticed the channel change by itself. All my Xiaomi Aqara sensors (temp, window/door, motion) needed a single click on the reset button (no re-join, which would be a long click). Other devices like Tuya Remotes, and other motion sensors had to be re-joined.
All in all I still believe this API could be a valuable contribution, as I did not have to re-join my 80+ lights/switches/plugs.
I am hoping for comments/help on:
Any other feedback and help is appretiated
Code:
Zigpy ZNP
https://github.com/dumpfheimer/zigpy-znp/tree/dumpfheimer/channel-change
Zigpy
https://github.com/dumpfheimer/zigpy/tree/dumpfheimer/channel-change
Home Assistant
https://github.com/dumpfheimer/core/tree/dumpfheimer/zha-channel-change
Beta Was this translation helpful? Give feedback.
All reactions