-
Notifications
You must be signed in to change notification settings - Fork 18
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
Implement the new zigpy radio API #117
Conversation
Zigpy will be migrating to the simpler radio API in the very near future so it would be great if we can merge the new features in https://github.com/zigbeefordomoticz/zigpy-zigate back into zigpy/zigpy-zigate. ZHA users will definitely benefit from broadcast support, since zigpy can't currently send a permit broadcast to all routers. |
I give a try but it didn't work.
And that is not my part. Will see how to work on that except if you have any idea ... |
Zigpy was updated too. You will need to install modified version of zigpy and zigpy-znp to test it: # May need to uninstall zigpy-znp, zigpy, and zigpy-zigate first
pip install \
git+https://github.com/puddly/zigpy.git@puddly/new-radio-settings-api \
git+https://github.com/puddly/zigpy-znp.git@puddly/new-radio-settings-api \
git+https://github.com/puddly/zigpy-zigate.git@puddly/new-radio-api |
Ok. I'll see what we can do, because it is breaking what we have done on fork() this will not be an easy step. |
@fairecasoimeme Do you know any ZiGate users of Home Assistant's ZHA integration (or the Jeedom plugin) who could test this? @zoic21 Do you know any ZiGate users of Jeedom Official Zigbee Plugin who could test modified versions of zigpy and zigpy-znp? As per #116 and zigpy/zigpy#880 there is currently no active developers or testers of https://github.com/zigpy/zigpy-zigate today.
|
Hi, I can test the combination of zigate usb v1 and home assistant. Installed in docker on raspi4… just need some description how to do it and how to roll back if not working well… |
What about bellows ? |
It's implemented as well: zigpy/bellows#445. See zigpy/zigpy-cli#2 for links to PRs for all of the other radio libraries. The only change is adding The API is provisional so if you think it needs to be changed, this would be the time to make those changes relating to network formation (or maybe adding |
Will setting extendedPanId will also be integrated ?
As this is key got the legacy wiser devices
Envoyé de mon iPhone
… Le 12 févr. 2022 à 18:43, puddly ***@***.***> a écrit :
It's implemented as well: zigpy/bellows#445. See zigpy/zigpy-cli#2 for links to PRs for all of the other radio libraries.
The only change is adding start_network and disconnect, and then moving high-level network formation code into zigpy so radios don't have to implement form_network directly. Everything else stays the same.
The API is provisional so if you think it needs to be changed, this would be the time to make those changes relating to network formation (or maybe adding set_tx_power and set_led as standard methods?).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.
|
This should in theory already be possible but I have not tested it with zigate: # This is already done when the network is started
await self.load_network_info()
await self.write_network_info(
node_info=self.node_info,
network_info=self.network_info.replace(
extended_pan_id=zigpy.types.EUI64.convert("aa:bb:cc:dd:11:22:33:44")
),
) It is expected to work with any radio library implementing the new API. |
So I'm afraid that I didn't understand your PR, and as your PR cannot be easily merged with our fork, I'll see how do it later when free time. |
Many tests are failing, could you please fix your code or fix tests ? |
This is a draft PR that makes zigpy-zigate compatible with the changes in zigpy/zigpy#848. All tests pass when the above branch of zigpy is installed. |
For information, I just get a spare Rpi 3, I will set up a permanent test platform for HA + zigate (with pizigate) |
Didn’t you have the possibility to keep compatibility with the old API ? This would have provided a smooth transition and especially as you change the name of the API.
Envoyé de mon iPhone
… Le 13 févr. 2022 à 08:07, puddly ***@***.***> a écrit :
This is a draft PR that makes zigpy-zigate compatible with the changes in zigpy/zigpy#848. All tests pass when the above branch of zigpy is installed.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
What's incompatible? The only breaking change is That being said, it's a draft PR. If you have concrete suggestions for changes before I merge the zigpy PR, let me know. |
Basically my point is can I still use the old-fashion radio API, when you’ll release zigpy (which work with the new one )
… On 13 Feb 2022, at 17:32, puddly ***@***.***> wrote:
What's incompatible? The only breaking change is app.pan_id and similar properties becoming app.state.network_info.pan_id and pre_shutdown being renamed to shutdown. It's a fairly minimal change.
That being said, it's a draft PR. If you have concrete suggestions for changes before I merge the zigpy PR, let me know.
—
Reply to this email directly, view it on GitHub <#117 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXADJ2FRN7Z7RRNEEHMHQQLU27MINANCNFSM5OB4XMXQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.
|
I'm not sure I understand. Here are the exact changes:
I can re-add the properties that mimic the old network info properties like |
@Kratax FYI, a step-by-step guide is lacking but there is some indirectly related discussion about how to best test a fork in #104 The best would probably be if have the opportunity to set up a totally separate test environment with Home Assistant and ZHA on another computer (or another virtual machine) then perhaps move your ZiGate adapter saved a backup of your Zigbee network to file so have the option to restore (if you do not happen to have access to more than one ZiGate adapters) |
I guess he means that would be nice for them if I understand larger projects usually does so in order to give third-party applications using their library as dependencies a grace period. The benefit to third-party applications is that the breaking change is postponed but they still get notified that it is coming and old properties will be removed, however, the downside for upstream is that need to track deprecated changes and plan to remove them later. |
What I mean is very simple, you bring new API without breaking backward compatibility. So I just gave up, and will continue to use the old radio Api for now until someone is able to do the required changes on our side. |
Hello @puddly , Edit: removed the error |
You are correct, @fairecasoimeme sent me a ZiGate USB (thank you!) so I will be able to fully test this PR when it arrives. |
@puddly how would you like us to do for the PR ? |
@pipiche38 I'm fixing up a few problems with my changes to zigpy-zigate now that I can test it out. We can figure out a good way to merge https://github.com/zigbeefordomoticz/zigpy-zigate/ into zigpy once I can test it out with a live ZHA network. To make testing easier (and so I can implement |
great news ... thanks for the update
I have no clue, for me the firmware and NXP stack is very close and don'' have much access. Even the PDM structure is not known, and we face some corruption issue that cannot be troubleshoot. Please check with @fairecasoimeme who is the firmware provider for the ZiGate |
I'm not looking to significantly rewrite the zigpy-zigate library in this PR, only to make it compatible with the new radio API and fix whatever bugs exist that prevent a network from at least functioning. At the moment the only task left is to write unit tests for the bellows changes and to runtime test zigpy-xbee. Once that is done and the PRs are merged, we can deal with fixing zigpy-zigate's request methods. |
@puddly , I found that https://github.com/fairecasoimeme/ZiGate/blob/5a64452e3cc4f32afe217a332d0c9b1d97e17d84/ModuleRadio/Firmware/src/ZiGate/Source/ZigbeeNodeControlBridge/app_start.c#L1191 which can be interested for you as regards to a Backup/Restore solution. |
@doudz Could you make a release of zigpy-zigate incorporating this PR? Or, if you're okay with it, I can make a 0.9.0 release? I'm hoping to get the new radio library changes into HA's upcoming 2022.7.0 beta. |
Hi! |
zigpy-zigate is the last radio library remaining.
Parent issues:
@pipiche38 I do not have a ZiGate so this code is untested beyond the unit tests. They pass with the modified version of zigpy.