Z-NET Integration with HA

I think I understand.

The Z-wave JS UI docker container is not accessing any serial port when tied to a remote Z-net?

If that is correct, then instead of addressing the serial device, how to I set the IP address and port of the Z-Net from the docker-compose.yml file? or is that step not required at all.

The serial port is configured in the ZUI settings page in the UI. The docker compose configuration is for adding USB devices to the container, which you don’t have.

1 Like

My next question:

When setting up multiple Z-wave JS UI Docker Containers for different Z-Net hubs, what needs to be different in the docker-compose.yml file between the two instances? (i.e. name,volumes,network,ports?)

@HomeSeerMark, @HomeSeerRich, or any other expert – your help, please. Situation:

  • HS4 with multiple Z-Nets on same network; 1 primary, 3 secondary.
  • Devices are associated with nearest/best controller (i.e., HS4 > Device > Z-Wave > Options > Remote Interface to Use: ZNet-X).
  • Separate Z-Wave networks is not desirable.
  • Multiple instances of Z-Wave JS UI is not a problem – events funnel to HA via MQTT.

Is this configuration supported? If so, how? Any considerations for future device inclusion/exclusion?

Thanks in advance. Kindly, JD

Z-Wave JS doesn’t support running as a secondary controller.

Z-Wave JS expects to be the primary controller in the network and it will try to assume that role when started. It will not work correctly as a secondary controller.

It does however support having secondary controllers in the network.

https://zwave-js.github.io/node-zwave-js/#/getting-started/faq?id=does-z-wave-js-support-secondary-controllers

The answer is “it depends”. The fact that you ask the question indicates your limited knowledge of what you are attempting to do, my advice is educate yourself more on how docker interacts with the physical host.

If you are setting up multiple docker containers on the same physical host, then name, volume, ports will have to be different.

volume maps the docker storage path to the host physical path. The host side of the mapping must be different if on the same host for multiple instances of the container.

ports maps the internal docker listening ports to the host listening ports. The ports can’t be (you can’t run multiple independent services on the same listening port). This means your WebSocket URL will change when configuring the Home Assistant integration.

If the docker containers are on separate physical hosts, then the configuration can likely be the same. I say “likely” because I don’t know what else is running on your hosts.

You also have to map the z-wave controller host device name to the docker device name, but you seem to have figured that out. Not sure if that was by chance or reasoning skills.

Thanks, @freshcoast / AI Bot.

As a follow-up, if a secondary controller is present, how does one initiate Inclusion from that device?

I’d consult the documentation or support forum for the software you’re using. Every Z-Wave controller software will have a different interface to include devices.

I now have my HA/Docker setup with three (3) instances of Z-Wave JS UI running each within it’s own container. One instance is using a Zooz ZST39 stick with the 1.4 firmware that is plugged into the NUC running Umbutu and Docker. The other two instances are linked to HomeSeer Z-NETs that are plugged into my home network at different locations in the home.

Results so far:

-The original single Z-wave network with the ZST39 firmware 1.1 included 120 nodes and had latencies that were regularly up to 5sec and a lot of dropped commands (10%). The new setup with less that 50 nodes on each network has average latencies between 10-50ms with no dropped commands. :sunglasses:

-Network wide inclusions on the original setup were very problematic with many failed attempts and most inclusions ending up without security. With the new setup, inclusions are near instant and 100% with security setup correctly.

-I have not had any controller lockups on the new setup, even on the ZST39. I contribute the improvement on the ZST39 to the latest firmware update.

After fighting Z-wave gremlins for 4 months, I am happy to be passed all that and on to happy automating.

3 Likes

Hello,

RPi 3b, EZZee hat, followed docker/ZWaveJS-UI install as detailed by @goldriver at Zwave-JS-UI on Znet via docker, set serial port to /dev/zwave as detailed but have also tried /dev/ttyAMA0.

I get this error:

