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.
infocus13
(Dimitry Katchalov)
July 21, 2020, 12:00am
10
Hi
Short answer is yes and no
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:
I backed up my hassio installation (using the snapshot feature in Home Assistant, not the Proxmox backup/snapshot feature)
I exported the hassio snapshot to my NAS
Stopped my hassio VM in proxmox
Created a plain Ubuntu 20.04 VM and installed HA using their Generic Linux Install method
Now I have a plain Linux VM so can install other required tools to get remote Z-Wave to work
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
The USBIP method worked perfectly. /tty/ACM0 created and detected by HA as a Z-Wave modem. Success!!
I then restored by HA snapshot created earlier from within HA itself
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.
infocus13
(Dimitry Katchalov)
July 21, 2020, 9:25am
12
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.
ryans
(Ryan S)
September 19, 2020, 4:13pm
13
This should be easier…vote for native socat support in HA :
Why is it cumbersome to mount remote serial devices as /dev/tty virtual devices, especially for those who aren’t as technical? Adding a native HA feature would allow EASILY using remote serial devices that are not physically connected to the same device that runs HA with any of the existing HA integrations. Basically a feature, exposed through HA UI, to use socat to mount virtual /dev/tty devices, which then ANY integration could access these remote serial devices.
This could be limited to su…
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
infocus13
(Dimitry Katchalov)
August 13, 2022, 8:18pm
15
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?
brendan
(Brendan)
September 10, 2022, 11:37pm
19
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.
felix63
September 11, 2022, 9:41am
20
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.
Paxy
(Paxy)
September 15, 2022, 11:35am
21
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 ?
Paxy
(Paxy)
September 15, 2022, 1:58pm
23
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
USBIP is built in to OS9:
USB/IP support (on Kernel level).
home-assistant:dev
← agners:add-usbip-modules
2 Likes
Nicheeee, Let me upgrade to OS9 and check
Has anyone figured out how to enable this on HAOS 9?
1 Like
sithanas
(jack)
September 30, 2022, 2:14am
28
Not quite fully baked yet apparently…
opened 11:34PM - 08 Sep 22 UTC
os
### Describe the issue you are experiencing
The most recent release of home a… ssistant made a few references to using USBIP modules to utilize as an option for remote bluetooth controllers, which I was able to get working in a core install of home assistant. Unfortunately the usbip kernel module and utility is missing from the build. Taking a look I was able to enable it in a few places and build the OS successfully https://github.com/ilya-ws/operating-system/tree/usbip
I have also tested and it is verified working for a bluetooth dongle from a remote machine. Testing with 9.0 rc2 I am however unable to find the usbip binaries.
### What operating system image do you use?
generic-x86-64 (Generic UEFI capable x86-64 systems) AND
odroid-n2 (Hardkernel ODROID-N2/N2+)
### What version of Home Assistant Operating System is installed?
9.0rc2
### Did you upgrade the Operating System.
Fresh install tested on generic-x86-64
### Steps to reproduce the issue
USBIP modules not compiled by the build and is unavailable in the os.
### Anything in the Supervisor logs that might be useful for us?
```txt
n/a
```
### Anything in the Host logs that might be useful for us?
```txt
n/a
```
### System Health information
_No response_
### Additional information
_No response_
EDIT: Reopening, tested 9.0rc2 and am unable to find the usbip kernel module / client. On my build of the OS I am able to get usbip working.
opened 08:34PM - 12 Sep 22 UTC
enhancement
### Describe the issue you are experiencing
Supervisor does now allow interacti… ng with usbip /sys device with newest home assistant os (that includes usbip drivers).
### What is the used version of the Supervisor?
2022.09.0
### What type of installation are you running?
Home Assistant OS
### Which operating system are you running on?
Home Assistant Operating System
### What is the version of your installed operating system?
9.0rc2
### What version of Home Assistant Core is installed?
2022.9.1
### Steps to reproduce the issue
I had initially reported this issue to the home assistant OS repo [here](https://github.com/home-assistant/operating-system/issues/2119) but it would seem more fitting here.
Home assistant OS 9.0 has added the kernel level usbip drivers to allow addon containers to mount usbip devices, unfortunately as it currently stands the addon config template does not provide enough functionality to fully implement this feature.
To test I created a basic addon container that has usbip binaries along with ssh to navigate inside the container, [here](https://github.com/irakhlin/usbip-hassio).
After correctly loading the vhci-hcd drivers, inside the container run the following:
```
root@7cbb8c6e-usbipclient:/sys/devices/platform/vhci_hcd.0# usbip list -r 10.0.0.77
Exportable USB devices
======================
- 10.0.0.77
1-1.4: Realtek Semiconductor Corp. : unknown product (0bda:a725)
: /sys/devices/platform/soc/20980000.usb/usb1/1-1/1-1.4
: Wireless / Radio Frequency / Bluetooth (e0/01/01)
: 0 - Wireless / Radio Frequency / Bluetooth (e0/01/01)
: 1 - Wireless / Radio Frequency / Bluetooth (e0/01/01)
```
```
root@7cbb8c6e-usbipclient:/sys/devices/platform/vhci_hcd.0# usbip --debug attach -r 10.0.0.77 -b 1-1.4
usbip: debug: usbip.c:129:[run_command] running command: `attach'
libusbip: debug: vhci_driver.c:269:[usbip_vhci_driver_open] available ports: 16
libusbip: debug: vhci_driver.c:281:[usbip_vhci_driver_open] available controllers: 1
libusbip: debug: vhci_driver.c:128:[refresh_imported_device_list] controller 0
libusbip: debug: vhci_driver.c:67:[parse_status] hub hs port 0 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub hs port 1 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub hs port 2 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub hs port 3 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub hs port 4 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub hs port 5 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub hs port 6 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub hs port 7 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub ss port 8 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub ss port 9 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub ss port 10 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub ss port 11 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub ss port 12 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub ss port 13 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub ss port 14 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:67:[parse_status] hub ss port 15 status 4 speed 0 devid 0
libusbip: debug: vhci_driver.c:69:[parse_status] sockfd 0 lbusid 0-0
libusbip: debug: vhci_driver.c:104:[parse_status] exit
usbip: debug: usbip_attach.c:100:[import_device] got free port 0
libusbip: debug: vhci_driver.c:367:[usbip_vhci_attach_device2] writing: 0 3 65541 2
libusbip: debug: vhci_driver.c:372:[usbip_vhci_attach_device2] attach attribute path: /sys/devices/platform/vhci_hcd.0/attach
usbip: debug: sysfs_utils.c:18:[write_sysfs_attribute] error opening attribute /sys/devices/platform/vhci_hcd.0/attach
libusbip: debug: vhci_driver.c:376:[usbip_vhci_attach_device2] write_sysfs_attribute failed
usbip: error: import device
```
While I do see /sys/devices/platform/vhci_hcd.0/attach mounted in the container:
```
oot@7cbb8c6e-usbipclient:/sys/devices/platform/vhci_hcd.0# ls -l
total 0
--w------- 1 root root 4096 Sep 12 16:00 attach
--w------- 1 root root 4096 Sep 12 16:06 detach
lrwxrwxrwx 1 root root 0 Sep 12 16:06 driver -> ../../../bus/platform/drivers
-rw-r--r-- 1 root root 4096 Sep 12 16:06 driver_override
-r--r--r-- 1 root root 4096 Sep 12 16:06 modalias
-r--r--r-- 1 root root 4096 Sep 12 16:00 nports
drwxr-xr-x 2 root root 0 Sep 12 16:06 power
-r--r--r-- 1 root root 4096 Sep 12 16:00 status
lrwxrwxrwx 1 root root 0 Sep 12 16:06 subsystem -> ../../../bus/platform
-rw-r--r-- 1 root root 4096 Sep 12 16:00 uevent
drwxr-xr-x 5 root root 0 Sep 12 16:06 usb3
drwxr-xr-x 5 root root 0 Sep 12 16:06 usb4
-rw-r--r-- 1 root root 4096 Sep 12 16:06 usbip_debug
```
My understanding is that /sys is mounted as read only:
```
root@7cbb8c6e-usbipclient:/sys/devices/platform/vhci_hcd.0# cat attach
cat: attach: Permission denied
root@7cbb8c6e-usbipclient:/sys/devices/platform/vhci_hcd.0# echo 'test' > attach
-bash: attach: Read-only file system
```
I was able to manually modify the addon containers mount points by adding:
```
/sys/devices/platform/vhci_hcd.0:/sys/devices/platform/vhci_hcd.0 rw
/sys/bus/platform/drivers/vhci_hcd:/sys/bus/platform/drivers/vhci_hcd rw
```
However I do not see a way to accomplish this via the addon config template. My understanding is that we would want to be able to mount
/sys/devices/platform/vhci_hcd.0:/sys/devices/platform/vhci_hcd.[x] as the number would increase with each additional usbip device.
### Anything in the Supervisor logs that might be useful for us?
```txt
Nothing of interest
```
### Additional information
_No response_
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).