Page 1 of 1
zwave-js-ui installation
Posted: Thursday 08 February 2024 14:34
by pkelderman
I have a raspberry 3b, domoticz 2024.4 and for zwave I try to install zwave-js-ui. The z-wave js ui is working. In Domoticz I added mqtt autodiscovery client gateway with lan interface. It took me some time to create the docker-compose.yml file in the /opt/misquitto map. The instruction isn't very clear. It's result was that I no longer got the message "failed to connect to" in domoticz log. When clicking "setup" for mqtt auto.. I get a empty configuration. What went wrong???
Re: zwave-js-ui installation
Posted: Thursday 08 February 2024 17:06
by waltervl
Check the log files of Zwave-JS-UI, Mosquitto and Domoticz for errors, connection issues.
Check with MQTT explorer if the appropriate MQTT topics are created.
Re: zwave-js-ui installation
Posted: Thursday 08 February 2024 17:12
by waltervl
pkelderman wrote: ↑Thursday 08 February 2024 14:34
It took me some time to create the docker-compose.yml file in the /opt/misquitto map. The instruction isn't very clear. It's result was that I no longer got the message "failed to connect to" in domoticz log. When clicking "setup" for mqtt auto.. I get a empty configuration. What went wrong???
If you followed the instructions from
https://www.domoticz.com/wiki/Zwave-JS-UI#MQTT_Broker there should be a docker-compose.yml in /opt/mosquitto
So if that basic steps already is not working, i doubt you followed the rest of the instructions.
Re: zwave-js-ui installation
Posted: Friday 09 February 2024 11:29
by pkelderman
I have tried the updated instruction where the docker-compose.yml is said to be found in /opt/mosquitto

