The goal of this tutorial is to pair arbitrary bluetooth speaker with the Home Assistant (HASSO) to be able to hear notifications & TTMs
- Proxmox
- BT dongle (Broadcom - BCM20702A0); A list of supported BT dongles -> https://www.home-assistant.io/integrations/bluetooth#known-working-high-performance-adapters
- Home Assitant (Supervisioned version) (I've being using currently Home Assistant 2023.6.3 -> Supervisor 2023.06.4 -> Operating System 10.3)
- any bluetooth spearker without auto-inactivity auto-shutdown funciton. I've used Xiaomi Mi Compact Bluetooth Speaker 2 (XMYX02YM)
- Identify your BT speaker's BT MAC Address & BT Name
- Make sure that Proxmox - HA VM as Audio device added (for example:
device=intel-hda, driver=none
) - Install SSH addon into the HA and configure it
- Switch off yout BT speaker
- Loging into the HA using termina: login@IP_Adress
- Type:
bluetoothctl
- Type:
list
to list all of your connected BT dongles. You should get the Mac adress of all your BT dongles - Type:
select MAC_ADRESS_DONGLE
(for example: select 55:44:33:22:11:00) - Type:
default-agent
to make selected BT-dongle a default connector with your BT devices - Let's start connection & paring with your BT-speaker.
- Type:
scan on
- Switch on your BT speaker & enter it into paring mode
- Check on the console if your BT speaker was detected (by name of MAC adress)
- Type:
pair MAC_ADRESS
(for example: pair 00:11:22:33:44:55) - Type:
trust MAC_ADRESS
(for example: trust 00:11:22:33:44:55) - Type:
connect MAC_ADRESS
(for example: connect 00:11:22:33:44:55) - (in the case of any problems type
help
for more info) - Check the connected devices using commands:
pactl list | grep ".a2dp_sink"
. Look for something simiar to Name:bluez_sink.4C_72_74_XX_XX_XX.a2dp_sink
(NOTE: the number represents the MAC adress of your BT speaker) - Make the new BT device as the default sound output by using follwing command:
pactl set-default-sink NAME_OF_YOUR_BT_SPEAKER_FIND_IN_THE_PREV_STEP
- Check of the output is not muted, nor volume set to zero, by
Mute:
(should beno
) andVolume:
, should befront-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
by using following commend:pactl list sinks | grep "Mute:"
andpactl list sinks | grep "Volume:"
- Type
ha audio reload
and wait forCommand completed successfully
message - At this point your BT should be connected to your HA
- Type:
exit
- Goto HA and install Settings -> Add-in VLC Local
- Goto VLC Local -> Configuration
- Set the Telnet Password and Http Password (you can use the default mypasswrd as well)
- change the Audio-Output to the correspinding BT Name (it's the same obtainied at I.1 point)
- Go back to VLC-Local Info tab and enable Auto-Start option
- Get back to Info tab hit Start
- Go to HA Settings -> Devices & Services (Integrations) and Add New Integration
- Search for VLC LAN select it and pick-up Local VLC Media player via Telnet
- Enter the password Telnet Password and click Submit
- NOTE: in case when VM with HA restarts & or BT device shutdowns power on the dev (XMYX02YM should say "Connected" after a few seconds) and go to section I.12 and II.4 points, and start VLC Local back again
- Go to Developers Tools and Services and enter followings :
- Service:
Media player: Play media
- Target: Search for
VLC
and select your one - Content type:
music
- Content ID:
/local/your.mp3
(files your.mp3 should be located at the/local/www/
folder of your HA installation) - Press Call-Service