Zwave-JS-UI on Znet via docker

This Solution has only been tested on Z-net device (RPI-3b) with the Ezzee REV 09.12.14 board mounted on, I have no idea if this method will work on a RPI 4, there might be some adjustments to be done in regards with the serial port access

1- First strongly suggest to make a copy of the original SD card with win32 disk imager and keep original and copy safe
2- Use a new SD card (minimum 32GIG suggested for Docker)
3- Install the Raspberry PI imager software https://www.raspberrypi.com/software/

  • Start the RPI imager software
  • Select the RPI 3 for the Raspberry PI model
  • Select Raspberry PI OS (legacy 32-bit) as the OS
  • Select my SD card (I used a new 32GB card)
    4- Once copy process completed, remove SD card from computer and Insert the SD card in the Z-net device
    5- Connect keyboard, mouse and HDMI screen to the Raspberry device
    6- Plug power and let the PI Boot
  • Configure language, timezone
  • Use ‘pi’ as the usernoame and enter your own password
  • Configure the wifi network on your PI (note the ip adress of your device)
  • Wait until a message from the OS suggest updating the new installation and proceed with all the available updates
  • Select Restart
  • Activate VNC and SSH on the PI (so you can remotely access the PI either by terminal or graphical interface) without keyboard,mouse and monitor
  • Click on the raspberry image (upper left corner)
  • Select ‘preferences’ then ‘configuration’
  • In the interface tab, activate ‘SSH’,‘VNC’, ‘serial port’ and desactivate ‘serial console’ then validate
  • Don’t reboot immediatly
  • Edit /boot/config.txt and disable Bluetooth, if not the Ezzee board won’t be available to the /dev/ttyAMA0 port
  • Click on the terminal icon
  • Type and execute ‘sudo nano /boot/config.txt’
  • Add following at the end of the file,

#Disable Bluetooth
dtoverlay=disable-bt

  • Save and exit (CTRL-X) and Yes and enter
  • Reboot the PI (select the raspberry image, select disconnect and then reboot)
  • You can now disconnect keyboard, mouse and monitor and you can connect to your PI either using VNC terminal client or SSH using the IP adress noted above

7- Install Docker

  • Click on the terminal icon to open a terminal window
  • Type and execute ‘sudo apt-get update && sudo apt-get upgrade’ to make sure you got all the latest packages installed
  • Type and execute ‘curl -sSL https://get.docker.com | sh’ this process takes a few minutes to execute
  • Type and execute ‘sudo usermod -aG docker $USER’
  • Close the terminal window
  • Reboot your PI

8- Test and make sure docker was installed correctly

  • Click on the terminal icon to open a terminal window
  • Type and execute ‘docker run hello-world’
  • You should have a message with the following text in it:
    “Hello from Docker!
    This message shows that your installation appears to be working correctly.”

10- Install and Run ZWave-JS-UI as a service:

  • Type and execute ‘sudo mkdir /opt/zwavejs-ui’
  • Type and execute ‘cd /opt/zwavejs-ui’
  • Type and execute ‘sudo nano /opt/zwavejs-ui/docker-compose.yml’
  • Cut and paste the following in the editor:

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=America/New-York
    devices:
  • ‘/dev/ttyAMA0:/dev/zwave’
    volumes:
  • ./store:/usr/src/app/store
    ports:
  • “8091:8091” # port for web interface
  • “3000:3000” # port for Z-Wave JS websocket server
  • Save and exit (CTRL-X) and Yes and enter
    11- Now you can launch the docker compose container with ‘docker compose up -d’ or you can launch it without -d to see what’s going on.
  • Type and execute ‘docker compose up -d’
  • First execution might take some time as it is downloading packages
    12- From here you should be able to connect to the Zwave-JS-UI typing ‘your RPI IP adresss’:8091 in a browser to get to the Z-wave-JS-UI interface
    13- In the ZWave-js-is interface, in setting (cog wheel) under the zwave tab, make sure you type in /dev/zwave in the serial port and then select ‘Save’
    -After about 2 minutes, the interface will reload and in thecontrol panel, if your Z-net used to have devices configured you should find them there

If Zwave JS UI need to be updated:

  • Using VNC or SSh connect and open a terminal window
  • stop the docker
    - sudo docker stop zwave-js-ui
  • remove the docker
    - sudo docker rm zwave-js-ui

pull the latest version
- docker pull zwavejs/zwave-js-ui

Type and execute ‘docker compose up -d’

First execution might take some time as it is downloading packages
12- From here you should be able to connect to the Zwave-JS-UI typing ‘your RPI IP adresss’:8091 in a browser to get to the Z-wave-JS-UI interface

Go in settings and make sure the ‘Z-WAVE’ option is Enabled

3 Likes

THANK you so much to the community, especially GoldRiver for details instructions regarding ZNET. (Just discovered new members can only put 2 links in a post, hence the spaces in the URLs)

I’m having difficulties getting HomeAssistant to find and work with my 2nd HomeSeer ZNET across the LAN network.

The 1st HomeSeer ZNET works perfectly and interacts with Zwave devices via Z-wave JS UI.

