Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to passthoug a USB device to a docker?

Featured Replies

Hi all

 

Im running Home assistant in docker.

I have an USB dongel Sonoff Zigbee controller 3.0.

 

How can i passthough the dongel to my docker?

 

Im a little confused about all the topic and the correct way doing this.

Do i need this?

 

I can see this in the log

 

Feb  2 15:08:31 Kratos kernel: usb 1-14: USB disconnect, device number 7
Feb  2 15:08:31 Kratos kernel: cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
Feb  2 15:08:31 Kratos kernel: cp210x 1-14:1.0: device disconnected
Feb  2 15:09:27 Kratos kernel: usb 1-14: new full-speed USB device number 8 using xhci_hcd
Feb  2 15:09:27 Kratos kernel: cp210x 1-14:1.0: cp210x converter detected
Feb  2 15:09:27 Kratos kernel: usb 1-14: cp210x converter now attached to ttyUSB0
Feb  2 15:36:28 Kratos kernel: usb 1-14: USB disconnect, device number 8
Feb  2 15:36:28 Kratos kernel: cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
Feb  2 15:36:28 Kratos kernel: cp210x 1-14:1.0: device disconnected
Feb  2 15:37:24 Kratos kernel: usb 1-14: new full-speed USB device number 9 using xhci_hcd
Feb  2 15:37:24 Kratos kernel: cp210x 1-14:1.0: cp210x converter detected
Feb  2 15:37:24 Kratos kernel: usb 1-14: cp210x converter now attached to ttyUSB0

Thanks!

 

 

Edited by DanielPT

I have been searching for an answer and finally was able to do so! This reply also serves as my future reference.

  1. Plug in your USB device (not sure if restart is required)
  2. Open the Unraid console
  3. ls /dev/serial/by-id

     

  4. Copy the device name, for me it is `usb-Nabu_Casa_SkyConnect_v1.0_ba7a2aba7a2aba7a2aba7a2a-if00-port0`
  5. In your docker config, add another Device
  6. Make sure to have the Config Type and Value correct as below
  7. Config Type: Device
    Name: Any Device Name You Want
    Value: /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_ba7a2aba7a2aba7a2aba7a2a-if00-port0:/dev/ttyUSB0
  8. Done!

Please note that the value before colon is the path to your USB device, and the value after colon is the path within the container. It wasn't sccessful when I was trying to do

/dev/skyconnect

, until I do

/dev/ttyUSB0

.

 

The USB device then shows in my Home Assistant container.

 

Tips: If USB 3.0 port is not working, try USB 2.0 port.

Edited by PzrrL
add tips

  • 2 weeks later...

I set up a blooth proxy with an esp32... Cost me ten euro and it works immediately.. I also put another one at the other end of the house, now bluetooth range is also great..

  • 4 months later...

When I run the following command on my Unraid terminal

 

ls /dev/serial/by-id

 

I get no such file or directory

 

Also ls dev gives me a list of folders by there is NO folder named serial.

 

I too would like to be able to access my dvd writer from  WindowsinDocker 

 

I also have a vm of Windows 11 and it can access the same dvd writer fine, 

 

But on my Unraid server Unraid 6.12.9 Xeon E1240 and 32 gb of memory, WindowsinDocker runs better then my VM and is also a much more enjoyable experience. I have allocated 4 cores to both. And do not run them simultaneously. Only one at a time.

 

I originally posted to this thread  and I got a reply to check this thread that I am now posting in.

 

 

  • 2 months later...
On 2/4/2024 at 4:13 PM, PzrrL said:

I have been searching for an answer and finally was able to do so! This reply also serves as my future reference.

  1. Plug in your USB device (not sure if restart is required)
  2. Open the Unraid console
  3. ls /dev/serial/by-id

     

  4. Copy the device name, for me it is `usb-Nabu_Casa_SkyConnect_v1.0_ba7a2aba7a2aba7a2aba7a2a-if00-port0`
  5. In your docker config, add another Device
  6. Make sure to have the Config Type and Value correct as below
  7. Config Type: Device
    Name: Any Device Name You Want
    Value: /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_ba7a2aba7a2aba7a2aba7a2a-if00-port0:/dev/ttyUSB0
  8. Done!

Please note that the value before colon is the path to your USB device, and the value after colon is the path within the container. It wasn't sccessful when I was trying to do

/dev/skyconnect

, until I do

/dev/ttyUSB0

.

 

The USB device then shows in my Home Assistant container.

This solution worked without a problem for me. Thanks!

  • 2 months later...

I want to add to this that on a new container, i also had to go to: http://<ip>:8123/config/integrations/dashboard

 

And actually add the usb-device explicitly (perhaps obvious to anyone). And then once i added it by clicking on Configure and in my case choosing Zigbee - and the wizard was done, i could confirm it by going in to the uri:  http://<ip>:8123/config/hardware.

 

The above guide, from @PzrrL was therefor completely correct and there's no need to set the docker instance in Privileged mode (make everything accessible).

 

You can also make sure it exists by entering the console on the docker-image and go: ls /dev

There you should see the ttyUSB0 as well.

Edited by papaHoff

  • 2 months later...

can anyone help me out please? 

 

i've used @PzrrL guide above, when i add the device and updating the container the command is failing with the below:

 

Quote

docker: Error response from daemon: error gathering device information while adding custom device " /dev/serial/by-id usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_be9f748d44d9ee11b23eb44c37b89984-if00-port0": no such file or directory.

 

anyone point me in the right direction?

  • 4 weeks later...
On 1/19/2025 at 12:14 AM, ThEgOg said:

docker: Error response from daemon: error gathering device information while adding custom device " /dev/serial/by-id usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_be9f748d44d9ee11b23eb44c37b89984-if00-port0": no such file or directory.

 

Sorry I just saw your post now. I guess you are missing the slash "/" between by-id and "usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_be9f748d44d9ee11b23eb44c37b89984-if00-port0"

  • 1 month later...

been searching for this for so long! Thanks a lot for sharing!

  • 3 weeks later...
On 6/20/2024 at 4:59 AM, Vetteman said:

When I run the following command on my Unraid terminal

 

ls /dev/serial/by-id

 

I get no such file or directory

 

Also ls dev gives me a list of folders by there is NO folder named serial.

 

I too would like to be able to access my dvd writer from  WindowsinDocker 

 

I also have a vm of Windows 11 and it can access the same dvd writer fine, 

 

But on my Unraid server Unraid 6.12.9 Xeon E1240 and 32 gb of memory, WindowsinDocker runs better then my VM and is also a much more enjoyable experience. I have allocated 4 cores to both. And do not run them simultaneously. Only one at a time.

 

I originally posted to this thread  and I got a reply to check this thread that I am now posting in.

 

 

@Vetteman maybe you figured it out by now, but if /dev/serial/ cannot be found, then it's because the device is not recognized. I had the same issue. Try to connect it to a USB2 port and see if it works, mine did.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.