thanks David for de Great tutorial. How can I add the USB client to supervised homeassistant? So I can add zwavesticks, memory sticks, RFX com usb devices to my virtual homeassistant machine
@@peterkleingunnewiek5068 The supervised install uses Debian so you can add the client software similar to what was done in the video. After you attach a USB device it should then be useable
@@TechTutorialsDavidMcKone Thanks for you Help, when type "apt install usbip hwdata usbutils " for installing client I get in Homeassistant web terminal "zsh: command not found: apt" or do I have to login into de supervisor docker container and must I then install portainer to do this or is the a more simple way to do that? I am using a vmware ova with supervisor-core and host installed. The Hacs installation did work from within this terminal.
@@peterkleingunnewiek5068 You need to be logged into the Debian operating system Once you add the USB devices there, Home Assistant should be able to detect them like any other USB device
Unfortunately I don't use Windows or WSL so I don't know I suggest searching Google as I tried myself but I don't know if what I found would be relevant E.g. I came across this github.com/vadimgrn/usbip-win2
As long as the USB flash drive shows up on the client you should be able to mount it You can check if it's detected by Linux by running the following command from a terminal session lsusb
I'm assuming you have two copies of the same device? So the vendor id AND product id are the same Not something I've run into as each device on the Pi is different But it would require some way of changing the product id I did a search on Google myself and didn't find anything particularly useful
@@TechTutorialsDavidMcKone Hi, thanks for you respone. nah 1 for the evohome ramses, the other is for DSMR (Dutch energy p1 monitor) but same vendor and id. but I did find a workaround. hope it will work.
What would be the minimum hardware (server) that one could imagine to transport exactly 1x USB into the network? Because I only need computing power on the client. In an ideal World even with POE ;)
@@TechTutorialsDavidMcKone For Sure I allready have such. But my PI3 (Pi1+2 do not have PoE Headders) is ideling with 3-5% CPU load for this task. On the other hand the FAN for cooling PoE is runng most of the time. (Btw. PoE for Pi5 is a technical desaster as known). So the intention was to hear about something that I had not on my screen. ;)
hey, i am running this in a proxmox LXC container but i cannot get it to make these command work : modprobe vhci-hcd echo 'vhci-hcd' >> /etc/modules i'm guessing these need to be runned at the host shell right ? because when i try to run them in the container it says : modprobe: FATAL: Module vhci-hcd not found in directory /lib/modules/5.15.102-1-pve and when i try to start the service none the less it says Job for usbip.service failed because the control process exited with error code. and the error code is Mar 26 19:43:39 octoprint-debian systemd[1]: Starting usbip client... Mar 26 19:43:39 octoprint-debian bash[15069]: usbip: error: import device Mar 26 19:43:39 octoprint-debian bash[15074]: usbip: error: import device Mar 26 19:43:39 octoprint-debian systemd[1]: usbip.service: Control process exited, code=exited, status=1/FAILURE Mar 26 19:43:39 octoprint-debian systemd[1]: usbip.service: Failed with result 'exit-code'. Mar 26 19:43:39 octoprint-debian systemd[1]: Failed to start usbip client.
Containers and VMs for that matter are limited in what they can do in all sorts of ways If you want to share hardware for instance you have to add it at the host level and then make it available to a container
@@TechTutorialsDavidMcKoneoh I see, I've been trying to get it to work all day, I'll have a try with that approach when I'll have time, otherwise I'll just use a lan USB extender, but I'd like to get it to work myself... And thanks for the quick update !
How do I share USB Devices between Windows systems over IP? Currently I'm using RDP+RemoteFX, but the USB device will obviously be disconnected if I disconnect from the RDP session.
Other than Windows projects that were abandoned a long time ago and so probably unsafe, I only came across commercial options for Windows clients like Flexihub Another option I suppose might be Windows Subsystem for Linux But that's why the video only covers Linux
Very useful for connecting USB devices on one machine from another. However, this solution is a little finnicky when the USB devices suddenly disconnect. (someone unplugs from the other side). Or, if the USB device operates in 2 different modes -- as often occurs with embedded systems which is seen by the linux system as a new USB device entirely. Devices like TI , or Nordic chipsets flip between "normal" (debug) and "device firmware update" mode.
Yeah, I find it works great for single use over distance, but as you say an interruption breaks things and requires manual intervention The code for this was written a long long time ago but it still works and it does the job I've been finding it very useful for a VM as it allows me to migrate it between nodes during patching without any downtime
@@TechTutorialsDavidMcKone - If USBIP supported sending an entire "hub" to a remote machine, then unplug/replug and devices switching behaviors while still connected should be a seamless experience. Do you know of a way to export 1 whole hub (and all peripherals then would be shared automatically )
thank you for the tutorial. i installed usbip but wasn't able to load the modules. getting "modprobe:FATAL Module usbip_host not found in directory /lib/modules/6.1.19-v8+. however the modules are located in /lib/modules/6.1.19-v8+/kernel/drivers/usb/usbip/ compressed as *.ko.xz
Are you logged in as root or are you using sudo to execute commands? And is the Ubuntu OS up to date Because it worked fine for me on the latest version while logged in as root
@@TechTutorialsDavidMcKone thanks for your suggestions. my raspberry just needed a reboot for some reason but ok. setting up the host and binding my usb-sata docking station worked well just with sudo. not sure the windows client connected succesfully to the adapter but i think it did. unfortunately no HDD drives showed up though.
@@nxtphone4696 Good to know things worked I haven't tried hard drives, more flash drives as well as USB Z-Wave and Zigbee controllers for Home Assistant
I tried to send a usb3.0 capture card over ip. And I could not get it to work. No card worked. Do you think it could be a driver issue? All other usb devices worked.
@@TechTutorialsDavidMcKone Would you consider adding It to the list of video ideas? I have tried an elgato, but that is very windows dependent. The one I recommend is the Evga XLR lite. It has linux support. Impressive specs for $50 with passthrough. This will work wonderfully for sending video over the network to a streaming pc/server. Ndi is too much cpu for older machines.
@@TechTutorialsDavidMcKone yes. And with an over a 30ft usb extender (active). The ability for other computers to pick up the signal is lost with the direct plug in approach.
it would be very helpful to put the commands you copy and paste in the description. I tried it but keep getting tcp connect errors. usbip: error: tcp connect Both devices, the Pi and the VM are are on the same subnet
@@TechTutorialsDavidMcKone yeah im on ubuntu latest and doesnt work , neither does ubuntu 22 , however it seems to already be on the machine from the start
@@EdwinFairchild It looks like the package has changed, at least for Ubuntu; linux-tools-generic It's still the same for Debian 12, so presumably Canonical made a change Unfortunately I don't use Ubuntu anymore so I'm not sure if the package will require different commands on Ubuntu
@@TechTutorialsDavidMcKone thanks I got it all working, it amazes me how easy and powerful this is. I am making a Hub of stm32 dev boards to all be remotely programmed and debugged on my desktop
It's usually not a good idea to expose things directly to the Internet If you need to access something over the Internet, the better security practice is to setup a VPN tunnel and access any devices through that Another concern though might be the extra delay due to the distance apart
@@TechTutorialsDavidMcKone I want to expose, don't worry about it, do you know how to do it, not by VPN or tunnel, then I can simply use TeamViewer. I want USB access over the internet period
Raspberry Pi:
Switch to root account
su -
Install software
apt install usbip
modprobe usbip_host
echo 'usbip_host' >> /etc/modules
List USB devices and note down the product/vendor
usbip list -l
Create start script
nano /usr/sbin/usbip_start.sh
#!/bin/bash
usb1='0781:5567'
usb2='0658:0200'
/usr/sbin/usbip bind --$(/usr/sbin/usbip list -p -l | grep '#usbid='$usb1'#' | cut '-d#' -f1)
/usr/sbin/usbip bind --$(/usr/sbin/usbip list -p -l | grep '#usbid='$usb2'#' | cut '-d#' -f1)
Make this executable
chmod +x /usr/sbin/usbip_start.sh
Create stop script
nano /usr/sbin/usbip_stop.sh
#!/bin/bash
usb1='0781:5567'
usb2='0658:0200'
/usr/sbin/usbip unbind --$(/usr/sbin/usbip list -p -l | grep '#usbid='$usb1'#' | cut '-d#' -f1)
/usr/sbin/usbip unbind --$(/usr/sbin/usbip list -p -l | grep '#usbid='$usb2'#' | cut '-d#' -f1)
killall usbipd
Make this executable
chmod +x /usr/sbin/usbip_stop.sh
Create service
nano /lib/systemd/system/usbipd.service
[Unit]
Description=usbip host daemon
After=network.target
[Service]
Type=forking
ExecStart=/usr/sbin/usbipd -D
ExecStartPost=/bin/bash -c '/usr/sbin/usbip_start.sh'
ExecStop=/bin/bash -c '/usr/sbin/usbip_stop.sh'
[Install]
WantedBy=multi-user.target
systemctl --system daemon-reload
systemctl enable usbipd.service
systemctl start usbipd.service
Check what USB devices are found
usbip list -p -l
---
Linux Client
Switch to root account
su -
Check USB device is attached
lsusb
Install software and create a service
apt install usbip hwdata usbutils -y
modprobe vhci-hcd
echo 'vhci-hcd' >> /etc/modules
Create start script
nano /usr/sbin/usbip_start.sh
#!/bin/bash
server1='192.168.200.7'
usb1='0781:5567'
usb2='0658:0200'
/usr/sbin/usbip attach -r $server1 -b $(/usr/sbin/usbip list -r $server1 | grep $usb1 | cut -d: -f1)
/usr/sbin/usbip attach -r $server1 -b $(/usr/sbin/usbip list -r $server1 | grep $usb2 | cut -d: -f1)
Make this executable
chmod +x /usr/sbin/usbip_start.sh
Create stop script
nano /usr/sbin/usbip_stop.sh
#!/bin/bash
/usr/sbin/usbip detach --port=$(/usr/sbin/usbip port | grep '' | sed -E 's/^Port ([0-9][0-9]).*/\1/')
/usr/sbin/usbip detach --port=$(/usr/sbin/usbip port | grep '' | sed -E 's/^Port ([0-9][0-9]).*/\1/')
Make this executable
chmod +x /usr/sbin/usbip_stop.sh
Create service
nano /lib/systemd/system/usbip.service
[Unit]
Description=usbip client
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPost=/bin/bash -c '/usr/sbin/usbip_start.sh'
ExecStop=/bin/bash -c '/usr/sbin/usbip_stop.sh'
[Install]
WantedBy=multi-user.target
systemctl --system daemon-reload
systemctl enable usbip.service
systemctl start usbip.service
Check USB device is attached
usbip port
lsusb
thanks David for de Great tutorial.
How can I add the USB client to supervised homeassistant?
So I can add zwavesticks, memory sticks, RFX com usb devices to my virtual homeassistant machine
@@peterkleingunnewiek5068 The supervised install uses Debian so you can add the client software similar to what was done in the video. After you attach a USB device it should then be useable
@@TechTutorialsDavidMcKone Thanks for you Help, when type "apt install usbip hwdata usbutils " for installing client I get in Homeassistant web terminal "zsh: command not found: apt" or do I have to login into de supervisor docker container and must I then install portainer to do this or is the a more simple way to do that? I am using a vmware ova with supervisor-core and host installed. The Hacs installation did work from within this terminal.
@@peterkleingunnewiek5068 You need to be logged into the Debian operating system
Once you add the USB devices there, Home Assistant should be able to detect them like any other USB device
BigTHX for Information. Very good guidance !!!👌
I needed a long USB cable for my project and I found it here. Arduino Mega Raspberry Pi Ubuntu. Thank you David.
Thanks for the suggestion
can you please tell me how to connect the devices in ARM based server and WSL as a client.
Unfortunately I don't use Windows or WSL so I don't know
I suggest searching Google as I tried myself but I don't know if what I found would be relevant
E.g. I came across this
github.com/vadimgrn/usbip-win2
I want to share a usb containing some pictures, where would i access those pictures from on the clinet machine ( ubuntu)?
As long as the USB flash drive shows up on the client you should be able to mount it
You can check if it's detected by Linux by running the following command from a terminal session
lsusb
i have 2 usb's with same vendor id, do you have a fix for it ? thanks for the video!
I'm assuming you have two copies of the same device?
So the vendor id AND product id are the same
Not something I've run into as each device on the Pi is different
But it would require some way of changing the product id
I did a search on Google myself and didn't find anything particularly useful
@@TechTutorialsDavidMcKone Hi, thanks for you respone. nah 1 for the evohome ramses, the other is for DSMR (Dutch energy p1 monitor) but same vendor and id. but I did find a workaround. hope it will work.
@@elwinbeekman8531 many time it's possible to flash a new serial number to a USB device like this. However, your mileage may vary ..
What would be the minimum hardware (server) that one could imagine to transport exactly 1x USB into the network? Because I only need computing power on the client. In an ideal World even with POE ;)
Not sure what else there is other than a Raspberry Pi or similar as you need something to run Linux
But you can get a POE HAT for a Pi if it helps
@@TechTutorialsDavidMcKone For Sure I allready have such. But my PI3 (Pi1+2 do not have PoE Headders) is ideling with 3-5% CPU load for this task. On the other hand the FAN for cooling PoE is runng most of the time. (Btw. PoE for Pi5 is a technical desaster as known).
So the intention was to hear about something that I had not on my screen. ;)
hey, i am running this in a proxmox LXC container but i cannot get it to make these command work :
modprobe vhci-hcd
echo 'vhci-hcd' >> /etc/modules
i'm guessing these need to be runned at the host shell right ?
because when i try to run them in the container it says :
modprobe: FATAL: Module vhci-hcd not found in directory /lib/modules/5.15.102-1-pve
and when i try to start the service none the less it says Job for usbip.service failed because the control process exited with error code.
and the error code is
Mar 26 19:43:39 octoprint-debian systemd[1]: Starting usbip client...
Mar 26 19:43:39 octoprint-debian bash[15069]: usbip: error: import device
Mar 26 19:43:39 octoprint-debian bash[15074]: usbip: error: import device
Mar 26 19:43:39 octoprint-debian systemd[1]: usbip.service: Control process exited, code=exited, status=1/FAILURE
Mar 26 19:43:39 octoprint-debian systemd[1]: usbip.service: Failed with result 'exit-code'.
Mar 26 19:43:39 octoprint-debian systemd[1]: Failed to start usbip client.
Containers and VMs for that matter are limited in what they can do in all sorts of ways
If you want to share hardware for instance you have to add it at the host level and then make it available to a container
@@TechTutorialsDavidMcKoneoh I see, I've been trying to get it to work all day, I'll have a try with that approach when I'll have time, otherwise I'll just use a lan USB extender, but I'd like to get it to work myself...
And thanks for the quick update !
How do I share USB Devices between Windows systems over IP?
Currently I'm using RDP+RemoteFX, but the USB device will obviously be disconnected if I disconnect from the RDP session.
Other than Windows projects that were abandoned a long time ago and so probably unsafe, I only came across commercial options for Windows clients like Flexihub
Another option I suppose might be Windows Subsystem for Linux
But that's why the video only covers Linux
There's dorssel/usbipd-win
Very useful for connecting USB devices on one machine from another. However, this solution is a little finnicky when the USB devices suddenly disconnect. (someone unplugs from the other side). Or, if the USB device operates in 2 different modes -- as often occurs with embedded systems which is seen by the linux system as a new USB device entirely. Devices like TI , or Nordic chipsets flip between "normal" (debug) and "device firmware update" mode.
Yeah, I find it works great for single use over distance, but as you say an interruption breaks things and requires manual intervention
The code for this was written a long long time ago but it still works and it does the job
I've been finding it very useful for a VM as it allows me to migrate it between nodes during patching without any downtime
@@TechTutorialsDavidMcKone - If USBIP supported sending an entire "hub" to a remote machine, then unplug/replug and devices switching behaviors while still connected should be a seamless experience. Do you know of a way to export 1 whole hub (and all peripherals then would be shared automatically )
@@beadon1Nothing I've really looked into. I just wanted to separate USB devices from Proxmox VE and so USB over IP setup has been working fine
thank you for the tutorial. i installed usbip but wasn't able to load the modules. getting "modprobe:FATAL Module usbip_host not found in directory /lib/modules/6.1.19-v8+.
however the modules are located in /lib/modules/6.1.19-v8+/kernel/drivers/usb/usbip/ compressed as *.ko.xz
Are you logged in as root or are you using sudo to execute commands?
And is the Ubuntu OS up to date
Because it worked fine for me on the latest version while logged in as root
@@TechTutorialsDavidMcKone thanks for your suggestions. my raspberry just needed a reboot for some reason but ok. setting up the host and binding my usb-sata docking station worked well just with sudo. not sure the windows client connected succesfully to the adapter but i think it did. unfortunately no HDD drives showed up though.
@@nxtphone4696 Good to know things worked
I haven't tried hard drives, more flash drives as well as USB Z-Wave and Zigbee controllers for Home Assistant
I tried to send a usb3.0 capture card over ip. And I could not get it to work. No card worked. Do you think it could be a driver issue? All other usb devices worked.
Unfortunately I don't have one to test myself but it could be a driver problem
@@TechTutorialsDavidMcKone Would you consider adding It to the list of video ideas?
I have tried an elgato, but that is very windows dependent.
The one I recommend is the Evga XLR lite. It has linux support. Impressive specs for $50 with passthrough. This will work wonderfully for sending video over the network to a streaming pc/server. Ndi is too much cpu for older machines.
Does it work if you plug it directly into the computer rather than connecting over the network?
@@TechTutorialsDavidMcKone yes. And with an over a 30ft usb extender (active). The ability for other computers to pick up the signal is lost with the direct plug in approach.
it would be very helpful to put the commands you copy and paste in the description.
I tried it but keep getting tcp connect errors.
usbip: error: tcp connect
Both devices, the Pi and the VM are are on the same subnet
Check the pinned comment as that contains the details
The description doesn't accept some characters
this video needs an update as "apt install usbip" won't work anymore. the package is not found
What OS are you using as it still works for Debian 12?
@@TechTutorialsDavidMcKone yeah im on ubuntu latest and doesnt work , neither does ubuntu 22 , however it seems to already be on the machine from the start
@@EdwinFairchild It looks like the package has changed, at least for Ubuntu; linux-tools-generic
It's still the same for Debian 12, so presumably Canonical made a change
Unfortunately I don't use Ubuntu anymore so I'm not sure if the package will require different commands on Ubuntu
@@TechTutorialsDavidMcKone thanks I got it all working, it amazes me how easy and powerful this is. I am making a Hub of stm32 dev boards to all be remotely programmed and debugged on my desktop
@@EdwinFairchild Good to know it's working
It is very useful, but I hadn't considered stm32
how to share over the internet, i can't find a single video, all are for local networks
It's usually not a good idea to expose things directly to the Internet
If you need to access something over the Internet, the better security practice is to setup a VPN tunnel and access any devices through that
Another concern though might be the extra delay due to the distance apart
@@TechTutorialsDavidMcKone I want to expose, don't worry about it, do you know how to do it, not by VPN or tunnel, then I can simply use TeamViewer. I want USB access over the internet period
Thanks!
Many thanks, much appreciated