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
How to Generate a Bullet Proof Backup #153
Comments
Realistically, no critical portion of the backup changes other than the frame counters: $ diff 20220401_002152.json 20220411_005802.json
7c7
< "creation_time": "2022-04-01T00:21:52+00:00",
---
> "creation_time": "2022-04-11T00:58:02+00:00",
25c25
< "frame_counter": 54933583
---
> "frame_counter": 55054471 so you can get away with doing a single initial backup, another one a week later, and then see how much your frame counters increment every day. Pass double or triple the expected counter value to the restore command with
Did you do a backup/restore after it stopped working? Do you happen to have a backup?
The NVRAM backup is completely opaque: there's very little human-readable information in it since it's a raw dump of the internal structures of the stick. |
Thank you so much for your swift reply! Good to know that not all devices need to be in the backup. Regarding Nr. 2, I found this since I posted, which seems to allow to call the backup from within home assistant. The blueprint of that repository has an example of a nightly backup. They don't mention over there to disable the ZHA integration first. Maybe the toolkit works because it's still within home-assistant, so the same user of the serial port? I will try that out. Thanks for the hint regarding the frame counter!
After it stopped working I only had a backup of my
At the time of that backup I must have had ~24 actual physical devices (I have 30 now as said in my original post, but the whole corruption of the network happened as I was adding some devices I newly bought). Definitely no where near 72. Do you think the corruption could have to do with that? If you're curious I can send you the backup during the corrupted state on some private channel? |
I just re-read your question
Now that I recreated the network everything is actually working nicer than before, because I did the energy scan and found that channel 25 is way less busy than channel 15 for me. So while it was really annoying to re-pair everything, I actually have hope that I improved everything in the process. Now that everything is working again and I have 30 devices, I see this on the backup:
|
Glad it worked out for you in the end. Can you email me all of the broken and working NVRAM and network backups? I'm curious to see what broke, and if it's something that I can potentially correct in software. |
just sent via email! |
Got it, thanks. There are many child devices in the backup with bogus IEEE addresses so I suspect this is some bug with the firmware. It may have been possible to fix by deleting them from the backup and then restoring but since you're running a new network it's a moot point. In the future, the |
TL;DR: I have three questions regarding backup:
I spent my weekend re-adding 30 zigbee devices via ZHA after my SONOFF ZigBee 3.0 gave out. That was especially annoying for my SONOFF ZBMINI devices because they are in the walls behind switches and they can only be but in pairing mode by pressing the physical button on them. It all happened when I wanted to pair a new device I just bought. First I noticed that the device didn't show up when opening ZHA for inclusion mode and then I noticed that none of my existing devices respond anymore. I only got errors like this in the log, which were also reported in #124
I even had a backup of my home assistant
/config
directory, but I learned during this incident that this didn't help and that my Zigbee stick has local memory. So since then I dove deep into how I can backup my Zigbee dongle and followed these steps described inTOOLS.md
.However I did notice that not all my devices made it into the network backup. I have 30 devices (excluding the dongle) that show in my ZHA integration in the home assistant UI. But the network backup only contains 27:
What could be the reason that not all devices in the ZHA integration show up in the network backup? In the
nvram
backup under theADDRMGR
key I also see only 27 addresses filled.The
DEVICE_LIST
looks even more weird, but this might just be my lack of understanding of it.The rest of keys is all
ffff
.Can I still rely on the backup to restore everything?
Also is there a way to get the backup without disabling the ZHA integration in HA? So far I always got an error that the serial port is already in use when I tried to run the backup while the ZHA integration is running. If not, what is a good way to still automate the backup?
The text was updated successfully, but these errors were encountered: