Media on Home Assistant

I am using HA for all automations (around 200 automations) in my house and now i decided to use it as my media player.

Here is what i have:

  • a shared directory in a server with all my local MP3s - Connected in my HA through Plex
  • some Marshall Bluetooth speakers
  • some Alexa Speakers

At the moment i can play my music only through a PC Browser or a smart TV.

I have the below questions:

  1. Is there any way to play my music in my Alexa speakers. I know that Echo devices read URL
  2. Any way to connect my Bluetooth speakers to my HA

I’m not sure on a PC, if that is your platform of choice, but on Mac’s you can use Airfoil to connect to bluetooth speakers (as well as natively to airplay enabled speakers like HomePods/AppleTV, etc), then you can script to use those devices as HA speakers for announcements or playback. If I were trying to replicate what you do then I would use shell scripts to tell the computer running Airfoil to start up Apple Music and play the selected file(s), but again this doesn’t help you much with a PC unless there is similar technology that you can roll out for that.

In my setup I have a dozen HomePods (and some Echo’s) throughout the house connected to Airfoil, then grouped so I can have my home automation make announcements to the entire house or any portion of it or just a single speaker all through shell scripting that is connected to HA. I can also play music via HA commands but I found I almost never used it when it’s so much easier to ask Siri to play the exact music or genre I’m after rather than trying to pre-load voice commands to mimic that behavior.

I don’t know much about alexa, but I am aware of this. GitHub - alandtse/alexa_media_player: This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.

Do they go up to 11?