2024-09-07 10:28:34.430 INFO APP: GET /api/auth-enabled 304 9.106 ms - -
2024-09-07 10:28:34.446 INFO APP: GET /assets/InvertedCheckbox-D7giPYiO.js 304 5.220 ms - -
2024-09-07 10:28:34.463 INFO APP: GET /assets/DialogGatewayValue-CUal6p7o.js 304 7.707 ms - -
2024-09-07 10:28:34.471 INFO APP: GET /assets/DialogGatewayValue-A-SkCATO.css 304 12.420 ms - -
2024-09-07 10:28:34.686 INFO APP: GET /assets/index-Blr6EMNg.js 304 6.501 ms - -
2024-09-07 10:28:36.971 INFO APP: GET /api/settings 304 2454.446 ms - -
2024-09-07 10:28:37.007 INFO APP: GET /api/auth-enabled 304 6.837 ms - -
2024-09-07 10:28:41.279 INFO Z-WAVE: Controller status: Driver: Failed to initialize the driver: ZWaveError: Timeout while waiting for an ACK from the controller (ZW0200)
at Driver.sendMessage (/usr/src/app/node_modules/zwave-js/src/lib/driver/Driver.ts:5549:23)
at ZWaveController.queryCapabilities (/usr/src/app/node_modules/zwave-js/src/lib/controller/Controller.ts:1014:37)
at Driver.initializeControllerAndNodes (/usr/src/app/node_modules/zwave-js/src/lib/driver/Driver.ts:1467:46)
at Immediate. (/usr/src/app/node_modules/zwave-js/src/lib/driver/Driver.ts:1271:16) (ZW0100)
2024-09-07 10:28:41.285 INFO Z-WAVE: Restarting client in 1 seconds, retry 1
2024-09-07 10:28:42.293 INFO Z-WAVE-SERVER: Server closed
2024-09-07 10:28:42.296 INFO Z-WAVE: Client closed
2024-09-07 10:28:42.333 INFO Z-WAVE: Connecting to /dev/zwave
2024-09-07 10:28:42.337 INFO Z-WAVE: Setting user callbacks

Any suggestions would be greatly appreciated, Thanks

Shouldn’t that be /dev/ttyACM0? Check your /etc/ser2net.conf for the device path it referenced if you didn’t wipe the original OS files.

/dev/zwave won’t work unless you created the symbolic link correctly, that reference is just for “convenience”.

In the docker-compose.yml:

  • devices:
  • ‘/dev/ttyAMA0:/dev/zwave’

also note second line of of my post “…have also tried /dev/ttyAMA0”
I’m afraid I would need a little more hand-holding concerning your advice concerning ser2net.conf.
I’m more or less blindly, but carefully, following instructions that have worked for others.
Thank you for posting. I’ll try to look into the ser2net issue. BT has been disabled but this error seems to suggest otherwise?

PS: I have tried different hardware so fairly confident this is a soft issue.

What OS version are you running on the Z-Net? Did you keep your original SD card (as suggested) and if so, does it still work?

If you run the command:
ls -la /dev/ttyA*

What are the results?

On my Z-Net running Debian 11 the z-wave controller is /dev/ttyAMA0
On my Z-Net running Raspian 8 (the shipped OS) the z-wave controller is /dev/ttyACM0

That maps the host device ttyAMA0 to zwave for docker, so in the docker container only /dev/zwave will work as ttyAMA0 doesn’t exist (Not passed to docker by that name).

Quite possible. Are you confident it’s disabled?

This:

znet@ZNet:~ $ ls -la /dev/ttyA*
crw–w---- 1 root tty 204, 64 Sep 9 08:43 /dev/ttyAMA0

This:
znet@ZNet:~ $ cat /etc/os-release
PRETTY_NAME=“Raspbian GNU/Linux 11 (bullseye)”
NAME=“Raspbian GNU/Linux”
VERSION_ID=“11”
VERSION=“11 (bullseye)”
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL=“http://www.raspbian.org/
SUPPORT_URL=“RaspbianForums - Raspbian
BUG_REPORT_URL=“RaspbianBugs - Raspbian

Concerning BT, I no longer have the BT symbol in the header of the desktop(was next to WiFi symbol)?

I’m not using an original ZNET.

Ah, sorry didn’t get that point. What is your z-wave controller then? HAT device or USB?

EZZee board/hat Ver 2015 Rev E, new from HomeSeer

What is the raspberry pi? If it’s not a 3b it may have different commands for disabling Bluetooth.

Did you try reverting to the old configuration/SD card?

RPi 3b, new out of the box but about 5 yrs old

Good news
It seems zwave-js-ui is happy now after doing the following as suggested at ZAC93 800 GPIO Module Installation Guide - Zooz Support Center

“Run to remove all pieces of bluetooth from the OS and give you back the hardware serial uart.”

sudo systemctl disable hciuart
sudo systemctl disable [email protected]
sudo systemctl mask [email protected]
sudo apt purge bluez bluez-firmware wpasupplicant
sudo apt-get autoremove

Then reboot

Thank you @mterry63 for your assistance.

1 Like

[edit] Ignore. In case helpful to anyone else, I was having trouble connecting to my Z-NET from zwave-js-ui, but I must have had extra spaces in the tcp address.