I don't understand how to set up Z-wave JS in Synology Docker

I’ve tried this, but it leads to another error:

docker: Error response from daemon: create /volume1/docker/zwavejs2mqtt: "/volume1/docker/zwavejs2mqtt" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.

But the path is available, I can explore it in SSH terminal…

HomeAssistant is using the stick, too. Because I tried the deprecated Z-Wave integration, which is working well. But I stopped the container before trying to install zwavejs2mqtt, so that couldn’t be a problem…

When I’m using the Synology Docker-UI to install the container, it starts and runs without errors. But then I can’t use the device parameter. But I think the “privilege mode” should work as well. But then I do not know how to go on. When starting the ZwaveJS integration on HomeAssistant after that, it wants an URL from me, but I don’t know what to enter. I tried the following:

Must I run the zwavejs2mqtt container in host mode? But which port do I have to use then, because the 3000 is already in use…

You can’t run in host network mode as the port is already in use.
Your command should be something like:

docker run --rm -it -p 8091:8091 -p 3123:3000 --name zwavejs2mqtt --device=/dev/ttyACM0 -v /volume1/docker/zwavejs2mqtt:/usr/src/app/store zwavejs/zwavejs2mqtt:latest

As for the URL it should be ws://192.168.178.2:3123 in that case, although it might also work to target ws://zwavejs2mqtt:3000 from within HA.

I tried it, but now I get the same error than in the original topic post:

2021-03-08 07:17:20.679 WARN STORE: settings.json not found
2021-03-08 07:17:20.769 WARN STORE: scenes.json not found
2021-03-08 07:17:20.771 WARN STORE: nodes.json not found
2021-03-08 07:17:20.773 WARN STORE: users.json not found
/bin/sh: git: not found
2021-03-08 07:17:29.831 INFO APP: Version: 2.1.1
2021-03-08 07:17:29.833 INFO APP: Application path:/usr/src/app
2021-03-08 07:17:29.871 INFO APP: Listening on port 8091 host 0.0.0.0 protocol HTTP
2021-03-08 07:17:30.620 ERROR GATEWAY: Zwave settings are not valid

Are you able to connect to port 8091 to configure the Z-WaveJS server?

How can I connect to this port? Via HomeAssistant integration?
But I think, this will not work, because the container is not installed correctly. After the Error “ERROR GATEWAY: Zwave settings are not valid” in the SSH terminal, the process is on hold, but in the UI of the Synology NAS the container is not appearing in the docker app.

The process is on hold because it’s run interactively. Might be best to configure it from scratch using the Docker UI on the NAS (be sure to remove any container you no longer use to prevent issues):

  1. Search and download the latest version of the image
  2. Deploy the container from the image
  3. Run it under privileged mode so it can access the attached devices
  4. Configure the ports 3000 in the container to 3123 on the host and port 8091 on both the container and the host
  5. Map folder docker/zwavejs2mqtt to /usr/src/app/store
  6. After the container has started browse to http://192.168.178.2:8091 to see if it’s operational and configurable before proceeding with further set up.
1 Like

This approach has worked! Thank you very much! I did not know that I still need to configure the tool via the 8091 port. I thought I must do that via the HA plugin. But I had to enable HA integration in zwavejs2mqtt first, otherwise the access won’t work.

1 Like

I’m having the same issue. I want to use HomeAssistant on my Synology (instead of Domoticz). It looks like most of the things work out-of-the-box, but some ZWave devices are not recognised anymore. Since the default ZWave integration is deprecated, I’d like to use ZWaveJS2MQTT.
This is what I’m executing:

sudo docker run --rm -it -p 8091:8091 -p 3000:3000 --name zwavejs2mqtt --privileged --device=/dev/ttyACM0 --mount source=zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest

Or

sudo docker run --rm -it -p 8091:8091 -p 3000:3000 --name zwavejs2mqtt --device=/dev/ttyACM0 -v /volume2/docker/zwavejs2mqtt:/usr/src/app/store zwavejs/zwavejs2mqtt:latest

But I’m getting

