Is it possible to get USBIP or socat on HASSOS?

Hey folks

I feel like I’m so close to running a high-availability Home Assistant setup with a USB Z-Wave stick but there’s just one problem.

I have a Proxmox cluster with HASSOS running on one of the nodes. I also have a Raspberry Pi which has been setup to serve my Z-Wave USB stick over ser2net. So far, so good.

My issue is that my HASSOS install seems to be extremely locked down and appliance-like (which is the idea I guess) but that means that I cannot get something like usbip or socat installed in HASSOS to act as a client for the Z-Wave USB stick. This, in turn, means that HASS High Availability cannnot be achieved as Proxmox (and most hypervisors from what I understand) are unable to migrate virtual machines with local hardware passthrough.

Any ideas would be really welcome. Is there anything possible in HASSOS itself to receive a USB-over-IP Z-Wave dongle? Should I consider moving away from HASSOS to one of the other install methods that allows me to easily install tools such as socat or usbip?

Thanks in advance :slight_smile:

Thought about using Zwave2Mqtt? You install it on the PC with the Zwave USB attached to it, and then connect HA to it via MQTT.

The other obvious option is to run HA in a venv, and then do/install whatever you want.

I’ve heard about Zwave2MQTT but it sounded fairly scary and even more complex to setup than HA.

How hard is it and how much lag does it introduce into ZWave commands?

In terms of running in a venv, is that the same as spinning up a Proxmox VM running Ubuntu and following the HA venv install instructions?

I’ve only done Zigbee2MQTT so far, but that was just follow some basic instructions (half a dozen steps) installing the package, and running it up. And once the software is running HA just finds all the Zigbee devices through MQTT. Was probably one of the least painful things I’ve done. Zwave2MQTT is the next cab off the rank (I’m still using the native Zwave interface at the moment).

It shouldn’t differ between bare metal and a VM.

Use the addon SSH & Web terminal.

When logged in run

apk add socat

You’ll need to automate this so it happens on an update - there are threads on that.

Probably use the SSH & Web Terminal init command, inspiration here. Using CATT

I use VirtualBox on a Windows Server 2019 with a Silex DS-510 USB over IP device to connect a Z-Stick.

Thanks Nick.

I’ll mark this as the the solution as it actually worked! However other aspects of socat getting wiped in restart and just not being able to make it work past the initial install step meant that this approach seemed to flaky so I’ve abandoned it.

I think I’m going to try the Zwave2MQTT suggested earlier as that has other attractive aspects (such as decoupling my large ZWave network from HA, etc. I have some questions in relation to Zwave2MQTT, which I’ll post in a separate thread.

Thanks again.

Did you ever get this working and how?

I am looking to do the same thing. I have a hassio vm on a Proxmox server with a Homeseer Z-Net device (basically a Pi with a built in Z-Wave stick that uses ser2net to talk to Homeseer).

I’m thinking of moving to HA and want to have my hassio VM talk to the Z-Net device. My thought was to configure socat on the PVE host and expose it to the hassio VM. I haven’t tried this yet and wanted to see if you made any more progress before attempting.

Hi

Short answer is yes and no :slight_smile:

The reason why I didn’t get it working was because it is not possible to install and configure the required packages on hassio to get a remote Z-Wave stick appliance to work. The commands suggested by @nickrout did work in that I managed to install socat but then I could not manage to configure socat and get it it work properly to connect to my remote Z-Wave “server”.

So here’s what did work:

  1. I backed up my hassio installation (using the snapshot feature in Home Assistant, not the Proxmox backup/snapshot feature)
  2. I exported the hassio snapshot to my NAS
  3. Stopped my hassio VM in proxmox
  4. Created a plain Ubuntu 20.04 VM and installed HA using their Generic Linux Install method
  5. Now I have a plain Linux VM so can install other required tools to get remote Z-Wave to work
  6. I could not succesfully get socat to work for some reason. It created a /tty/ACM0 “device” on my new HA VM but HA refused to detect that device existed. So I went with the USBIP method
  7. The USBIP method worked perfectly. /tty/ACM0 created and detected by HA as a Z-Wave modem. Success!!
  8. I then restored by HA snapshot created earlier from within HA itself
  9. End result: 1) HA sees the remote Z-Wave stick (running on a RPI) as a local device; 2) I don’t need to have local USB device passthrough to Proxmox; 3) this means I can do live HA (Home Assistant) migration between my two Proxmox nodes with zero downtime - so true HA (High Availability) is achieved; 4) the HA (Home Assistant) snapshot feature was amazing in compeletely restoring my system & all configuration. Given I have a fairly extensive HA install that controls every aspect of our house, it was a bit of a leap of faith and I was very happy it was a seamless restore.

Hope this helps.

2 Likes

That helps a lot.

I’m moving from Homeseer to HA, so I’m installing a new instance of HA. I now currently have it running in a Debian 10 VM.

I’ll probably try to get socat working since I have a Z-NET device and it runs that natively. I’d have to hack into it to get USBIP configured, but will try that if socat fails.

But it is cool this works since my Proxmox server isn’t in an ideal location for a Z-Wave stick.

I think plenty of others had success with the socat method so you should be fine. I really just couldn’t be bothered troubleshooting it any more as I’ve already spent many hours trying to get hassio to work with socat.

Good luck.

This should be easier…vote for native socat support in HA: