HA Migration from Docker to HAOS & Backup

Glad you got it working, but I have a few comments/suggestions that may help others that read this.

Before migrating, open up your existing Z-Wave JS UI page and click the green Export button under Settings.

This next backup might be redundant, but I figured better safe than sorry. Go back to your list of nodes and click the hamburger button > Advanced Actions.

The first backup is important because it has your Security keys. The latter is not redundant, it includes the node names and locations you’ve set in ZUI (not included in settings), which is nice to have. I don’t see any mention of backing up and restoring the driver cache, do you not have any battery nodes that required manual re-interviews?

You can download all relevant files at one time from the Store page using the Backup function. It’s a ZIP file which includes everything you need to restore smoothly to a new install of ZUI:

  1. Security keys from settings
  2. Names and locations of nodes
  3. Driver cache (*.jsonl files)

The first is important because securely included nodes won’t work without security keys. The last is also very helpful because restoring these can save you a lot of time, you won’t need to re-interview your nodes.

In the case of a container restore I would recommend importing old settings, but for migrating to the add-on I would not, unless you really know what you are doing. Doing so may import some settings that conflict with the add-on configuration, which is already setup correctly for integration with HA by default. For example, you may include things like a no longer valid USB path, unnecessary port or host changes to the websocket server, or TLS settings that will break the add-on as it supports TLS natively. For those reasons I would just re-configure manually.

First import cache files and node names:

  1. Import the *.jsonl files from the backup by uploading them into the store directory.
  2. Import the nodes.json file for names and locations as mentioned

Then configure the settings:

  1. Copy your security keys from the backup into the add-on settings
  2. Pick the USB device path from the pull down menu
  3. Turn on any other settings you prefer like logging. Do not change websocket host or port!
  4. Don’t forget to Save, which will trigger a restart.

I’d also recommend disabling the Z-Wave integration before anything, so it’s not trying to connect while you make changes.

You can get an idea of the process by looking at my add-on migration guide: https://community.home-assistant.io/t/switching-z-wave-js-addons-with-minimal-downtime-z-wave-js-official-to-z-wave-js-ui-community/409904. It’s going to have several similarities, especially in regards to the driver cache restoration.

For example: ws://abcd1234-zwavejs2mqtt:3000.

It seems people think this is a unique URL. In order to not propagate this idea, the URL is the same for everyone that uses this add-on, ws://a0d7b954-zwavejs2mqtt:3000, it’s not a secret. You’ll find the URL explicitly given in the step by step instructions of the add-on installation instructions, so just save time following those.

1 Like