I just want to share my learnings with using Bluetooth speaker with Home assistant. I spend good bit of time in searching step by step guide to connect Bluetooth speaker with HA I always struggle to find a reliable and easy to follow guide. My knowledge of programming is limited so a I always try to find and using web search for my problems.
One of the task was to use Bluetooth speaker. I had few of them at home and I wanted to use them with HA. I have them successfully connected and running from last few days. I repeated the following steps with two clean builds and got the same result so I like to share if anyone is looking to integrate them with HA.
you may find one or two steps not necessary but this is how I get Bluetooth to work. please feel free to correct me.
Debian and HA installed using the link below on an old computer with Bluetooth controller built-in (or you can use usb dongle).
Debian HA installation
Update system using apt update and installed pavucontrol.
check if root and debian user, for example, pi are in the pulse-access group. add with following commands.
sudo sed -i '/^pulse-access:/ s/$/root,pi/' /etc/group command.
- In /etc/pulse/client.conf, I added following as referenced in Audio stopped working on the host system · Issue #12 · home-assistant/plugin-audio · GitHub
default-server = unix:/usr/share/hassio/audio/external/pulse.sock
killall pulseaudioand rebooted the system. Once system reboot okay, connect to your Bluetooth spkear via bluetoothctl command.
Use the following command via ssh to check if bluetooth speaker is showing in HA.
docker exec -it hassio_audio pactl list short sinks # List the sinks
or you can use HA addon to check via pactl list sinks short.
- use VLC or mopidy add on to play the audio.
if Bluetooth speaker is powerd off or disconnected then i have to reboot the system. Once it reboot, connect speaker via bluetoothctl, it will works normal. not sure how to go about and making the HA recognise it again. outside HA in Debian, it works normal no issue. to show them in HA again, i had to reboot the system and connect them again.
if anyone knows how to go about fixing it or if they know how to connect to stream audio to multiple bluetooth speaker, please advise with thank you.
Any input are welcome for my correction.