I am requesting your help regarding a bluetooth topic.
A bit of context:
I recently switched from a Synology HassOS VM, to a Raspberry Pi 4B installation (no SD card, direct SSD boot and with HassOS image as the RPi is fully dedicated to HA, so no supervised install).
By the way, snapshot restore works like a charm !
I use bluetooth for a few xiaomi temperature sensors, with the HACS “Passive BLE monitor integration”.
On Synology, I used a bluetooth dongle as it is not native, and it worked quite well.
On RPi, well, it kind of works, but range seems much decreased: entities stay a long time to ‘unavailable’. Sometimes, I get a value … but it seems much less reliable than what I had before (physical location unchanged for all devices).
With all that said, I wanted two things:
1: list available bluetooth adapters, and determine which one is used by HA (is it the RPi native one, or the USB dongle I plugged ?)
2: in case it is the RPi native one, which I suspect it is, then tell HA to use the USB dongle instead, in order to solve my little range issue
Unfortunately, I find very little documentation on the topic … which is why I finally decided to call for help !
@toukite Did you ever come to a solution for this? I’m in precisely the same boat, and after a few days scouring these forums and the internet at large, and trying everything I can think of on the RPi itself, I have still come up empty-handed.
I think my installation is indeed also a HassOS image on the RPi (no docker, or normal raspbian installation, etc.). I have a lot of difficulty doing the things others mention in other threads for disabling the RPi 4 onboard bluetooth (hciconfig yields “command not found”). Via running lsusb over ssh, I have been able to identify which device is the usb dongle I’ve plugged in. However, bluetoothctl shows the same controller MAC address regardless whether the dongle is plugged in or not, and the limited range has me pretty confident the onboard bluetooth is being used in all cases and the dongle not activated somehow.
For anyone else who gets stuck here, I was able to solve my problem by simply changing the default bluetooth agent from the onboard unit to my external dongle using the available bluetoothctl commands over SSH. The relevant bluetoothctl commands can be found here: Blue Control » Linux Magazine
I found the mac address of the Bluetooth dongle, then used ‘select CONTROLLER-MAC-ADDRESS-HERE’ to select that agent, then ‘default agent’ to set that one as default.