Russian discussion thread

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
lanbrown
Posts: 385
Joined: 01 Jun 2021 08:06

Russian discussion thread

Post by lanbrown »

This was posted on the Russian discussion:
Hello everyone!

It is unfortunate that Zwave.me has abandoned its now "former" customers without providing them (us!) a way to migrate their networks to other devices. If you only have 2 or 3 devices, it’s no big deal—just add them to a new network, and you're all set; it doesn't take long. But if you have dozens of devices, it becomes a real problem: you have to reset each one, connect it to the new network, and restore all previous settings. Plus, you actually have to physically access each of those devices... All in all, it’s like that song lyric about a friend "dumping a bunch of problems on you"—or, to put it in a more "American" way: "nothing personal, just business."

I’m going to try to fix this shortcoming—creating, so to speak, a "swan song" for Zwave.me.

I managed to migrate from a raZberry 7 Pro (running on a Raspberry Pi 4) to Home Assistant using a ZWA-2 controller. This covers just the Z-Wave network itself—no automations. In principle, I assume these instructions will work for any Z-Wave controller connected to Home Assistant via the Zwave JS integration, provided it supports NVM backups.

The concept is simple: add the ZWA-2 as a secondary controller to the existing network, create an NVM backup (capturing the entire network), edit the backup file to replace the old Z-Way primary controller with the ZWA-2, and then load it back onto the ZWA-2. And the best part: you can't "brick" the controller with a bad NVM file—a reset will wipe it clean and restore it to its factory state.

So, here goes:

1. Create an NVM backup of the ZWA-2 while it is acting as the primary controller — `clean-primary.bin`.
This is needed to capture the correct data for the ZWA-2 specifically as a primary controller.

2. Add the ZWA-2 to the existing Z-Way network as a secondary controller. Both Z-Way and Zwave JS have a button for this function.
Make a note of the Node ID it receives — `SECONDARY_ID`.

3. Create an NVM backup of the ZWA-2 while it is acting as a secondary controller — `working-secondary.bin`. It already contains the entire existing network: its Home ID, devices, topology, the old primary, and the new secondary ZWA-2.

4. Parse both NVM files using @zwave-js/nvmedit:
Code: Select all

npx.cmd -y @zwave-js/nvmedit nvm2json --in ".\clean-primary.bin" --out ".\clean-primary.json"
npx.cmd -y @zwave-js/nvmedit nvm2json --in ".\working-secondary.bin" --out ".\working-secondary.json"
5. Create a copy of working-secondary.json named target.json and edit it.
In the controller section, replace the following with data from clean-primary.json:
nodeId
sucLastIndex
controllerConfiguration
genericDeviceClass
specificDeviceClass
commandClasses
rfConfig.nodeIdType
reservedId
Do not change:
homeId
protocolVersion
applicationVersion
lastNodeId
staticControllerNodeId
other rfConfig parameters
Set maxNodeId to the maximum Node ID remaining after removing SECONDARY_ID.
Replace the primary entry in nodes with the corresponding entry from clean-primary.json, but keep the neighbors from the old primary found in working-secondary.json.
Then:
delete nodes["SECONDARY_ID"];
remove SECONDARY_ID from all neighbor lists.
6. Assemble the new NVM:
Code: Select all

npx.cmd -y @zwave-js/nvmedit json2nvm --in ".\target.json" --out ".\target.bin" --protocolVersion 8.0.0
7. As a precaution, verify the assembled BIN: parse target.bin back into JSON and compare it with target.json.
Code: Select all

npx.cmd -y @zwave-js/nvmedit nvm2json --in ".\target.bin" --out ".\target-check.json"
The data should remain the same. Changes resulting from the specific version of nvmedit used:
protocolVersion will change from 8.0.0 to 7.19.0;
applicationVersion will change from 8.0.0 to 7.21.0;
applicationFileFormat will be removed.
This is normal.

8. Power down the old Z-Way controller—two controllers with the same Home ID and Node ID must not operate simultaneously in the same network.

9. Restore target.bin to the ZWA-2 and verify that it has become the primary controller for the old network and that the devices are accessible.

10. Perform a "Re-interview" for all devices.

11. Check the Lifeline/Association Group 1. If any devices added the SECONDARY_ID there when the ZWA-2 was added as a secondary controller, remove it. The Lifeline must remain set to the primary controller.

12. Run "Rebuild routes."

Done—the old network continues to operate on the ZWA-2 without needing to exclude and re-include devices.

If something goes wrong: disconnect the ZWA-2 and restore power to the old Z-Way controller. Since it remained unchanged, the network will revert to its original state.

Overall, I managed to do this on the first try, and I did it remotely. The trickiest part was step 8: I couldn't simply shut it down—since I was remote, I wouldn't be able to turn it back on if something went wrong, and stopping the Z-Way service doesn't cut power to the board (it keeps broadcasting). Changing the RF region to anything other than the current one helped; in my case, I switched from RU to IN. This caused the controller and the devices to stop seeing each other, and I could quickly switch it back.

I hope this helps someone!
Post Reply