Secondary Z-Wave controller and two HASS instances

I would like to have some kind of redundancy. I have my configuration in Git, two machines I can run HASS on, and two UZB sticks. The only thing missing is to have the same Z-wave configuration in both sticks.

Has anyone experience with including one UZB (or similar) as a secondary controller? Would it automatically sync new nodes and so on?

You can only pair devices with one stick at a time. That said, Aeotec has backup software that can backup device pairing information and restore it to another stick. I don’t know what issues that might present, but my guess would be that you are still limited to pairing devices to one stick at a time. In any event, you wouldn’t be able to build any failover type redundancy.

Overall, I thinking that true redundancy isn’t possible with HA. Much depends on the Z-Wave controllers’ implemented feature sets. OpenZWave (what HA uses) doesn’t support it but some of the higher end (mostly hardware) controllers support “primary controller shift”, which is probably what you’re seeking.

That said, OpenZWave does support multiple controllers[1] but that requires the junior controller to join the main controller’s network. This is how you can have hand-held lighting controllers in networks controlled by larger home automation controllers. However, without the main controller’s network, you’d need to manually point each device at the other controller (i.e., create a new network).

If continuity is important, (assuming that you’re using Raspberry Pi’s) it may be worthwhile to put HA on something other than a RPi (even if it’s just on a Synology), then add in battery and file storage backup. I’ve found that cheap SD cards burn out in roughly 2 years of 24x7 operation.

If continuity is important then people should be taking (and testing) regular backups :wink:

1 Like

I have found out that UZB may be backed up/restored using z-wave.me’s z-way software. However, I haven’t got it working yet.

Tinkerer: this is exactly what I want to do - either by exporting/importing the Z-wave configuration on the hardware controller, or by having a “live backup” using redundancy.

Your configuration glob is the most important part of HA. I have moved HA to different platforms and different installation methods and all works as it should once I have restored the configuration. Considering it may take an hour for a fresh install, it isn’t that hard to have some level of continuity. If you have two running instance today, as long as you keep them updated, you should have no problem swapping sticks and being back in business. A stick failure would require backing up and restoring the sticks on some manual schedule.

I have all configuration in Git, the only thing missing is the Z-wave hardware parameters. Re-including devices is quite a job, so I would like to either back up the stick, or having them in sync all the time by using a secondary controller (if that is possible).

There can only be one node 1 master controller. Backing up and restoring a controller to a new controller would require that the new controller “renegotiate” with each paired device to replace the old node 1 signature. That could take some minutes, certainly, if you had lots of devices. In any case, you would not be able to have a simple failover situation. I personally would not want to have the secondary device running all the time since it would be trying to talk to my already paired devices.
Over the years I have had so many duplicate setups for various things “just in case” but find out later, that I end up tossing out lots of still in the box hardware. This might be one thing worth reconsidering.

I’d bet you could do something in vmware, but even if you could it would only failover if the vm was shut down for some reason, which is probably pretty rare.

Did anybody get anywhere with this? I’d love to have a secondary controller for redundancy in a second Pi for when I’m rebooting the main Pi.

There is NO way to have zwave devices paired to two different sticks. What you want to do isn’t possible.

OK, then I have misunderstood. I thought that you could have a master controller on the network and then a secondary controller that would be slightly impared in that it wouldn’t receive messages from the Z-Wave network but only could send signals to it.

Techncially @zarthan is correct, in that you don’t add devices to the secondary. You can however promote a secondary to a primary if the primary fails. Home Assistant doesn’t have any support for that though…

I have a dual Z-wave stack working. Not simple and a lot of things are troublesome but I have 2 Raspberry Pi one with a Razberry board and other with a UZB.

The Razberry works as a primary controller and the UZB was asked to join the original network of the Razberry using Z-way-server. You can also use the Z-way server to switch controllers as well though be careful if you add the controllers the other way round, you will lose all your pairings.

Using the z-way server is important as there is no way in HA to add the secondary controller as a node to the primary. Be sure to stop and disable the zbw and z-way-server services once you are done.

Once both Z-wave sticks are paired (the second one added as a node to the primary controller), I setup HA fresh on that pi and enabled Z-wave. To start with, it would find all the nodes but the nodes do not send any information to the secondary controller unless you activate them by triple clicking. This is different for mains powered devices as they were recognised by OZW depending on their polling interval.

I then copied the Node information from the zwcfg***.xml from the primary controller to the secondary controller (section after the Node 1 definition right to the end of file) in the zwcfg***.xml of the second HA box. This file is only created once you start and stop Z-wave or restart the HA once the first Z-wave polling is done.
I also copied across the core.entity_registry from the primary to the secondary and started the HA on the second box.

It now recognises all the Z-wave devices with the names and entities in the original however, it does not pull any name or entity information from either the primary controller or the device (battery powered) so the above process will need to be repeated whenever a new device is added. Mains powered devices however do get their information across (Everpring, Fibaro and TKB Power plugs)

Not the most ideal process but it works. Also note that since the second controller does not project itself as a controller to the z-wave devices, it does not seem to get all entity messages across but since it was only a couple of days ago I set it up, so it is still work in progress. Will update here when I have more information.

Battery powered devices will show up as cached in the secondary HA but probably the heal might fix it. I cannot run the heal command as I have custom named all entities in the zwcfg***.xml and heal seems to reset the names and messes everything up.

1 Like

I believe you can have any number of secondary controllers on a Z-Wave network.

For example, controllers such as key fobs can be set up to directly control other Z-Wave devices.

I also believe there is a general Z-Wave method for transferring information from one controller at another - as well as assigning primary controller status.

(Remembering that controllers keep information about the devices they know about.)
I have two Aeotec Z-Wave USB sticks, and have transferred controller information from one to the other, as well as assigned secondary status to the latter.

Unfortunately, I do not believe it is possible to do this within Home Assistant as these types of controller functions are not provided in the UI. (They are available in the control panel that is part of the software used by Home Assistant, but I don’t know how to run/install it. As a Raspberry Pi user, my solution has been to create a Domoticz instance on a separate SD card.)