Strategy to re-create a lost Z-Wave network with least effort

Hi,

I use Home Assistant OS in Virtual Machine (KVM) + Aeotec Z-Wave Gen5 stick fw 1.2 + Zwave JS + Zwave JS UI addon. About 15 Z-Wave devices (mainly roller shuter switches, thermostats - all in wall sockets, not easy to physically access).

After upgrade of firmware of the controller, all the network nodes got lost. I was not able to restore backup created by Aeotec Backup Tool before fw upgrade (Windows), neither downgrade the firmware back to v1.1. (No errors printed, yet there are no nodes on the controller.)

Now, Z-Wave JS still remembers metadata for each node number before controller upgrade hence I assume it would be usefull to include all Z-Wave devices in the same order as they were before upgrade.

Two questions:

  1. Where I can find the metadata stored by Z-Wave JS for currently non-existing nodes (so that I can find out which node number was which actual device in my home)?
  2. Including devices in the exact same order might still be troublesome - if I happen to make a mistake, I would have to factory reset the controller and start again from the beginning.
    • Is it possible to include devices in any order and then edit Z-Wave JS metadata (in database or config files) so that the old HA device names and entities will be linked to a different node number than in the original network?

Thanks for any hints.

1 Like

The linkage between the HA entity and the zwave entitiy is stored in the HA config. The files is .storage/config.entity_registry. The key is composed of your zwave home Id, the node id and the property id. When you reset a controller it generates a new home id, so even if you add the nodes in the right order the keys won’t match. I don’t know if there is a way to force a stick to a specific home id.

So this is from node 22 property 113

        "unique_id": "36199999.22-113-0-Access Control-Door state (simple).22",

The config.device_registry has the node ids

The first numeric sequence is the home Id and then this is node 6

        "identifiers": [
          [
            "zwave_js",
            "3611999999-6"
          ],
          [

What you want to do is possible with some careful editing of that file.

It would be easier to do if you can turn turn HA off while adding the nodes in. As when HA is running it’ll see the new node and add it. If you can’t do that then disable the integration and restart HA.

  1. Do a global replace on the home ID.
  2. As you add each node verify the node id is the same, if so great; if not search and replace on the homeid-nodeid
1 Like

Thanks for the details and explanation, it’s usefull.

I have checked the backup files for both Z-WaveJS2MQTT addon and HA and I can find the neccessary data.

Having plugged in the upgraded Aeotec stick v1.2, all the data (related to prior Z-Wave network) got deleted from config files in both Z-WaveJS addon and HA as well.

I could possibly try to copy the config snippets from backups, replacing home id for the current one and inserting this to current configs. However, the risk I make an error somewhere is quite high, so I think I’ll give up and recreate everything from scratch :frowning:

I’ll leave it for some weekend and I’ll remember the lesson learned: do not touch fw on z-wave controller.

I have run into the same problem. I’m sick to death of z-wave, it has been a nightmare from day one. Right now my entire Aetec based system is down. Again. Time to rip out the lot and switch to Zigbee.