Z-NET Integration with HA

Agreed, no need for socat. This is supported directly in Z-Wave JS UI. I’m using that now.

1 Like

Thanks for posting this, I revisited my setup and I did get this working. This is the easiest solution as it will work with all the ZNETS without any modifications. I will describe the procedure just to be clear:

  1. Install the JS UI add on from the community store and start it
  2. Click the “Open Web UI” link that is on the same page where you started the add on. This brings up the web interface of JS UI so you can manage your Z-Wave devices.
  3. Click on the settings icon on the left and then expand the Z-Wave section.
  4. Make sure you create your security keys, or copy in your existing keys if you already have a network
  5. In the “Serial Port” section enter the IP address and port of your ZNET like:
    tcp://192.168.2.100:2001
  6. Click “Save” at the bottom of the screen. If it cannot connect to your ZNET you will an error message.
  7. If it connects ok, you can add/manage your Z-Wave devices from here, click on the first icon on the left.
  8. At this point the integration is not linked to Home Assistant. Go back to the JS UI add on page and note the “hostname” that is listed, it will be something like: a0d7b954-zwavejs2mqtt
  9. In HA click on Settings then Devices and Services, then Add Integration and select Z-Wave JS
  10. It will ask if you want to use the Supervisor Add On, uncheck this then submit.
  11. The next screen will ask for the web socket connection to the running zwave JS UI add on, enter the hostname from step 8 in this format:
    ws://a0d7b954-zwavejs2mqtt:3000
  12. It should connect without an error.
  13. Your devices should now be available in HA

Let me know if this is working ok for you.

If anyone is interesting in running the full zwave-JS UI on the ZNET, I can post those instructions. The only advantage to this is that z-wave communications will not be sent over the network so there could be a performance improvement. Also, if you have a large HA system it might be helpful to offload all the z-wave processing to another CPU.

If you already have a Z-Wave network and are using a USB dongle, you can plug that dongle into the ZNET and use that instead of the built-in Z-Wave. This way you do not need to rebuild your network. I can post instructions on how to do this if anyone wants to try it. You need to SSH to the box and change the ser2net config.
If you want to transfer your Z-Wave nodes to the Z-NET, this can be done. I don’t believe you can restore nodes via zwave-js UI, please correct me if I am wrong. You can load a trial of HS4, enable Z-Wave, backup your existing stick, then restore to the ZNET. This is an option. If you do this, make sure you run “Create Devices” from the Z-Wave plugin so HS4 builds its database of your devices. The backup uses this data, not raw data from the interface.

2 Likes

Our published doc for this is now here:Z-NET Integration with Home Assistant - Products

thanks @mterry63 Much appreciated!

2 Likes

You can make NVM backups and restore them using Z-Wave JS UI. The formats are automatically converted between different SDK versions (subject to some minimum versions).

Does not work with older zsticks, fyi

1 Like

Note that HS4 will back up any system so it can be used to restore to any ZNET. It also cannot restore to older sticks, but this is not an issue if you are working with a ZNET.

Ok, good to know. I saw the switch to enable NVM backups and I enabled that, but I did not see an option to restore. Maybe it does not show up if there is no data saved.

Hmm, interesting, what format is the resulting file?

Manual backup and restore can be found under “Advanced Actions” in the top-level menu. At least a 500-series controller with SDK 6.61+ is needed.

can confirm, does not work with SDK 3.95.0

It’s a JSON file. We generate the file in the same format as the tool provided by Silicon Labs.

1 Like

The docker container I was running for zwave js ui required a USB serial port path just to start. After your comments I was able to put a dummy path and then put the tcp ip address of my z-net in the settings. seems to be working! Thanks!

I found my S2 and S0 keys in the homeseer zwave config ini file, but they are in a different format than Zwave JS UI can use. Does anyone know how to convert these to be right format?

Not as technical as you guys, but chiming in to support the discussion. I run both HA and HS, multiple instances of HA on NUCs in different houses, and have a couple z-nets around as I have outbuildings that are out of z-wave range. Pretty stoked at the idea of seeing this work.

Got successfully connected to a znet g3, but logfile keep scrolling endlessly:

2023-01-25T05:12:36.097Z DRIVER version 10.3.1
2023-01-25T05:12:36.097Z DRIVER
2023-01-24 21:12:36.101 INFO Z-WAVE: Zwavejs usage statistics ENABLED
2023-01-24 21:12:36.101 WARN Z-WAVE: Zwavejs driver is not ready yet, statistics will be enabled on driver initialization
2023-01-25T05:12:36.104Z CONFIG version 10.3.1
2023-01-24 21:12:36.405 INFO Z-WAVE-SERVER: Server closed
2023-01-24 21:12:36.405 INFO Z-WAVE: Client closed
2023-01-24 21:12:36.407 INFO Z-WAVE: Connecting to tcp://192.168.1.53:2001

Try and restart HA or just the zwave-js add-on. I think I saw this also at one point.
Make sure nothing else is connected to the ZNET, try restarting it. The LED on the ZNET will turn green when something is connected so make sure its red before you try and connect to it with HA.

In HS4 they are encrypted. We will add a way to export them so can transfer to another system.

1 Like

Rich, has this export for the encrypted keys been completed? Also, interested in the ability to SSH into the ZNet you mentioned above for the ser2net, need instructions and credentials as defined by HS…

been following this as I am wanting to see about re-using my z-nets in HA. I have v1 z-nets, but the one I’m testing with is contently disconnecting about every minutes. While zwave js ui reconnects, this doesn’t seem right.

Anyone else have this issue or understand why it might be doing that? it says the socket was closed unexpectantly.

So. I noticed that the ser2net timeout in my z-net is 60 s which is about how often it’s failing. I changed it to 120s in the z-net ser2net.conf file and after 2 minutes it lost connection.

To test my theory, I waited for it to reconnect and after 1 minute, I locked my door (the only device on this z-net) and it didn’t time out until 2 minutes after that action (total 3 minutes).

So the question is, is neither z-wave js ui nor the z-net not doing anything to keep the connection alive?

Is there anything I can do to get it to keep the connection alive without setting the timeout to a ridiculously large value?

2 Likes