My setup:
HAOS running on my desktop computer in Virtual Box connected to LAN (Virtual Box static IP 192.168.1.11) works great. Able to access HA via http: //192.168.1.11:8123 works great.
Installed Add-on Module “Z-Wave JS UI” in HA no problem. (note for others learning: NOT “Z-Wave JS”)

Configured ZNET#1 (Homeseer software remains) to have static IP 192.168.1.12, etc.
Added ZNET#1 as Z-Wave Hub via the Z-Wave JS UI. works great.
Under >Z-wave JS UI> Settings > Z-wave> Serial Port is set to: tcp: // 192.168.1.12:2001
Under >Z-wave JS UI> Settings > Z-wave> Home Assistant: WS Server is enabled. Port 3000. Server Host “a0d7b954-zwavejs2mqtt”

I am able to add Zwave devices and also use HA via android app to control remotely (outside WAN connection port forwarded to HAOS virtual box)

For ZNET# 2…
I have used GoldRiver’s instructions to load Raspberry PI image to fresh SD card and configured appropriately. Set static IP on ZNET #2 (Raspberry PI) to 192.168.1.13. Installed SSH (So I can remote in without having keyboard and mouse connected via monitor) and disabled Bluetooth etc. Did the updates. Then installed DOCKER, installed Z-Wave JS UI which runs successfully on ZNET#2 .
I am able to access the ZNET#2 (Z-Wave JS UI) via: http: //192.168.1.13:8091/.

Under Settings> Z-Wave changed “Serial Port” to “/dev/zwave” and added the same S2 and S0 Keys.
The Driver loads “Driver ready” at top. The “Controller” is idle. But it says Green connected. Interestingly the HOME ID/Home Hex is different than the HOME ID of my existing HAOS/Z-wave JS UI installation.
The ZNET#2 is able to scan for new Zwave devices. of course right now the only thing is Node 001 (EZZee)

I have tried with MQTT enabled and disabled.
Still under ZNET#2 (raspberry Pi / Z-wave JS UI) Under Settings>Home Assistant… Enabled “WS Server” Port 3000. I tried matching the existing server host (a0d7b954-zwavejs2mqtt) and assigning it its own unique name “znetraspberrypi1”. I have enabled DNS discovery and tried MQTT Discovery.

If i change the Settings>Z-Wave Serial port from “/dev/zwave” to “tcp: // 192.168.1.13:2001” (as I did for the ZNET#1 tcp:// 192.168.1.13:2001) the Driver does not load, etc. Basically it must be as GoldRiver said “/dev/zwave”

I access HA via http: // 192.168.1.11:8123/ …
Under Settings > Devices & Services > Z-Wave > “Add Hub”…
I uncheck: “Use the Z-Wave JS Supervisor add-on”
then Z-Wave URL: i’ve tried changing “ws:// localhost:3000” to “ws:// 192.168.1.13:3000” and “ws:// znetraspberrypi1:3000” I get “Failed to connect”
when i tried “a0d7b954-zwavejs2mqtt” it says of course “Device already configured”

Instead of the “Add Hub” way, I then tried Settings > Devices & Services > “+ add integration”
tried > Z-Wave > Select connection method (unchecking “Use the Z-Wave JS Supervisor add-on”) adding URL that way… Still no lucking adding ZNET#2 to HA system. With Homeseer this was more plug and play (multiple ZNETs) I just want to migrate to HA for everything (I have outhouses/Barns that I need to be able to connect to)

I have searched forums and read countless articles and wikis. I’m not even worried about the LEDs on the raspberry pi’d ZNETs not lighting correctly. I have google searched and feel I have tried everything. Can anyone help me out? I would really appreciate it! I will even buy you coffee and teas if you can help me!

Thanks

Why is this interesting? Each Z-Wave network has its own unique home ID. Unless you are trying to use primary and secondary controllers in the same network?

For use with HA you’re not supposed to change any of these settings except turning on the WS Server. Don’t assign any name to WS server host and don’t turn on MQTT (unless you really need it). You can turn on DNS discovery but it only works if you configured the container to use host networking. If you do that, HA should discover the instance automatically. However most people will avoid using host networking to restrict access to the container.

This is all that’s needed for ZUI configuration: https://zwave-js.github.io/zwave-js-ui/#/getting-started/quick-start?id=minimum-settings

Thanks for this, I did get this working on a zees2 with pi3 and 500 series controller. I had to do a couple extra steps to get the zwave serial device working I am not sure exactly which steps are needed but listing all steps I took:
sudo systemctl disable hciuart

$ sudo nano /boot/config.txt
and add the line (at the bottom):

enable_uart=1

$ sudo nano /boot/cmdline.txt
you will see something like:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes root wait
remove the line: console=serial0,115200 and save and reboot for changes to take effect.

However I cannot get a znet g3 working for the life of me. It has a banana pi m2 berry and 700 zwave module. I could not run the rpi images, I did get an armbian debian 12 image to run. However, I cannot get the zwave module to work. I have tried ttys0,1,2 and getting a failure to load zwave device in zwave-js-ui using any of those serial devices. I am getting close to buying a usb zwave and giving up on the serial module.

Anyone get a gen 3 znet working?

I did hack into the znet original sd install and it is running an older armbian on debian buster. It has a config line enabling uart=2, and I added this to my install, but still no luck. I am going to try to disable zser and install zwave js ui directly on the znets linux install.