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.