2021-06-05 11:15:51.176 WARN STORE: settings.json not found
2021-06-05 11:15:51.238 WARN STORE: scenes.json not found
2021-06-05 11:15:51.239 WARN STORE: nodes.json not found
2021-06-05 11:15:51.240 WARN STORE: users.json not found
/bin/sh: git: not found
2021-06-05 11:15:53.660 INFO APP: Version: 4.5.1
2021-06-05 11:15:53.661 INFO APP: Application path:/usr/src/app
2021-06-05 11:15:53.689 INFO APP: Listening on port 8091 host 0.0.0.0 protocol HTTP
2021-06-05 11:15:53.875 ERROR GATEWAY: Zwave settings are not valid

The Aeotec Gen5 stick is mounted as /dev/ttyACM0.

Read a few posts back, your container is running successful it seems but you still have to configure the settings through the web interface on port 8091

I had the same issue & the root cause was very simple for me it was not required to use the basic default image:
If you run the 1st time the container , at ./store/* only default (not valid!) settings are created. If you are able to connect at port 8091 via http just enter the configuration setup and adapt the USB settings and check all other settings. Finally don’t forget to click the SAVE button at the end.

I’m also having the same issues and error codes as stated above in the thread. I’ve executed the container every way described above, but still I can’t access the server on any of the port.

Are you using Synology’s own Docker interface (package) or are you using the command line? Could you provide screenshots of the network tab if you’re using the interface or share your commands used?

I tried both methods. The installation instructions on Home Assistant website use the command line, But I also tried using the Docker UI on Synology since I saw this thread and was having the same issues. I’m currently at work, but I can send more info once I get back home.
Thanks!

I tried the command below:

sudo docker run --rm -it -p 8091:8091 -p 3000:3000 --name zwavejs2mqtt --device=/dev/ttyACM0 --mount source=/volume1/docker/zwavejs2mqtt,target=/usr/src/app/store zwavejs/zwavejs2mqtt:latest

but I get the error message:

docker: Error response from daemon: create /volume1/docker/zwavejs2mqtt: "/volume1/docker/zwavejs2mqtt" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.

And I’m having the same issues with the UI as the reply post below

Although I’m probably inputing incorrect information into the wrong fields. For example, I not sure waht I Should be putting in the “Mount Path” field in the image below.

The mount path should be the folder inside the docker, in this case you have to enter “/usr/src/app/store” without the quotes. In your command line you are trying to pass a docker volume instead of a folder, an example (not the full command for your use case)

docker run -d --name zwavejs2mqtt -p 8091:8091 -p 3000:3000 --device=/dev/ttyACM0 -v /volume1/docker/zwavejs2mqtt:/usr/src/app/store zwavejs/zwavejs2mqtt:latest

When setting up the integration within HA you input the IP of your Synology (or if it’s another container within Docker you can link the 2 containers together and use the link name)

Rick, You’re a lifesaver! It all works perfectly now. Thanks!

1 Like

I get : MQTT: MQTT client reconnecting
2021-11-18 21:37:42.023 ERROR MQTT: Mqtt client error Connection refused: Not authorized
Error: Connection refused: Not authorized

what is going wrong ?

Hi @RickKramer, where actually is “/usr/src/app/store”? I need to edit the config here manually as I’ve locked myself out by enabling SSL. Any ideas where I do that on a Synology NAS with a preactically identical docker run command used to setup the container?

If you used the exact command I posted the folder would be accessible by browsing your “docker” shared folder on the NAS and then in the subfolder “zwavejs2mqtt”. The folder is mounted by this part of the command:
-v /volume1/docker/zwavejs2mqtt:/usr/src/app/store
The bold part is the folder used on the NAS itself, the other part is the path within the container. If you for some reason used a directory not in a shared folder then you’d have to SSH into the NAS to get to it.

PS: It might be useful to start a new topic in case you’d still need help.

Thanks Rick - have created a new topic as I’m still stuck. Suspect my config may not be at /volume1/docker/zwavejs2mqtt but somewhere else…

Topic for others following along: Locked Out of Zwavejs2mqtt After Enabling HTTPS