I’m running hass.io in docker on my Ubuntu server. I migrated from a Pi 4. I recently spotted that my bluetooth config was complaining in the logs. Today I added a bluetooth adapter to the server (it works and I can scan from the base OS), but I don’t understand how to make it visible within Hass.io to allow BLE presence. The terminal/ssh add-on gives me a limited shell into the docker container, and doesn’t allow me to do anything bluetooth related. How do I ensure the docker image has access ?
I dont know why my docker wont accept my ble bluetooth stick.
My host is openmediavault system. debian based. uname -a:
Linux omv 5.10.0-0.bpo.12-amd64 #1 SMP Debian 5.10.103-1~bpo10+1 (2022-03-08) x86_64 GNU/Linux
lsusb on host gives me:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family]
Bus 001 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
on docker:
bash-5.1# lsusb
Bus 001 Device 003: ID 10c4:ea60
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0003
Bus 001 Device 002: ID 0a12:0001
I changed my docker-compose homeassistant part to network_mode host and privileged true. Just to that it works. But it does not.
When exec into my homeassistant docker and run this:
bash-5.1# bluez-simple-agent
Traceback (most recent call last):
File "/usr/bin/bluez-simple-agent", line 8, in <module>
import dbus
ModuleNotFoundError: No module named 'dbus'
or this:
bash-5.1# bluetoothctl
Waiting to connect to bluetoothd...dbus[298]: arguments to dbus_connection_get_object_path_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5905.
This is normally a bug in some application using the D-Bus library.
D-Bus not compiled with backtrace support so unable to print a backtrace
Aborted (core dumped)