The answer is yes, you can this as Reddit user explained to me.
Sharing my experience here just to help others.
I think I am having issues with mounting the dbus folder. I’ve tried both with /run/dbus:/run/dbus:ro
and /var/run/dbus:/run/dbus:ro
with no luck whatsoever.
What I get is this error in HA:
ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/bluetooth_adapters/__init__.py", line 82, in _get_dbus_managed_objects
reply = await bus.call(msg)
File "/usr/local/lib/python3.10/site-packages/dbus_fast/aio/message_bus.py", line 337, in call
await future
File "/usr/local/lib/python3.10/site-packages/dbus_fast/aio/message_bus.py", line 404, in _message_reader
if self._unmarshaller.unmarshall():
File "/usr/local/lib/python3.10/site-packages/dbus_fast/_private/unmarshaller.py", line 332, in unmarshall
self._read_header()
File "/usr/local/lib/python3.10/site-packages/dbus_fast/_private/unmarshaller.py", line 271, in _read_header
self.read_to_offset(HEADER_SIGNATURE_SIZE)
File "/usr/local/lib/python3.10/site-packages/dbus_fast/_private/unmarshaller.py", line 174, in read_to_offset
raise EOFError()
EOFError
Am I doing something wrong?
UPDATE: Well, I found out. After seeing this thread and particularly this comment I’ve managed to get Bluetooth integration working using the privileged
flag workaround in my docker-compose. Be aware that the privileged
flag is not recommended and I was just testing out the integration.
The issue is now that I am trying to connect a SensorBlue WS08 using the Thermobeacon integration but it looks like my laptop built-in BT adapter does not support BLE.
In fact, if I run $ hciconfig hci0 lestates
I get Read LE supported states on hci0 returned status 1
which means that BLE is not supported as explained here, so I cannot connect to the device.
It looks like I’ll need an adapter!