I’ve added docker and some containers on my LibreElec setup (Rpi4). Now I would like to give Home Assistant access to built in Rpi4 Bluetooth. But I can’t figure out how to do that. I think some things differs on Libreelec compared to a normal debian system to achieve that.
I’ve read Bluetooth - Home Assistant , and according to the instructions, there should be Dbus and BlueZ installed. I can find a /run/dbus device, that I’ve made accessible to the docker container using a bind mount. But home assistant still is unable to scan for bluetooth devices. I’m not sure if it’s because BlueZ is missing, or any other problem (apt-get can’t be used on LibreELEC). Could someone read the documentation above and try to help me to achieve this ? I don’t know what to try next.
Home Assistant give me the following error when trying to scan :
2023-03-22 21:28:27.222 ERROR (MainThread) [frontend.js.latest.202303091] :0:0 ResizeObserver loop completed with undelivered notifications.
2023-03-22 21:28:41.254 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/dbus_fast/aio/message_bus.py", line 214, in on_hello
File "src/dbus_fast/aio/message_reader.py", line 24, in dbus_fast.aio.message_reader.build_message_reader._message_reader
File "src/dbus_fast/_private/unmarshaller.py", line 659, in dbus_fast._private.unmarshaller.Unmarshaller._unmarshall
File "src/dbus_fast/_private/unmarshaller.py", line 533, in dbus_fast._private.unmarshaller.Unmarshaller._read_header
File "src/dbus_fast/_private/unmarshaller.py", line 283, in dbus_fast._private.unmarshaller.Unmarshaller._read_to_pos
Do you have an idea ? Any answer is welcome
Have a great day
you can ask the libreelec foruns regarding that, their distribution is so locked down that you cant do much stuff on it. The last thing I remembered about this distro is that the root partition where the OS resides is in read only state so you cant install any stuff on it even if you want to.
what I recommend is nuke that install and use armbian instead, install kodi at the top of it and following the steps how to autostart kodi. once you do that you basically have a libreelec/coreelec like install.
what I usually do with this kind of setup:
- install CLI version of armbian
- install kodi
- follow the steps of how to autostart kodi at boot (google it)
- now if you want to install other stuff like supervised install of home assistant you can do that here, as well as container install of HA. Though I recommend doing a container install.
Thanks for your answer.
If I have to choose between HA Bluetooth and librelec, I choose libreelec. It is locked down and I find that very annoying too, but it is the only way to get correct HEVC 10bit / HDR DV playback on Rpi4. I don’t know any other distro that have the necessary configuration for this.
well that’s what is bad about raspberry pi, or rather the broadcom it self. opensource community really hates that chipset, I guess for what they only provide binary blobs for linux and not the source code it self.
still, you may wanna keep a look on this PR as this may finally introuduce HEVC 8/10bit HW accelerated video decoding using mpv.
hwdec_drmprime: support rpi4_8 and rpi4_10 formats by EmperorPenguin18 · Pull Request #11093 · mpv-player/mpv (github.com)
if build of mpv for rpi4 is finally merged, you can now ditch libreelec and just configure kodi to use mpv as the external player.
Hi, Thanks for the explaination. I will consider this, but is there really no way to give HA access to the bluetooth chip ?
It is here, up and running, and I’ve mounted
/run/dbus:/run/dbus:ro to HA container. But I’m running into the error above. What does it mean ?
as I said, you basically need to change the dbus messaging to dbus-broker not to mention you also need to install the latest bluez 5.66 as of this posting. Im not talking about this packages installed on homeassistant container, those 2 needs to be installed on the host it self.
Now that you know you need to install those 2 things on a read-only root partition, and a very restrictive kernel that only work good enough for kodi. All I can say is, you asking the impossible, unless you go to with the compile your own kernel and build your own image route, which basically means, build your own linux from scratch kind of task.
Ok I see. Thanks for the info. What about using an external bluetooth dongle then ? While I wait for MPV to fully support HEVC 10bit, would this be a way to circumvent the root installation requirements, if I’m not using the built in bluetooth chip ?