Z-NET Integration with HA

You need to go to:

Settings/Devices & Services/ Z-Wave then press the ‘ADD HUB’

It makes sense, @goldriver , but forgive my additional questions. I am not connecting the dots on the two Zwave-JS UI and 2 Znets since it seems I need two unique WebSockets Addresses.

In ZWave-JS UI I can only configure one Zwave device via the Serial Port

Then, when I add a new hub, I cannot add the other Znet because it is not USB and requires a Serial to TCP connection, which I believe I can only do with Zwave-JS UI, which gives me a WS address for the additional Zwave Hub.

When I moved from Vera to HS4, I did this because HS supported multiple Zwave Environments in one UI, and I thought the ZNets, being IP-based, would be better between locations for flexibility in centrally locating the Zwave sticks. My locations are close (within 200’ of each other), and I wonder if one Zwave environment would be better now.

I am trying to determine if two Zwave environments are custom in HA (it seems not); however, two Zwave-JS UIs seem to be my current issue. Since the ZNets are IP-based, from my reading, I must have a Zwave-JS UI as the front end for each.

My dilemma is: Should I abandon the Znets and move to ZooZ 800 or keep them? I am trying to keep the Znets, but I cannot figure out how to get the second Znet into HA.

I hope this makes sense, and your help is appreciated!

In Z-Wave JS UI you enter the TCP IP address of the Z-NET the in Home Assistant you enter the websocket address of of your Z-Wave JS UI Install.

You can’t install two instances of the same add-ons, unless you copy it and host it yourself with a new repository ID:

I would guess most people who have more than one network aren’t using HAOS, or at least aren’t using add-ons. You can run more than one Z-Wave JS UI via docker or standalone binary, on other hosts.

Another option is to run Z-Wave JS UI natively on the Z-Net, then it’s just a matter of connecting the integration to it:

Update: I did some testing with the ZooZ stick.

  1. ZooZ Pro - Zwave devices show the Manufacturer and Model in the Zwave configuration
  2. ZooZ Pro - Zwave device sensors show up properly in HA too
  3. Distance Con - I cannot add some devices as they are too far away from the ZooZ stick. Some will add and others will not, but devices far away ultimately show Dead after a few minutes. I only assume based on distance away from the controller (even after rebuilding routes). I am able to add plugin devices when I move them closer to the ZooZ. However, when I move them back and rebuild the routes, they show dead after a few minutes.
  4. Znet Pro - this solves that issue with the Znet being located closer to the devices.

@HomeSeerRich - I want to avoid doing this to the Znet in the event I want to go back to HS.

I appreciate all the information sharing! What I think I am going to do is replace 1 Znet with the ZooZ and use the other Znet in the my remote location to avoid Zwave needs going dead. (Unless anyone can think of a better option).

Thanks! :pray:

@Raven999 I still think you’re missing some of the components in this situation. If I’m wrong, my apologies. Here are some diagrams of the options you have that I hope will clear things up.

First, the way you’ve likely got your single Z-Wave network with a single Z-Net

HAOS is running multiple Docker instances, 1 for Home Assistant and the Z-Wave-JS Integration

