Jump to content

How do I pass through my bluetooth dongle to a home assistant container?


God_TM

Recommended Posts

I've searched, and it seems for my adapter (RTL8761BU based) the issue in the past was the driver wasn't installed on the system. Now, after upgrading to 6.11.1, it seems that the drivers are there (I see it listed in /lib/firmware/rtl_bt/) but it still doesn't show up in /dev/serial/by-id (lsusb shows it is connected however?).

 

How do I get the system to recognize the usb stick, so I can then pass it through to the home assistant container, or is this still not possible because of some limitation in the specific linux kernel version?

 

Thank you.

Link to comment
  • 1 month later...
  • 1 month later...
On 10/10/2022 at 7:12 PM, God_TM said:

I've searched, and it seems for my adapter (RTL8761BU based) the issue in the past was the driver wasn't installed on the system. Now, after upgrading to 6.11.1, it seems that the drivers are there (I see it listed in /lib/firmware/rtl_bt/) but it still doesn't show up in /dev/serial/by-id (lsusb shows it is connected however?).

 

How do I get the system to recognize the usb stick, so I can then pass it through to the home assistant container, or is this still not possible because of some limitation in the specific linux kernel version?

 

Thank you.

 

On 12/5/2022 at 1:19 PM, renk1 said:

Hi, did you managed to get this sorted? My system recognizes the asus bt-500 adapter, it passes through to the HA vm but HA does seem to scan any devices...

TL;DR: (Possibly):

  • Install un-get
  • Install bluez through un-get
  • start rc.bluetooth & passthrough dbus/bt-device
  • Profit

 

Now for a more thorough explanation of everything I've tried:

I have basically thrown every available ball against the wall so a couple of steps I've done might not be of use.

I have a TP-Link UB500 whichs seems to be similiar, at least this thread came up when I googled the issue so I'll respond if any fellow UB500 purchaser ends up here while Googling.

 

 

What I've passed through to HA:

--device='/dev/bus/usb/001/003' --device='/dev/tty6'

001/003 being where I see the device being when I'm in the terminal in unRaid and doing `lsusb`. In one of the billions of google attempts I found a script that an unRaid user used to mention which tty* that was recently attached but I cant find it.

 

In extra properties I've shared this to the container.

/run/dbus

 

I am quite certain the way to solve my issue, if anyone tests is out please respond. Is this way:
Install https://github.com/ich777/un-get un-get from lovely ich777 and install bluez. Once you've installed bluez need to add this to /boot/config/go

/etc/rc.d/rc.bluetooth start

 

 

Edited by shunde
Link to comment
  • 1 month later...
On 2/18/2023 at 11:18 AM, Tim Knowlden said:

I am having issues, my device is here:

 

Bus 003 Device 002: ID 2357:0604 TP-Link TP-Link UB5A Adapter

But cannot pass this into HA container it seems

Have you tried to pass /run/dbus to your HA container? Alongside installing bluez like my post mentioned.

 

I wonder if passing /run/dbus and using bluez is enough or if passing /run/dbus, installing bluez and passing the corresponding /dev/ttyX is enough.

Link to comment
On 2/21/2023 at 11:13 PM, shunde said:

Have you tried to pass /run/dbus to your HA container? Alongside installing bluez like my post mentioned.

 

I wonder if passing /run/dbus and using bluez is enough or if passing /run/dbus, installing bluez and passing the corresponding /dev/ttyX is enough.

I did indeed, tried both dbus and the device. No joy.

Link to comment
  • 2 weeks later...
  • 2 weeks later...
On 3/7/2023 at 7:51 PM, Deadpool1985 said:

I am also having this issue, trying to forward /run/dbus causes the container to error out:
image.thumb.png.6bb2c8bcb2a123ebb1ad1749871a8930.png

I have also tried to forward /dev/bus/usb/ to the container and it seems like it can see the devices but cannot utilize them:
image.png.8d523c3af602f7b351950bcc31e2e58f.png

From HA:
image.png.0661c0ae928281c515adfc9e364b09f1.png

 

I think you need to pass through '/run/dbus' as a path rather than as a device. I got mine working after installing bluez through un-get and then using the following docker command:

 

docker run
  -d
  --name='homeassistant'
  --net='host'
  -e TZ="Europe/London"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="my-server-name"
  -e HOST_CONTAINERNAME="homeassistant"
  -e 'TCP_PORT_8123'='8123'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8123]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/homeassistant-logo.png'
  -v '/run/dbus':'/run/dbus':'rw'
  -v '/mnt/user/appdata/homeassistant':'/config':'rw'
  --device='/dev/bus/usb/007/005' 'lscr.io/linuxserver/homeassistant'
  • Thanks 1
Link to comment
  • 4 months later...

These settings worked for me:

Once I did this and restarted the container, home assistant recognised the bluetooth adapter.

 

Note that my home assistant container runs in privileged mode (--privileged docker option). This is the default for the home assistant unraid app, but you'll likely need to mount the bluetooth USB device in if you aren't running in privileged mode. eg ---device='/dev/bus/usb/xxx/xxx'

  • Like 3
Link to comment
  • 3 months later...
  • 2 months later...

What's your bluetooth device?

Mine is a combined intel ax200 module that is pcie but the Bluetooth appears on usb but the wifi side is on pcie.

I think this is the source of the issue & or maybe a driver issue.

I'll try getting a portable windows install going so I can update some firmwares

Edited by dopeytree
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...