- Schermafbeelding 2024-02-09 112219.png (16.77 KiB) Viewed 2922 times
As you can see there is no docker-compose.yml file. I did every step from installing raspberrypi/debian, domoticz, docker and mosquitto. I hope someone can help me!
Re: zwave-js-ui installation
Posted: Friday 09 February 2024 11:45
by waltervl
There is a yaml file instead of yml. They are the same....
Edit: I have updated the wiki to edit the yaml file....
Re: zwave-js-ui installation
Posted: Monday 12 February 2024 14:39
by pkelderman
Ok, clear! I will continue my installation with that knowledge! To be continued.
Re: zwave-js-ui installation
Posted: Sunday 24 March 2024 18:49
by hvoorend
Question a bit in line with the previous one: I do have everything technically working with MQTT and ZWaveJS-UI containers. Happy with it solar. However after following the instructions, I do have a docker-compose.yaml file in both /opt/mosquitto and /opt/zwavejs-ui. When restarting my RPI (power up) all is automatically started, but not my zwave-js-ui container. What is the best method to have that one started automatically as well? Should I just merge statements of /opt/zwavejs-ui/docker-compose.yaml to /opt/mosquitto/docker-compose.yaml (since that one seems to be called on RPI start).
Did I miss out on any instructions in the wiki in that respect?
Thanks in advance for your advice.
Re: zwave-js-ui installation
Posted: Sunday 24 March 2024 20:21
by waltervl
What is the restart value in your docker-compose.yaml of Zwave-JS-UI?
Re: zwave-js-ui installation
Posted: Sunday 24 March 2024 22:29
by hvoorend
Thanks for responding waltervl.
Here the contents for zwavejs-ui:
Code: Select all
pi@raspberrypi:/opt/zwavejs-ui $ cat docker-compose.yml
version: "3.7"
services:
zwave-js-ui:
container_name: zwave-js-ui
image: zwavejs/zwave-js-ui:latest
restart: unless-stopped
tty: true
stop_signal: SIGINT
environment:
- SESSION_SECRET=mySecretSession
- TZ=Europe/Amsterdam
devices:
- '/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave'
volumes:
- ./store:/usr/src/app/store
ports:
- "8091:8091" # port for web interface
- "3000:3000" # port for Z-Wave JS websocket server
For mosquitto that is:
Code: Select all
pi@raspberrypi:/opt/mosquitto $ cat docker-compose.yaml
services:
mosquitto:
restart: unless-stopped
build:
context: .
volumes:
- type: bind
source: ./config/
target: /mosquitto/config/
- type: bind
source: ./log/
target: /mosquitto/log/
- type: volume
source: data
target: /mosquitto/data/
ports:
- target: 1883
published: 1883
protocol: tcp
mode: host
- target: 9001
published: 9001
protocol: tcp
mode: host
volumes:
data:
name: "mqtt-broker-data"
Mind: one has gotten the .yml extension and the other .yaml. But that should not be a big deal imo.
Or should I (instead of merging the files) 1x issue below command and will my zwavejs-ui container always be auto-started from that moment onwards?:
Code: Select all
docker run -d --name zwave-is-ui --restart unless-stopped -v /opt/zwavejs-ui/store:/usr/src/app/store -p 8091:8091 -p 3000:3000 --device=OZW_DEVICE zwavejs/zwave-js-ui:latest
[/code
Re: zwave-js-ui installation
Posted: Sunday 24 March 2024 23:06
by waltervl
I am not a docker expert but with docker it seems you have to run "docker compose" or "docker-compose" to start your containers.
Using only docker in the command line will ignore the docker-compose.yml settings.
The command to start the container (from the directory where the docker-compose.yml/yaml file is) should be
Re: zwave-js-ui installation
Posted: Sunday 24 March 2024 23:53
by hvoorend
I’m also not a docker expert but I basically followed all the instructions here
https://www.domoticz.com/wiki/Zwave-JS-UI and of course started the zwavejsui-ui container manually with docker compose -d. The whole MQTT-, zwavejsui-ui-, Domoticz-package runs perfectly fine, but the thing is: when I now (for instance) suffer from a power outage when not at home (say vacation), my zwavejs-ui container does not automatically start when power is back and so from that point domoticz does no longer work. So I would like to have it auto-started no matter what (power off/on RPI, reboot). The mosquitto container is already auto-started (for some reason). So the question is how can I do the same for the zwavejsui-ui container ?
Re: zwave-js-ui installation
Posted: Sunday 24 March 2024 23:57
by waltervl
The docker compose configuration seems to be ok so no idea why your container is not starting at reboot of the Pi.
Re: zwave-js-ui installation
Posted: Friday 29 March 2024 19:50
by hvoorend
Solution can be found here in case someone needs it:
https://github.com/zwave-js/zwave-js-ui/issues/3646
Re: zwave-js-ui installation
Posted: Friday 29 March 2024 23:04
by waltervl
Still not very clear to me what you did.
You stopped the Zwave-JS-UI once manually and now after every reboot it will not start again? So how to solve this?
Re: zwave-js-ui installation
Posted: Saturday 30 March 2024 23:37
by hvoorend
Basically I checked the (current) Restart Policy for my running zwave-js-ui container
Code: Select all
docker inspect zwave-js-ui | grep -i restart -A 5
It was “unless-stopped”. I changed it to “always”:
Code: Select all
docker update zwave-js-ui --restart always
Then rebooted my RPI to test. All came up now.
Docker-compose.yml defines the restart policy as “unless-stopped”. As a result, when you initially start your container at installation time (docker-compose up -d), it will be automatically started (with “unless-stopped” as the restart policy). It will be automatically started as long as it is not manually or otherwise stopped. But if it IS manually or otherwise stopped, docker will no longer automatically start it (looks like it will remember that somehow). Assume that you change the restart policy to “always” (as I did), and if that container is manually or otherwise stopped, your container will not be automatically started right away (that could result in a loop of course), but it will be automatically started when docker is restarted (or your PI reboots and starts docker of course). So my conclusion is that “always” will at reboot or docker restart, not remember that your container was manually or otherwise stopped. “Unless-stopped” will.
Re: zwave-js-ui installation
Posted: Saturday 30 March 2024 23:41
by hvoorend