Hey all. I’m trying to set up Home Assistant for the first time to control my new Z-Wave blinds. I think I’m on the right track, but I’m getting a “failed to connect” error when I try to add Z-Wave integration to Home Assistant. Any ideas what I might be doing wrong?
So far I have:
Installed the Home Assistant app and zwave-js-ui app
Added the Z-Wave USB device to both apps
Attempted to add Z-Wave integration to Home Assistant via webui
For reference, I looked up the USB device with ‘ls -l /dev/serial/by-id/’ and saw
lrwxrwxrwx 1 root root 13 Apr 13 19:54 usb-Nabu_Casa_ZWA-2_80B54EE0B904-if00 → ../../ttyACM0
In the Home Assistant app settings, I added it as so, based on some online discussions I found: Host Device: /dev/serial/by-id/usb-Nabu_Casa_ZWA-2_80B54EE0B904-if00 Container Device: /dev/ttyACM0
In the zwave-js-ui settings, I used /dev/serial/by-id/usb-Nabu_Casa_ZWA-2_80B54EE0B904-if00 as the Serial Port value, and I can see the USB device in the zwave-js-ui webui. I stuck with the default webui and websocket ports (30191 and 30192). The websocket port is set to “Publish port on the host for external access”.
When trying to add zwave integration to Home Assistant in the webui, I went to Settings > Devices & Services > Add Integration. I was prompted to enter “the URL of the Z-Wave Server WebSocket API, e.g. ws://localhost:3000”. I tried both ws://localhost:30192 and ws://192.168.x.xx:30192 (the router-assigned IP for my home server). Both gave me a failure to connect.
Did you need to add Z-Wave integration to Home Assistant in order to use the actiontec dongle, or does its nature as a combo device make it automatically work in HA without needing additional configuration?
Also, something I just noticed. For whatever reason, the Z-Wave JS UI app does not have the websocket server enabled by default. In the webui for zwave-js-ui, I had to go to Setting > Home Assistant > toggle on “WS Server”.
Unfortunately this still doesn’t solve the “failed to connect” issue when adding the Z Wave integration in Home Assistant.
I don’t use any TrueNAS apps, so I can’t speak to how to connect them, but you should only add your Z-Wave USB device to the Z-Wave JS UI app, not to Home Assistant.
That’s a good start. At least you know ZWA-2 is connected to the Z-Wave JS server and working. I think truenas-fan is on the right track. The issue is most likely figuring out the correct URL to enter in the Home Assistant Z-Wave integration.
You didn’t mention your TrueNAS network configuration. I know sometimes you have to create a bridge device so things can communicate with each other (for example, VM to TrueNAS or VM to apps), but I don’t know if that applies to inter-app communication.
There are tons of people who use and have success with the Home Assistant app, but I personally find running HAOS in a VM to be the easiest approach. I don’t load Home Assistant up with everything under the sun like a lot of people seem to do these days, so the resource overhead on my TrueNAS is negligible
I don’t think I made any changes to the network settings inside TrueNAS. I just tried switching the websocket IP to use the nameserver1 IP listed there, no luck with that either.
Is it fairly straightforward to set up a HAOS VM with Z-Wave and USB pass-through? If I can’t figure out the container approach, I’ll need to try that instead.
Hopefully, someone with more app experience will jump in with better advice on what to put for the integration URL, or if inter-app communication requires a bridge.
On a side note, for the best results with the HAOS VM, you’ll still need to set up a bridge for Home Assistant’s device discovery feature to work correctly. For setting up the bridge, I was not able to quickly find the procedure in the official TrueNAS documentation, but here is a link to a Lawrance Systems video on the subject
Ok, I think I figured it out. I ran “docker network create ha-network” in the shell to create the docker network. Then in the TrueNAS app config settings for both Home Assistant and zwave-js-ui, I found the Network field, and added the app to it. “ha-network” in the Name field and then the first entry in the dropdown for Container Name. It was “home-assistant” and “zwave” respectively.
After that, I went back into the Home Assistant webui’s Integrations page and saw a Z-Wave network under “Discovered”. All I had to do was click Add and then Submit. Looks to be properly integrated now, though I won’t know for sure until I get the blinds connected.
Got the first blind paired. It needed to be paired through zwave-js-ui, not Home Assistant. Just go to the SmartStart tab, hover over the magic wand icon in the top right to confirm SmartStart inclusion is active, and then use the options in the bottom right bubble menu to add the device. I opted to input the raw QR code value which I grabbed by scanning the blind’s QR code with my phone. Then just put the device in pairing mode and it should connect.