Running Z-Wave JS on Umbrel Using Portainer

I made some good progress on this after finding the Home Automation Guy article on Installing Z-Wave JS with Home Assistant. I ran through it and found some deviations from the steps but on the whole it worked for me.

My initial step was to plug the USB stick into an Umbrel USB port and install Portainer app on Umbrel.
The next step is to SSH to umbrel@<umbrel_host>
In your terminal session:

  1. Execute sudo ls -la /dev/serial/by-id
  2. Check the listing and look for your device on the USB port - note the symlink:
  3. lrwxrwxrwx 1 root root 13 Dec 30 16:06 usb-Silicon_Labs_Zooz_ZST10_700_Z-Wave_Stick_0001-if00-port0 → …/…/ttyUSB0
  4. In my case the stick is located at /dev/ttyUSB0 - make a note of this path
  5. Next create a directory on the host for the container to use for config files:
  6. Execute sudo mkdir /mnt/root/data/zwavejs
  7. Execute sudo chmod -R 755 /mnt/root/data/zwavejs

That completes the actions on the Umbrel filesystem itself now create a Portainer ‘Stack’ (similar to Docker Compose)

  1. Open the Portainer app from your Umbrel home screen (UI URL = http://<umbrel_host>:9000)
  2. From the Portainer home screen (http://<umbrel_host>:9000/#!/home) click on the Primary Docker item in the Environments table
  3. From the left hand navigation menu click on Stacks to open the stacks page (http://<umbrel_host>:9000/#!/1/docker/stacks)
  4. Click Add Stack to open the Create Stack page
  5. In Create Stack leave the Web Editor open selected and past in the yaml below:
version: '3.7'
services:
  zwavejs2mqtt:
    container_name: zwavejs2mqtt
    image: zwavejs/zwavejs2mqtt:latest
    restart: always
    tty: true
    stop_signal: SIGINT
    environment:
      - SESSION_SECRET=<GENERATE_A _RANDOM_STRING_FOR_THIS_VALUE>
      - ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
      # Uncomment the line below to set timezone
      # - TZ=America/New_York
    devices:
      - '/dev/ttyUSB0:/dev/zwave'
    volumes:
      - /mnt/root/data/zwavejs:/usr/src/app/store
    ports:
      - "8091:8091"
      - "3000:3000"
  1. Click Deploy the stack button on the Create Stack page

The container should now deploy but you might see errors or warnings in the log - you will need to keep the container up and use the Z-Wave JS UI to adjust the config

  1. Open the URL http://<umbrel_host>:8091 in a browser
  2. In the UI click on the Settings cog
  3. Under the Z-Wave section - check: Enabled = checked, Serial Port = /dev/zwave, and Config Priority Directory = /usr/src/app/store/config
  4. under the Home Assistant section - check WS Server = enabled
  5. Save any changes in the Z-Wave JS UI

Stop and Redeploy the Stack you created in Portainer and allow it to reinitialise.

You can now go to Home Assistant and Add the Z-Wave integration under Settings. In the Z-Wave integation dialog simply accept the default ws://localhost:3000 setting and submit.

With any luck you’ll have success in adding the Z-Wave integration at this point.

If anyone knows how to get the serial port specified by-id in the devices section of the YAML then I’d be interested to know. Docker doesn’t seem to like symlinks despite Home Automation Guy’s steps. The downside to not using the symlink USB device is you can’t simply move the stick from one USB port to another.