Z-NET Integration with HA

Oh, where to begin… The map is wrong. It’s topology is just plain wrong, and you can’t manually correct paths. I update device firmware on a ZEN light switch and then have to re-pair afterwards to get to attach… Sometimes devices just drop offline and I have to manually try and bring them back. Devices that used to work fine with S0-legacy encryption in Homeseer only seem to work with no encryption with ZwaveJS.

It’s better than it was a year ago but I never had these issues with Homeseer.

That’s too bad considering I’ve heard that HomeSeer has committed to migrating to Z-wave-JS UI. I don’t think they have the bandwidth to keep their controller code up to date.

You can always leave Z-wave on HomeSeer and just use something like marthoc/homeseer: HomeSeer Custom Integration for Home Assistant (github.com)

Personally, I moved my Z-Net to Home Assistant without any changes and haven’t had complaints with Z-wave JS UI.

You can manually set paths using Z-wave-JS UI if you want/need to:

image

2 Likes

I’ve just read through this whole topic and either I’m really, really lost (totally likely) or screwed (equally likely) having just purchased a ZNET and a Flex sensor for a remote shed.

I have a working ZWave JS UI (“ZUI”) installation on HA Yellow with an HUSBZB-1 stick. My ZWave devices are all in the house, so all are connected, and I had temporarily the Flex sensor connected as well for testing.

The ZNET is on my iOT network along with HA and I can connect to it.

BUT…if I understand the thread above correctly, unless I can create a new ZUI installation…I can’t use the ZNET as a remote relay. (ie ZWave sensor via ZNET at the far end <> IP <> HA). This is what I understood I could do.

I don’t understand Docker (have never been able to get it to work) but I do have several RPis kicking around as PiHoles, and of course the ZNET is an RPi.

¯\(ツ)/¯ <<< me, right now.

One of the HomeSeer users has posted step by step instructions of how to load Z-Wave-JS UI on a Z-Net on the HomeSeer board, and it’s linked and/or copied here as well. If I had to spin up a second Z-wave network, I wouldn’t feel bad about going down that path.

Honestly in my opinion the HomeSeer users seemed to use multiple z-wave networks as a solution for everything since that solution was supported. I’ve had 70 or so Z-wave devices and never felt the need to add new networks. That said I’m sure there are use cases that can be made to work easily enough.

Thanks – I’ll look again for that set of instructions - hopefully not too arduous. My problem is that I have a pump shed I need to monitor and it’s a good 250’ from my house (and ZWave hub)…so their ZNET/ethernet/ZWave relay looked pretty good to me!

Good day all.

Great thread!!! This really helped me evaluate all options for implementing multiple Z-NETs for my Home Assistant system.

Background on my setup:

I ended up deciding to go with a single NUC running ubuntu server and a full docker setup with Home Assistant and multiple Z-Wave JS UI instances all running in their own containers. Each instance of Z-Wave JS UI will be connector to it’s own Z-Net located in different parts of my home.

I really like the ability to keeping things each in their own box (https://youtu.be/814eR5K7KD8?si=wNaMA-Y-kU5b63k5) especially after using HAOS running directly on a NUC and dealing with all the issues between Silicon Labs firmware, ZOOZ ZST39 stick, ZWAVE JS UI, and Home Assistant over the last three months.

True that the docker setup does not have the option for using add-ons in HAOS but for my needs, this is not a real problem especially now that I am learning about the work arounds available.

Using this setup also will let me split up my large ZWAVE network (>130 nodes) into more manageable sizes (<50 nodes each) which will greatly improve the performance and address most of the issues I was having with latency, inclusions, dropped commands, and general poor mesh performance.

It is also worth noting that the Z-net I just received supports 800 series LR z-wave which was a nice surprise because the description on amazon said only 700 series.

My Question on Z-Net setup using docker:

I was able to get my Zwave JS UI container installed, running and successfully connected to the Z-NET following the standard docker instructions but, the only way I was able to get it to work was to totally comment out the device section of the docker-compose.yaml file, install the container, and then enter the IP address and port number of the Z-NET “tcp://xxx.xxx.xxx.xxx:2001” in the Serial Port field in the Z-wave JS UI control panel z-wave settings.

docker-compose.yaml example:

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/Chicago
#devices:
#- ‘/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave’
volumes:
- ./store:/usr/src/app/store
ports:
- “8091:8091” # port for web interface
- “3000:3000” # port for Z-Wave JS websocket server

What is the correct way to setup the serial port device settings in the docker-compose.yaml file for the Z-Wave JS UI container when using a Z-Net?

Not really. You need to shut down the ser2net service that is capturing the Z-wave controller port. Right now you have:

Z-wave-JS-UI → ser2net → Z-wave Controller

Which you can simplify to:

Z-wave-JS-UI → Z-wave Controller

If the Z-net has a PI HAT z-wave controller it won’t be USB it will show up as some TTY device like ttyAMA0. It should be the same device as in the ser2net.conf file. If your controller is a plugged in USB device, then it will look like the path you show above.

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.

2 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.