Thank you for the guide.
Im guessing it also supports the razberry controller?
Thank you for the guide.
@petro Thanks for the guide. It looks like my transition was successful. Here are some comments:
For step 7 “wait for it to fully start up”, should we be looking for this in the log?
18:16:48.988 CNTRLR All nodes are ready to be used
for step 8, I am not sure how to find unknown devices. I searched the log for ‘unknown’ and did not find any. Is that the correct method?
Last step - maybe delete the OZW add-on?
FYI, in step 5, I initially pasted in the device and key after choosing ‘edit in yaml’. The reason I did that is copying (from OZW) was easier in yaml - did not see how to copy in UI.
It turns out both device and key are the same as the old integration and the formatting is the same (from what I gather).
They’ll show up as unknown in the entity_id
You don’t have to if you don’t want to, it’s optional.
yes it’s the same format
Thanks for all your great work here @petro getting this documented. How did you get to these cache files? Are you on HassOS? Looking at
docker inspect in the ssh terminal, it looks like
/data for Z-Wave JS is mounted from
/mnt/data/supervisor/addons/data/core_zwave_js but the SSH addon only exposes
/mnt/data/supervisor/addons/local over ssh, so I’m not able to access these files over SSH/SCP. Any hints on how to get these files on HassOS?
Sorry, I don’t use HassOS so I don’t know how to get them. If you have the ability to run docker commands from HassOS you can use the command to copy a file from a container. https://stackoverflow.com/questions/22907231/how-to-copy-files-from-host-to-docker-container
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. 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.
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
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.
Hi @petro, thanks for producing the guide - very helpful.
In step 8 of the guide you say:
How do I “just wake them up”?
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
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.
Nice tutor! Can you tell me how to do follow and will there be a improvement to do:
- Im using Zwave2MQTT, fast, stable, when HA restart Zwave is still running
- There is now ZwaveJS2MQTT, is this better, faster, any other things to do a migration?
- 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.