The Integration then makes a WebSocket connection to the Addon Docker container running Z-Wave-JS-UI (that’s the ws://a0d7b954-zwavejs2mqtt:3000 reference in the integration configuration). Note that “a0d7b954-zwavejs2mqtt” is a docker host name reference for convenience but it just as easily could have been an IP address.

If you had a USB controller the Addon would reference a Linux device path (/dev/serial/by-id/mumble) but since you have a Z-Net that isn’t on the same host, your Addon configuration references a TCP connection to the Z-Net (tcp://192.168.1.101:2001) ser2net software.

The ser2net software on the Z-Net (RPi) points to the Linux device path of the EZZee Pi HAT (/dev/ttyAMA0)

With that you have end to end communications from Home Assistant to the Z-Wave controller.

Now consider adding a second Z-Wave network as you need to do. You have several options. Here are 2 discussed in this thread. First Option:

Using another host (Windows, Docker, or even cloning the existing Addon repository) you run a second instance of Z-Wave-JS-UI. A second integration is added to your existing Home Assistant and is configured to a different WebSocket address (I just made one up). The rest of the configuration is simply a repeat of the above steps with different IP addresses.

Cons: No automatic updates like the official Addon. You would have to keep the version up to date manually.

Second option:

Move one or both Z-Wave-JS-UI instances directly to the Z-Nets (this diagram shows moving both, but you could keep one stock)

The link I referenced in post 68 Z-NET Integration with HA - #68 by mterry63 shows you how to remove ser2net and install Z-Wave-JS-UI directly on the Z-Net. You can always buy a new SD card and back up the stock Z-Net configuration so you can revert by simply re-installing the original card. This is probably the route I’d go if I were to add a second network. Updating that software under docker isn’t that much of a chore.

Even with your proposed Zooz option (which I wouldn’t do as it will require you to migrate nodes to the new controller) you still need a second instance of Z-Wave-JS-UI which you can’t easily host on HAOS. Essentially you just swap the box in the diagram that says EZZee with the Zooz device. It doesn’t really help the situation much.

Hope this helps.

3 Likes

@mterry63 - Yes!!! this clears up my question and what I was looking for! thank you all so much for the assistance and I hope to pay it forward

For those interested, I had a friend work with me and get this working using dietPi. Not that I don’t appreciate the work that the Homeseer team did to get this to work natively, I found that due to perhaps the age of my z-nets (both were rPi 1s and I think OG z-nets) that it wasn’t working very reliably. Plus they’ve made other enhancements to newer znets like zigbee support, that I’m not sure mine would have had.

Above all that I still had the issue that if I wanted to run more than 1, I had to have another pi with 2 instances of zwave js ui. This solved it for me making each znet have it’s own zwave js ui install on it and removing an extra pi I had taling to the original znets.

That said, here are the instructions. I have followed these about 5 times now (2 I redid because i updated the rPis from v1 to v3 and just reused the daughter boards). I’ve also done this on a HomeTroller Pi.

Again, if you can get it working natively, then I wouldn’t do this, but this gives me more control to keep the OS and components up to date.

Assumptions made that installation will continue to use the default dietpi user.
If you choose to add your own user then substitute that user instead of dietpi.
dietpi Install
- First login as root/dietpi
- set passwords
- disable console - Yes
  - If you don't do this you have to do it manually editing /boot/dietpi.txt
    - CONFIG_SERIAL_CONSOLE_ENABLE=0
- software search
  - docker
  - docker-compose (this isn't the full docker-compose just the plugin...this is stupid)
- install software
- exit menu
- CLI
  - sudo apt install docker-compose vim -y
- Edit file (pico or vim)
  - /boot/config.txt 	
  - Edit Line:
    - enable_uart=1
  - Add Lines:
    - dtoverlay=pi3-miniuart-bt
    - dtoverlay=disable-bt
- Reboot
- Edit /etc/group
  - Add dietpi user to docker group
    - docker:x:993:dietpi
  - Or run as root (bad idea)
- Create docker-compose.yml in home directory or wherever you want
- Launch Z-wave JS UI
  - docker-compose up (launches in forground) add -d for background
  - Will restart on reboot so don't try loading it every boot it's automatic
docker-compose.yml
version: '3.7'
services:
  zwave-js-ui:
    container_name: zwave-js-ui
    image: zwavejs/zwave-js-ui:latest	
    restart: always
    tty: true
    stop_signal: SIGINT
    environment:
      - SESSION_SECRET=mysupersecretkey
      - ZWAVEJS_EXTERNAL_CONFIG=/usr/src/app/store/.config-db
      # Uncomment if you want logs time and dates to match your timezone instead of UTC
      # Available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      - TZ=America/New_York
    networks:
      - zwave
    devices:
      # Do not use /dev/ttyUSBX serial devices, as those mappings can change over time.
      # Instead, use the /dev/serial/by-id/X serial device for your Z-Wave stick.
      #- '/dev/serial/by-id/insert_stick_reference_here:/dev/zwave'
      - '/dev/ttyAMA0:/dev/zwave'
    volumes:
      - zwave-config:/usr/src/app/store
    ports:
      - '8091:8091' # port for web interface
      - '3000:3000' # port for Z-Wave JS websocket server
networks:
  zwave:
volumes:
  zwave-config:
    name: zwave-config

P.s. You can easily just keep your original z-net sdcard and revert if you have to at any time. The z-wave network is stored on the daughter card and so you don’t have to reinclude anything. You do have to have everything re-interviewed (so you have to wake up each battery device), but after that you’re good.

Also not that I deviated a bit from the instructions above and installed portainer (Install Portainer CE | 2.19 | Portainer Documentation) because i prefer it for managing my docker services. In this case I used the above docker compose to set up a portainer stack. That said, the portainer part isn’t really needed, but I personally find with all the znets I’m running it’s easier for me to keep zwave js ui updated.

2 Likes

Please ignore this post…

One of the only disappointments I have had with home assistant was the quality of the ZwaveJS implementation compared with Homeseer’s Zwave support (I was Homeseer user before transitioning to HA).

I was hoping this product would allow me to get the benefit of Homeseer’s excellent Zwave network management and protocol implementation and yet integrate all the devices into Home assitant, but this looks like I still am stuck with ZwaveJS support.

Is there a way for me to interface HA and Homeseer on a Pi and do what I want? I have made good progress in replacing my Zwave devices with Zigbee (Zigbee2mqtt works great!), but my 5 Yale locks are still better supported in Zwave than zigbee (though that is getting better - I moved one to the “Red” zigbee module a couple months ago and it’s doing Ok although passing through fewer options).

1 Like

What’s missing? ZWave2JS is the official integration for HA and I haven’t had any issues with it (granted, my network is small).

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.