I have homeassistant installed on RPI4 and I am trying to use its bluetooth module to connect a bluetooth speaker/mic but I always get this error: Failed to connect: org.bluez.Error.Failed br-connection-profile-unavailable
I am able to find the device, pair the device, trust the device - I just cant connect to it. The bluetooth speaker works fine, since I can connect to it with my phone. So there has to be an issue with how homeassistant handles RPi4 bluetooth module?
I tried all I could find on the internet regarding this error but no luck. Has anyone else experinced this issue and maybe solved it?
Some info about my system (fresh new install from official tool):
|Verze|core-2022.7.7|
|Typ instalace|Home Assistant OS|
|HostitelskĂ˝ operaÄnĂ systĂŠm|Home Assistant OS 8.4|
|KanĂĄl aktualizacĂ|stable|
|Verze Supervizora|supervisor-2022.07.0|
|Agent Version|1.2.1|
|Verze Dockeru|20.10.14|
I came across that discussion before but there is also no solution. It seems like there is no solution for the issue atm and maybe future versions of HAOS might have this fixed.
Just tried the todays release of HAOS, still same error.
Below I am sending info command (you can see the device is paired and trusted) and connect command afterwards, where it fails to connect.
[bluetooth]# info C9:37:DF:A7:23:D5
Device C9:37:DF:A7:23:D5 (public)
Name: MO8726
Alias: MO8726
Class: 0x00240408
Icon: audio-headset
Paired: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
[bluetooth]# connect C9:37:DF:A7:23:D5
Attempting to connect to C9:37:DF:A7:23:D5
[CHG] Device C9:37:DF:A7:23:D5 Connected: yes
[CHG] Device C9:37:DF:A7:23:D5 ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable
[CHG] Device C9:37:DF:A7:23:D5 ServicesResolved: no
[CHG] Device C9:37:DF:A7:23:D5 Connected: no
So I just this set this up following the Mark Lewis guide that xenolithis linked earlier.
This was done on a pi4 docker/supervisor. So the console commands were as root/sudo via putty.
The results of the sound output were pretty choppy using internal Bluetooth not a dongle(devices were separated through a wall and about 1 metre away.)
I did the bluetoothctl commands from putty console.
I had to delete the HA bluetooth integration here bluetoothctl
scan on
pair AA:EE:DD:BB:CC:FF
connect AA:EE:DD:BB:CC:FF
trust AA:EE:DD:BB:CC:FF
exit
I copy/pasted the updated file with appropriate mac address into the docker path.
I then set up
VLC official addon
and VLC integration
and had the Bluetooth integration installed and working.
Path on Docker system
/usr/share/hassio/audio/asound <<< asound not asound.conf
Updated file chmod wasnât required.
# Default to PulseAudio
pcm.!default {
type plug
slave.pcm "btreceiver"
}
pcm.btreceiver {
type plug
slave {
pcm {
type bluealsa
device AA:BB:CC:DD:EE:FF
profile "a2dp"
}
}
hint {
show on
description "MD-12"
}
}
ctl.!default {
type bluealsa
}
Terminal on a pi3 HAOS
No idea if that would stick on a HAOS build.
Also note asound vs asound.conf
It would probably still be /mnt/data/supervisor/audio/ If you were root on port 22222
Original file
# Default to PulseAudio
pcm.!default {
type pulse
hint {
show on
description "Default ALSA Output (Home Assistant PulseAudio Sound Server ) "
}
}
ctl.!default {
type pulse
}
Just to update further, this appears to be resolved in v9.0 of the OS. I have just updated my test instance to v9.0RC1 and thanks to the PR mentioned above it works again. I can use BT to play a MP3 down to a speaker.