Instead of buying a new Z-Way adapter I thought it would be a nice
project to reuse the almost 10 year old
RaZberry
2(RZ) adapter together with a Raspberry Pi 2(RPi).
After some Googling I found Z-Wave JS UI(ZUI) which is both the server part and an UI.
The described installation could be used for almost "any" Z-way interface,
impressing list !, and for "any" Linux distribution.
Introduction
The ZUI installation is going to be used together with
Home Assistant(HA) which will be described in a
coming post.
If you have the Z-wave adapter on the same hardware as the HA installation just go for the setup here.
Prerequisites
You need a Linux machine with some Linux OS + the Z-way interface
Detect the hardware
After connecting the RZ adapter, or a USB dongle, it will probably appear
as something like "/dev/ttyXX". Check with "dmesg | grep tty"
RaZberry card
My HA installation is running on a Mac with Linux KVM so I have to use the ZUI standalone since the RZ adapter is
made for the RPi GPIO header. After some tinkering with the above
mentioned hardware it worked.
Per default the RX/TX pins, on any Raspberry Pi, are setup as a serial
console. This means that you can use a USB console cable to log on from almost any computer, which have an USB port, to the RPi. Since the RZC is using the same pins we have to disable the console
function with
3. Interface options =>
I6 Serial Port Enable/disable shell
messages on serial connection
Would you like a login shell to
be accessible over serial? => No
Would you like the serial port
hardware to be enabled? => Yes
The serial login shell is
disabled
The serial interface is
enabled => OK
Do a restart "sudo reboot now" and check "dmesg | grep tty".
Install Z-Wave JS UI
Via ssh/terminal start with an update
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash
-
sudo apt install -y nodejs
sudo npm install -g npm@latest
and check the install with "node -v && npm -v".
Then the actual application "sudo npm install -g zwave-js-ui", start with "sudo zwave-js-ui" and check at "http://your_host.local:8091".
Autostart
Autostart with systemd, the "standard" Linux method, will make ZUI application start at
boot and restart if it fails.
Please note that the "ExecStart" row is using an environment variable which configures a custom storage path where the settings are stored. If not used, the
settings will be lost on updates.
Create a file withsudo nano /etc/systemd/system/zwave.serviceand add the following configuration?? [Unit]
Description=Z-way application
After=syslog.target network-online.target
[Service]
Type=simple
User=root
ExecStart=STORE_DIR=~/.zwave-js-ui zwave-js-ui
Restart=always
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target
Use then the following commands to get it up and running
sudo systemctl daemon-reload && sudo systemctl enable zway
Created symlink /etc/systemd/system/multi-user.target.wants/zway.service
→ /etc/systemd/system/zway.service.
sudo systemctl start zway
Check with "sudo systemctl status zway"
If You have problems and would like to clean up, use the following
commands
sudo systemctl stop zway && sudo systemctl disable zway
and then delete the ”zway.service” file.
Settings
In the ZUI WEB interface select your hardware integration and
proceed.
Comments
Post a Comment
Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !