-
Notifications
You must be signed in to change notification settings - Fork 12
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 new radio API #2
Conversation
Hi,
Any idea whats going wrong? |
Make sure you're using a virtualenv. I believe Or |
Thanks puddly, bang on the money! virtualenv did the trick. I hadnt figured I needed to run that way as I was not on my HomeAssistant box but a standalone ubuntu Cheers |
I would also like to switch from a ConBee II to a Sonoff 3 plus with your tool, but the setup fails ... I get the following errors after (I tried to) installed wheel Failed building wheel for zigpy But at the end: Did the installation work anyway? Also I'm still struggeling with the next step: Using "lsusb" I get this info about my conbee II: Where do I get the remaining information for the backup command? Sorry, I'm pretty new to this and I'm still learning... |
You can ignore the wheel errors, those are just saying that Python didn't cache Run |
Thanks! :) Now the backup command results in different errors, stating that some distributions are missing: bellows 0.30.0.dev0 requires click-log>=0.2.1, which is not installed. I already manually installed: scapy, click and coloredlogs, the current error is: But I tried installing python-voluptuous with no effect. I'm afraid I missed something at the beginning. |
This may be my mistake, I just updated the $ pip install --upgrade --no-deps --force-reinstall ... Try just running: $ pip install ... The dependencies should then be correctly installed. |
Thanks Putty, now everything works as intended :) I had a friend of mine help me undo the changes I made yesterday and after that your guide worked very well. Some feedback from him (to make it more fool proof):
But thanks alot again for this really useful tool :) |
@toot @connoleg would either of you mind testing out something with your Conbee? They need to be relatively running recent firmware (mid 2020 or newer) for this to work: CONBEE=/dev/serial/by-id/...
zigpy -vv radio deconz $CONBEE backup conbee1.json
# Edit `conbee1.json` and change `network_key.frame_counter` to something bigger by adding a `0` to the end
zigpy -vv radio deconz $CONBEE restore conbee1.json
# Unplug the Conbee and plug it back in (very important!)
zigpy -vv radio deconz $CONBEE backup conbee2.json
# Compare the two files
diff conbee1.json conbee2.json The contents of |
I’m trying to migrate from a Raspberry Pi with RaspBee II to a proper server with the ConBee II USB dongle instead. I believe I have followed all the proper steps from the top of this issue, but getting this error when trying to backup the RaspBee:
Am I doing something wrong? I’m not 100% sure that the |
|
Oof, so much for "which I know is the RaspBee"... Thanks, you are right, that looks like the correct device. And I get what appears to be promising output with no errors:
However, the backup file is very short and shows no devices ( {
"metadata": {
"version": 1,
"format": "zigpy/open-coordinator-backup",
"source": "zigpy-cli@0.0.1",
"internal": {
"node": {
"ieee": "00212effff08fdfe",
"nwk": "0000",
"type": "coordinator"
},
"network": {
"tc_link_key": {
"key": "5a69674265________69616e63653039",
"frame_counter": 0
},
"tc_address": "00212effff08fdfe",
"nwk_manager": "0000"
},
"link_key_seqs": {}
}
},
"stack_specific": {},
"coordinator_ieee": "00212effff08fdfe",
"pan_id": "324b",
"extended_pan_id": "00212effff08fdfe",
"nwk_update_id": 0,
"security_level": 5,
"channel": 15,
"channel_mask": [
15
],
"network_key": {
"key": "af912adb53c0fe________134b7796c9",
"sequence_number": 0,
"frame_counter": 173782
},
"devices": []
} In HA I have 14 devices and 30 entities, which I successfully control via the RaspBee, so something’s still off: Any ideas what might cause the device list to be empty? I have disabled zha in HA while doing this. If I try to enable it I get different errors when trying to create the backup (about possible simultaneous access etc., which makes sense). |
The coordinator normally doesn't keep track of any devices that aren't its direct children, but even that information isn't critical. The Conbee however expects the program controlling it to load in the child table at runtime since it'll be stored in the program's database. This is normal. After you restore to the Conbee, can you unplug it, plug it back in, and take a second backup of it and post it here? |
@puddly Sorry if I’m being dense, but are you saying that the devices don’t need to be listed in the backup file, and are instead "mapped to" the RaspBee/ConBee through other means that are saved in the HA config/storage files? In other words, the zigbee backup file I have now should actually get me the devices I need if paired with a full HA backup? I’m also unclear on what’s the best procedure to do the restore. Should I plug the ConBee into the Pi and do the restore there, then move the already restored ConBee to my Ubuntu server? Or plug the ConBee into the Ubuntu server, copy the backup file and then do the restore from there? Or doesn’t it matter? I’ll post the info you want once I have successfully performed the restore. Thanks for helping out, really appreciate it! |
Correct, there will be no It doesn't matter where you do the restore. Since you already have this virtual environment up and running, it's easiest to do it wherever you did the Raspbee backup. |
@puddly Sweet, looks like I was able to restore to the ConBee now. Will try to get it up and running on the new server shortly. Thanks again! I followed the instructions you gave a few comments back about increasing the
Let me know if your need anything else! |
Looks like your Conbee is running an old firmware and doesn't support setting the frame counter. The one in your Raspbee backup was Can you upgrade it to the latest firmware and re-run the migration from the Raspbee again? Some devices are strict about the frame counter rolling back and may not respond to commands sent from the Conbee. |
Unfortunately I've got my Conbee not around at the moment, I'm trying to convince a friend from HA and borrowed him mine :D |
Done and fixed thank you! Can confirm I was able to move from a Conbee II to Sonoff Zigbee Dongle 👍 |
I'm not entirely sure what might have gone wrong, but I can't seem to get this owrking. I am running in a virtual environment, but I can not get the commands to work. After running pip install... I get the following error at the end:
And then trying to run Edit: I did not get this working on my raspberry pi running Home assistant OS but I tried from another linux machine and it worked flawlessly, Thank you very much for the instructions. |
great work @puddly !!! huge thanks.. Once installed, it was a smooth move from deconz to a sonoff zigbee stick... |
Just migrated from a raspbee to a conbee without problems |
I need to do the same/similar - raspbi on ZHA to sonoff dongle on ZHA. I've read through the chain but if you're interested we could do a clean procedure and test it for others to use? |
Originally posted by @pipiche38 in zigpy/zigpy-zigate#117 (comment)
@doudz Do you have any input in regards to achieving ZiGate Zigbee network backup via this network backup/restore utility? |
@puddly - I'm fairly certain this worked okay for me on Ubuntu 22.04 but I am unable to locate the ezsp.json file. Where is that saved? Thank you! |
Suggest that now that this is merged (i.e. closed as merged) maybe instead post any additional questions as new issues https://github.com/zigpy/zigpy-cli/issues or discussions https://github.com/zigpy/zigpy-cli/discussions or ? |
@puddly If this is obvious sorry, I do not really understand yet how to use this tool but my question is this- I want to move my Zigbee2Mqtt network currently on Rpi4 w/ Sonoff 3.0 dongle to a a Home assistant Yellow and keep it on Z2M is that possible with this tool ( or any other way) Thanks |
@asriva13 Have you first upgraded to the latest deconz firmware on your ConBee/RaspBee adapter? For procedure step reference see example(s): 1. In the deCONZ app, under Settings > Gateway, check the firmware version. It should be version 26720700 or newer.
2. If the version is not up-to-date, select Update to 26720700. Also see: |
This change introduces a network backup/restore utility for any adapter implementing the new radio API:
The following adapters also implement the new radio API but their firmware does not allow much network information to be read, making this form of migration impossible:
Instructions
You'll need access to a Python environment. zigpy-znp has documentation that describes how to do this for every common platform.
Once that's done, edit
/config/.storage/core.config_entries
(take a backup of the file first!) and change the coordinator'spath
to the new radio's/dev/serial/by-id/...
path. If you're switching to a CC2652, make sure to delete theflow_control
key and set thebaudrate
to115200
.