How to back up Sonoff 26/52 P Coordinator as a bsckup

Title says it all. One day my Sonoff 3.0 26/52P ZigBee stick will die. I can back up HA configuration to my NAS but my understanding is that the network info for ZHA is on the stick and is not saved to disk like with the z-wave sticks.

So how do you prepare for the inevitable?

Use Zigpy-tools

I have heard of it, I think I actually installed it on my Linux machine but not really clear on how to use it.

Is there someone here who can simply share a command to backup and restore coordinator data?

It seems that it’s quite a work in progress and the last thing I want to do is to actually damage my coordinator and wipe out the data by using the tool improperly.

From the docs :

Network backup

A high-level and stack-agnostic backup of your device’s network data using the Open Coordinator Backup Format allows you to snapshot the device state and move your network between any supported hardware and firmware versions.

$ python -m zigpy_znp.tools.network_backup /dev/serial/by-id/old_radio -o network_backup.json
$ python -m zigpy_znp.tools.network_restore /dev/serial/by-id/new_radio -i network_backup.json

Thank you so much.

Started to do this today, but was a bit confused and figured I’d better stop before I really messed something up. I’m using HAOS. I’m not using a Docker install but I perhaps Docker underlies HAOS.

The instructions for running Zigpy on HAOS says:

1. Install community "SSH & Web Terminal" addon (not the official "Terminal & SSH" addon!) and configure your credentials. Note: the addon will fail to start if you use an insecure password so it's better to configure it with public key authentication.

2. Disable "Protection mode" in the addon's configuration.

3. At the shell, log into the main Home Assistant Docker container:
 
 **docker exec -it homeassistant bash**

4. Since ZHA is still using your Zigbee radio, you must temporarily *disable* the ZHA integration before continuing. This is done with the three-dot dropdown menu in the "Integrations" section of the Home Assistant web UI.

First, I don’t see protection mode in the SSH & Web Terminal" addon configuration.

Second, am I really supposed to run docker exec -it homeassistant bash from the SSH command line in HAOS, and THEN after doing that, run:

python -m zigpy_znp.tools.network_backup /dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0 network_backup.json

There is also this :

483fab5f02a1090e15dfe814bcb623d0605d434f_2_515x500

So no need for zigpy? That’s great. Thank you.