Is it possible to get USBIP or socat on HASSOS?

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.

5 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:

Hello i have HA OS vm in a synology ds918+ nas.
The nas is far away from the balcony so Mi Flora bluetooth plants there are not detected.

Near the balcony i have a linux box with bluetooth dongle.
So i want to share this bluetooth bongle over IP to the NAS.

I tryed USBIP method, but on the nas i don’t see the directory where to create client service :
RPi as Z-Wave/ZigBee-over-IP server for Hass - Share your Projects! - Home Assistant Community (home-assistant.io)

At this step :
vi /lib/systemd/system/usbip.service

there is no /lib/systemd directory
help please :slight_smile:

Have you tried creating that directory and the usbip.service file?

Guys need your inputs please.

My Setup

  • I’m running Home Assistant Operating System with Hyper-V

What I’ve done so far

  • Installed usbipd-win on my Windows Host system (From where I want to share my USB from)
  • Installed usbip in the HA OS via SSH

Problem:

  • When I’m trying to connect to the USB from the host system to the HA OS I’m getting the following error.

Can any one help me how can I get the vhci_driver in my HA OS Alpine instance

1 Like

heuuuu, no, i will try xD

i have exactly the same problem.

USB Bluetooth Stick on Windows Host machine shared with USBIPD for windows in CMD:
usbipd list
usbipd bind --busid 1-7

ind Homeassistant OS running in HyperV within the addon Terminal & SSH:
apk add linux-tools-usbip
usbip attach --remote=192.168.0.100 --busid=1-7

gives error:
libusbip: error: udev_device_new_from_subsystem_sysname failed
usbip: error: open vhci_driver

i tried 2 different USB Bluetooth Adapters

is there another possibility to mount the USB bluetooth to homeassistant OS in hyperV?

USBIP is a bit finicky and it is documented to only work on LINUX machines. I have found in VM’s on Synology it can be really hit and miss.

I’m running zwave2mqtt (and zigbee2mqtt) on a separate machine using docker which is really, really ideal. If I need to upgrade either I just have to manipulate the container and getting it started was just like 123 because once you’ve worked out the correct command to start your docker it is done.

Got same issue as you.
To solution was to exit docker and execute modprobe vhci-hcd in main shell, than return to docker for usbip attach.

Hey @Paxy , Could you please explain what do you mean by “main shell” I mean where exactly ?

SSH access to HASSOS (ssh to port 2222 terminal). There you modprobe module. Than access to docker homeassistant and do usbip attach.

1 Like

Getting no such files or directory error :frowning:

USBIP is built in to OS9:

USB/IP support (on Kernel level).

2 Likes

Nicheeee, Let me upgrade to OS9 and check :slight_smile:

Has anyone figured out how to enable this on HAOS 9?

1 Like

Not quite fully baked yet apparently…

My read on those two threads is that the kernel module is there but an add-on would have to be constructed to load it and make it usable, and the add-on is actually impossible to make right now based on privilege restrictions on add-ons (looks like that’s going to be fixed).