Hi AllesVanZelf,
could you please share how to do it, I'm not so good with linux
Thanks!
Moderator: leecollings
Hi AllesVanZelf,
There is 2 ways to run zwavejs2mqtt. One is to install the software itself and run as a service (ie systemd), the other is to follow the guidelines on the plugin page in which case you run the zwavejs2mqtt docker container (which is, what I assume, you already did).
Code: Select all
run --rm -it -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
Code: Select all
docker run --rm -it -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest --name zwavejs2mqtt --restart always
Ok, so I've got this
Code: Select all
docker run -d --name zwavejs2mqtt --restart unless-stopped -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
Code: Select all
docker ps
I miss a section about migrating from OZW to ZwaveJS.
Thanks, it works with this.heggink wrote: ↑Tuesday 24 August 2021 23:58-d means it's detached (daemon)Code: Select all
docker run -d --name zwavejs2mqtt --restart unless-stopped -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
--restart unless-stopped means it's restarted if it stops (unless you stop it)
--name means that it's given a name so you can start/stop/delete it by name
Mind you: since I don't have --rm, I need to delete the container if I want to upgrade it. Since it is normally not deleted, I can stop it (docker stop zwavejs2mqtt), start it (docker start zwavejs2mqtt), delete it (docker rm zwavejs2mqtt) and then rebuild it with the same command as above (which will then download the latest image and start it again under the zwavejs2mqtt name).
You can also see it's state with:Code: Select all
docker ps
Code: Select all
docker run -d --name zwavejs2mqtt --restart unless-stopped -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
Code: Select all
docker ps
docker stop zwavejs2mqtt
docker start zwavejs2mqtt
docker logs zwavejs2mqtt
docker restart zwavejs2mqtt
+ step 1: installationdocker stop zwavejs2mqtt
docker rm zwavejs2mqtt
Correcthestia wrote:Thanks, it works with this.heggink wrote: ↑Tuesday 24 August 2021 23:58-d means it's detached (daemon)Code: Select all
docker run -d --name zwavejs2mqtt --restart unless-stopped -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
--restart unless-stopped means it's restarted if it stops (unless you stop it)
--name means that it's given a name so you can start/stop/delete it by name
Mind you: since I don't have --rm, I need to delete the container if I want to upgrade it. Since it is normally not deleted, I can stop it (docker stop zwavejs2mqtt), start it (docker start zwavejs2mqtt), delete it (docker rm zwavejs2mqtt) and then rebuild it with the same command as above (which will then download the latest image and start it again under the zwavejs2mqtt name).
You can also see it's state with:Code: Select all
docker ps
To summarize what I've tested
1/ Installation2/ operationsCode: Select all
docker run -d --name zwavejs2mqtt --restart unless-stopped -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest
3/ upgradeCode: Select all
docker ps docker stop zwavejs2mqtt docker start zwavejs2mqtt docker logs zwavejs2mqtt docker restart zwavejs2mqtt
+ step 1: installationdocker stop zwavejs2mqtt
docker rm zwavejs2mqtt
(probably a better way with the update command)
The best way is to, before you install the plugin, name all your devices in zwavejs2mqtt. They will all then be created with that name in domoticz. I would need to check myself what happens if you change the name of an existing device in zwavejs2mqtt. Don't know really.hestia wrote:Other questions:
In which way does it work? I've set a name for a node in the control panel (ZWave To MQTT) and it didn't arrive in domoticz. Do I have to do somethings?
Where are located the ZWave To MQTT data (and other stuff). To backup them...
Perhaps something like: https://community.home-assistant.io/t/s ... qtt/276721waltervl wrote: ↑Wednesday 25 August 2021 0:30I miss a section about migrating from OZW to ZwaveJS.
What is the impact for those users? New IDX, new Names? Tips and tricks to migrate?
Some are there like issue a zwavejs save command to trigger device recreation in Domoticz. But perhaps there are more.
Code: Select all
sudo systemctl enable docker
Code: Select all
mkdir /home/pi/zwavejs2mqtt
Code: Select all
docker run -dit --restart unless-stopped --name zwave-js -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 -v /home/pi/zwavejs2mqtt:/usr/src/app/store zwavejs/zwavejs2mqtt:latest
I added quite a bit to the readme so it should be pretty close to a how to move from OZW. Let me know if this is good enough or whether anything is missing.waltervl wrote: ↑Wednesday 25 August 2021 13:42Perhaps something like: https://community.home-assistant.io/t/s ... qtt/276721waltervl wrote: ↑Wednesday 25 August 2021 0:30I miss a section about migrating from OZW to ZwaveJS.
What is the impact for those users? New IDX, new Names? Tips and tricks to migrate?
Some are there like issue a zwavejs save command to trigger device recreation in Domoticz. But perhaps there are more.
Correct. I noticed that I was using a different docker command from what was in teh README. The joys of multiple people working on the same thing . So I added a new recommended line which includes the restart of the docker container and uses persistent storage for easier backup.AllesVanZelf wrote: ↑Wednesday 25 August 2021 14:02 I was using a direct systemd service file to start zwavejs2mqtt via docker.
But this was not working well for me.
I found out that docker can start containers at boot if you enable this.
This can be done by:I created a ZwaveJS2MQTT folder in Pi's Home directory:Code: Select all
sudo systemctl enable docker
And start the zwavejs2mqtt container as:Code: Select all
mkdir /home/pi/zwavejs2mqtt
Till now this is working great and survives a reboot.Code: Select all
docker run -dit --restart unless-stopped --name zwave-js -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 -v /home/pi/zwavejs2mqtt:/usr/src/app/store zwavejs/zwavejs2mqtt:latest
I believe port 3000 is only used with Home Assistant (HA) so that would mean that HA and Grafana conflict. Since I kicked out HA again, I don't know how configurable that port is (suspect it is).
Users browsing this forum: Google [Bot] and 1 guest