Where can we find documentation on how to implement this ?
I was using this with my old supervised install. I still have my USB/IP hub
Where can we find documentation on how to implement this ?
I was using this with my old supervised install. I still have my USB/IP hub
Not the complete answer, but I already have this set up and working well on a separate Hyper-V VM running docker and zwavejs2mqtt, which communicates directly with my Aeotec Z-Stick. The VM is running on the machine with the stick plugged in, however it could be a completely different environment since it’s all over IP.
If your hardware is plugged into a windows box, you need to install and configure this:
https://github.com/dorssel/usbipd-win
From there I would say it’s just a matter of setting up the usbip client on HAOS. However, although that part was easy, what wasn’t as easy was having to create a custom service that not only runs usbip on startup, but that also will restart it if it crashes / exits.
Additionally, you’ll want to run the windows usbip command in a task that runs on startup (this is the server, the part that exposes the stick over IP).
This seems like what I would like to do. Would you be able to share the code for the custom service?
Hi there,
I’m trying to do the same - did you ever get this working?
Got working usbip using this add-on GitHub - AverageJoe89/hassio-usbip-mounter
It does not have proper handling for restart/recovery - however I am using set of service call to recovery in case of crash.
That Addon is amazing, but it crashes all times
The USB Stick is mounted and the addon crash with error stick is busy
I tried that addon. First day it was working fine but then my HA instance started to do weird things. I was not able to start/stop/update all of my addons. From GUI perspective I was stuck. Even a reboot of HA did not help. I did not know what to do. Researched hours, checked the logs and also used ChatGPT o1 preview to debug.
In the end I have stopped it addon via HA CLI. After that I was able to remove it, update other addons and it was fine again.
Take care using that addon. It’s nice to have it, but looks like to be really buggy.
Well, I could not sleep anymore so I created my version of that addon Thanks to irakhlin for the great idea and inspiration. If you want to give it a try, you can find it here:
Thanks so much for this @syngin. I have Home Assistant OS running on a server all the way at one end of my place and wanted to access a USB bluetooth adapter connected to an Orange Pi PC that is better positioned to cover the living area. I am using Rudy as my USB/IP server on the Pi and so far everything seems to be working great!
Hello, I would like to install the client under Add-ons → Repositories. When I use the GitHub link, I get the error that it is not a validated add-on repository. What do i have to do?
@Shadow23730, @syngin’s github repo is not set up as a Home Assistant add-on repository (that was confusing to me too when I read the installation instructions). You need to set up your own add-on repository like this and then clone his github repo (which is the add-on itself) into the first level directory of your custom add-on repo. And remember, your add-on repo URL needs to be accessible to Home Assistant. You should be able to use the SSH add-on to set this up directly in Home Assistant, but while I was able to SSH in and create the repo, I could not get it to work (probably misconfiguration on my part) so I ended up creating the add-on repository in my self hosted Gitea and then I was able to add it using the add-on store button in Home Assistant. Hope that helps!
Hey guys,
thank you for your feedback. I have released version 0.1.1. The README also has a button to click where you can add my repo.
repository.yaml
file for Home Assistant add-on repository metadata, enabling add-on discovery and compatibility with Home Assistant.@syngin, any chance you could add ability to bind by vendor and product id instead of just bus id? I had to reboot my server due to power failure and noticed the bus id changed.
@tekdoc Unfortunately, USBIP doesn’t allow for that, as it binds to the bus ID of the port where your USB device is connected.
In usbip
, the bus ID of a USB device is assigned by the Linux kernel, which reflects the physical structure of the USB ports, not controlled by usbip
. This means you can’t manually assign or alter the bus ID of a USB device to a specific ID for usbip
.
The bus ID should remain consistent as long as the device is connected to the same port. Did you switch the USB port for your device?
No, it was working at bus id 7-1 when I first set it up, plug stayed in the same port, rebooted and it came back up as 6-1. Hurricane Milton knocked our power out for 3 days but we are back up now. Hopefully I won’t have to reboot for a while.
Hello @syngin.
I just started using your addon.
I have USBIPD up and running and two Zigbe e dongled shared from Win11pro (hyper-v) to HAOS.
Yet i struggle with activating both antennas in HA hardware and your addon.
One by one antena is working (or ZHA or Z2M), but when i try to config both i get errors:
7:49:24] INFO: -------------------- Starting USBIP Client Add-on --------------------
[17:49:24] INFO: ----------------------------------------------------------------------
[17:49:24] INFO:
[17:49:24] INFO: Exportable USB devices
[17:49:24] INFO: ======================
[17:49:24] INFO: - 192.168.1.200
[17:49:24] INFO: 2-1: Silicon Labs : CP210x UART Bridge (10c4:ea60)
[17:49:24] INFO: : USB\VID_10C4&PID_EA60\4ACCFEC688D8ED11B0DA786162C613AC
[17:49:24] INFO: : (Defined at Interface level) (00/00/00)
[17:49:24] INFO: : 0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/00/00)
[17:49:24] INFO:
[17:49:24] INFO: 1-4: QinHeng Electronics : CH340 serial converter (1a86:7523)
[17:49:24] INFO: : USB\VID_1A86&PID_7523\5&113358D1&0&4
[17:49:24] INFO: : Vendor Specific Class / unknown subclass / unknown protocol (ff/00/00)
[17:49:24] INFO: : 0 - Vendor Specific Class / unknown subclass / unknown protocol (ff/01/02)
[17:49:24] INFO: Adding device from server 192.168.1.200 on bus 1-4
[17:49:24] INFO: Adding device from server 192.168.1.200 on bus 2-1
cont-init: info: /etc/cont-init.d/create_devices.sh exited 0
cont-init: info: running /etc/cont-init.d/load_modules.sh
[17:49:24] INFO: Loading vhci-hcd kernel module...
[17:49:24] INFO: Successfully loaded vhci-hcd module.
cont-init: info: /etc/cont-init.d/load_modules.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun usbip (no readiness notification)
[17:49:24] INFO: Attaching USBIP devices
[17:49:24] INFO: Detaching device 1-4 from server 192.168.1.200 if already attached
s6-rc: info: service legacy-services successfully started
[17:49:25] INFO: Detaching device 2-1 from server 192.168.1.200 if already attached
usbip: error: open vhci_driver (is vhci_hcd loaded?)
[17:49:25] ERROR: Failed to attach USBIP devices. Is USBIP server online and device(s) usb attached?
My config in addon is:
discovery_server_address: 192.168.1.200
devices:
- server_address: 192.168.1.200
bus_id: 1-4
- server_address: 192.168.1.200
bus_id: 2-1
Hi @dusanhauko
I will add more verbose debugging to the code to be able to see more details. Also I am using two devices but they are not both for Zigbee. One is for Zigbee and the other for Z-Wave. It’s working flawless so far. Let’s see what the new logs will output when I am ready.
Hi @dusanhauko
I have added more verbose debugging- Please update to the latest version.
Hey
Actually i updated addon, start with one device and was not working. Then i added both usb antennas, enabled debug loging and pressed start.
Dont ask me, but both devices are working with clean log. Dont know if i want to ruin setup today .
We’ll se Upon next hardware reboot if there will be issues again.
Regards
Anyone trying this on RasPi, you will need to mod the install before it will bind the ports. SOLVED: is usbip usb redirector working for anyone? / Kernel & Hardware / Arch Linux Forums
Also @syngin I deffo owe you a beer this is awesome, was moving my HA install to Proxmox cluster and was screwing around with different solutions, this worked on my RPi pretty easily in comparison, need to actually move the real enviroment over now, wish me luck!