Ok, I’m doing something wrong. Where are you getting that control panel? I have no option to open a web UI…
Ah, sorry, I was little quick. I’m using zwavejs2mqtt, which also has the zwave-js-server. We simply just turned off the MQTT-feature and enabled the WS-server. HA connects to the WS server.
Many of us is using this now, since the UI in HA is still in early development and these features is not implemented yet. To be able to make edits you’ll need zwavejs2mqtt.
I dont use the community addons (I use Snap) but I think you’ll find a method in their docs.
Then log into the web UI, go to settings and set the path to your device, the network key, disable MQTT gateway and enable WS-server under the Home Assistant tab.
Great, this is good to know. So should I remove zwavejs and change it out for zwavejs2mqtt instead or do both of them run in parallel? I’m still a little confused as to the difference between these 2
No, only one instance can operate on the zwave dongle at a time. And Zwavejs2mqtt is already shipped with zwavejs, so by installing zwavejs2mqtt you’ll get zwavejs.
This is my settings. Remember to deactivate the MQTT gateway and enable the WS-server. And if everything works fine, you shouldn’t need those verbose debug settings.
I do understand that this sound a bit confusing… But I guess by time everything settles!
you need to remove (or disable) the zwavejs add-on before you run the zwavejs2mqtt add-on.
you still need the zwavejs integration for either to work.
The control panel isn’t in HA. it’s in the zwave2mqtt add-on.
Thank you for the guide.
Im guessing it also supports the razberry controller?
@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 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.
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
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.