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.

Provide access to USB device in a docker?

Featured Replies

I want to add a Bluetooth dongle so that Home Assistant can poll Bluetooth devices, is this possible or does it have to be done through a VM?

 

Might find the info you are looking for here?

  • 2 years later...

the best method to passthrough usb to docker is via device by-id

open unraid terminal
type 

ls -l /dev/serial/by-id

 

you will get output of your devices with names

image.thumb.png.d371827b57ff04dc9d08d30380e94fef.png

 

copy the whole BLUE name of your device

 

go to your docker and edit config

 

add /dev/serial/by-id/  before pasting the name from above.

eg

/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_dcf756dbb712ec118bca20c7bd930c07-if00-port0

then add :/dev/zigbee to the end -  this is the container mount point

 

so you end up with this in your Docker Host config:

Quote

/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_dcf756dbb712ec118bca20c7bd930c07-if00-port0:/dev/zigbee

 

if anywere inside your docker program it asks for the device location you would set it to :
/dev/zigbee

 

image.png.3ba1e945bf3e41cc9e99c6e526faaecb.png

Edited by TRusselo

  • 1 year later...
On 2/2/2023 at 6:57 PM, TRusselo said:

the best method to passthrough usb to docker is via device by-id

open unraid terminal
type 

ls -l /dev/serial/by-id

 

you will get output of your devices with names

image.thumb.png.d371827b57ff04dc9d08d30380e94fef.png

 

copy the whole BLUE name of your device

 

go to your docker and edit config

 

add /dev/serial/by-id/  before pasting the name from above.

eg

/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_dcf756dbb712ec118bca20c7bd930c07-if00-port0

then add :/dev/zigbee to the end -  this is the container mount point

 

so you end up with this in your Docker Host config:

 

if anywere inside your docker program it asks for the device location you would set it to :
/dev/zigbee

 

image.png.3ba1e945bf3e41cc9e99c6e526faaecb.png

Hi :)

 

Can you help me a little?

I tryed to get youre "Guide" to work but HA didnt see it

But after i did this it worked. But will it change after every reboot?

 

 

image.png

On 2/2/2024 at 1:48 PM, DanielPT said:

Hi :)

 

Can you help me a little?

I tryed to get youre "Guide" to work but HA didnt see it

But after i did this it worked. But will it change after every reboot?

 

 

image.png

yes it can change if you have more than 1 USB device.
if you only have one it will always be 0
by-id is the only sure way.

  • 1 year later...

ls -l /dev/serial/by-id

don't seem to working anymore in 7.1.2?
Is there a different way to pass usb by id now?

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.