Switching from OpenZwave (Beta) to Zwave JS

Good idea! I tried this. I tried copying /data/cache on Z-Wave JS to /data/store on Z-Wave MQTT. Somehow I got my docker into a weird state. Now I can’t start either container. Both integrations give me errors like this.

And trying to docker rm those containers gives me another error

➜  ~ docker rm e5250bb3d7aa30c958c5276
Error response from daemon: container e5250bb3d7aa30c958c52766a0e791d9c8dee005bb5941883623df74246e0781: driver "overlay2" failed to remove root filesystem: unlinkat /mnt/data/docker/overlay2/37be8d6c285a8febf7cb34c3cfdeedbcea89acabcfa8fc26bb3b779c7acbb874/merged: device or resource busy

No idea how copying files could have gotten me into this state, especially for the Z-Wave JS container where I just copied files from the container. :man_shrugging:Going to bail and just restore a snapshot.

Update 1: I’ve restored a snapshot and I’m back up and running with OpenZWave. Rebooting the host and then docker rm-ing those containers solved the above issue for me. Still a mystery how I got into that state!

Update 2: I was able to correctly copy the cache files out of the Z-Wave JS docker container and into the Z-Wave JS MQTT docker container using HassOS root SSH. The files will be somewhere like: /mnt/data/supervisor/addons/data/a0d7b954_zwavejs2mqtt/store/. Thanks @petro! This method is not for the faint of heart, but will save you the hassle of waking up all your battery nodes when switching between the two integrations. I wonder if you could make an OpenZWave zwcfg* converter that generates these files.

Update 3: The same issue above happened again – I wasn’t able to stop/start the Z-Wave JS MQTT container after copying in the files. I think it was due to using docker exec -it [CONTAINER] bash to look at the files before copying. Now using the HassOS root ssh I’m able to use the following to copy configs back and forth between containers. To go from Z-Wave JS MQTT to Z-Wave JS core:

cp /mnt/data/supervisor/addons/data/a0d7b954_zwavejs2mqtt/store/[HOME ID HEX]* /mnt/data/supervisor/addons/data/core_zwave_js/cache/

And to go from Z-Wave JS core to Z-Wave JS MQTT:

cp /mnt/data/supervisor/addons/data/core_zwave_js/cache/[HOME ID HEX]* /mnt/data/supervisor/addons/data/a0d7b954_zwavejs2mqtt/store/

You will need to change the a0d7b954 and the [HOME ID HEX] parts to match what you see on your system.

3 Likes

I wonder if there’s a way to write a python script to rename entities automatically. Then you could have a list of entities you could automatically rename to suffix with ozw or zjs to be able to easily switch back and forth between OZW and ZJS. Once you put together the list, then you could quickly switch between ZJS and OZW.

1 Like

Hi @petro, thanks for producing the guide - very helpful.

In step 8 of the guide you say:

How do I “just wake them up”?

Thanks

That depends on the device. You can wait for them to naturally wake up (could take hours or days) or you can force them to wake up by going through the devices manual and finding out how to wake it up.

For most of my devices, I ‘just remove the battery cover’.

I made a script to semi-automatically rename ZWJS entities to match what they were in OZW: ZWaveJS Migration Script. It’s probably overkill, but maybe will save future people some time.

I did the same a while ago. But I have problem that Zwave JS start itself again and again after every HA core restart regardless fact that it’s disabled in settings. Even more - I have uninstalled this addon, but it installs itself back :open_mouth:
Do you have same problem? I don’t know how to solve it.

You have to reconfigure the integration

You mean by delete and install back?

I believe that’s the only way to do it atm.

OK, thanks. I will try. Hopefully, devices remains untouched.

If you renamed things, that will be lost and you’ll have to rename again. Otherwise the devices themselves should be the same.

1 Like

Hi Petro,

Nice tutor! Can you tell me how to do follow and will there be a improvement to do:

  1. Im using Zwave2MQTT, fast, stable, when HA restart Zwave is still running
  2. There is now ZwaveJS2MQTT, is this better, faster, any other things to do a migration?
  3. If its better to migrate how to do this:
  • a) Install Zwave2JSMQTT Add-on.
  • b) Write down all settings inside the WebGUI, or export settings?
  • c) Stop Zwave2MQTT, disbals auto start, disable watchdog
  • d) Start ZwaveJS2MQTT, import settings or fill in all settings I write down?
  • e) Will I get the whole network back as it is? Will all entities be replaced by new entities?

Maybe you can help me out with this?

Sorry, I’ve never used Zwave2MQTT so I’m not sure what settings it has.

If you’re not running hass.io and don’t have the community add ons, how do you run this? I don’t see a docker container listed here and don’t see it in HACS.

You need to run the zwavejs2mqtt docker container.

And it’s no longer hassio - it’s now HassOS.

Just wanted to say I followed this and it went smoothly (mostly).

It found all my nodes and brought them in, even a couple battery ones I had to mess with to get them to wake up. However, I do have a lingering couple of problems.

1 - I have a garage door tilt sensor that it talks to, but doesn’t identify the model or the manufacturer (Ecolink TILT-ZWAVE2.5-ECO in this case). It gets all the entities from the sensor, but has the main one wrong (as it, it thinks it being open is a checkmark and being closed is an empty circle)

2 - I have Zooz switches all over the house. It identifies most of them, but some it doesn’t want to show the vendor/model. It does have all the Z-Wave config values though.

So I guess my question is how to get JS Z-Wave to properly find the make/model of these devices that are in its database. Re-interview doesn’t do it (so far)

Hi, probably easy to find if you know where to look. If I move over to zwavjs and I currently use for some devices the “ozw.scene_activated” to catch certain button presses in node-red… will that be a lot to change? And how?

customize it if the binary_sensor device class is not to your liking.

You’d have to reinterview it, if you’re using ZwaveJS2MQTT you can do this easily. Last I checked, this does not exist for the official ZwaveJS addon. If the device contains all the information, the juice isn’t worth the squeeze. Just keep it as is because all you gain is a new unqiue_id and a manufacturer.

It’s covered in the docs… you should know this by now :wink: