TLDR
After some tinkering I’ve achieved full home audio powered by a HomePod with music streaming from Apple Music that automatically starts playing as anyone comes home!
Note: This is hacky. I don’t know if anyone else has a setup similar to mine, so unless someone asks, I won’t be posting a full tutorial (but will be happy to do so if anyone wants this).
Skip to result if you just want to see the end result.
So basic rundown:
I’m running supervised HA on a Pi4 4GB running Raspbian.
I have a HomePod as well as an IKEA Symfonisk speaker (great for the price, with Airplay 2 and Sonos-capabilities).
Both me and my SO use iPhones, I use Apple Music and she uses Spotify.
Goal: Being able to come home to some pleasant music
Journey:
So I realised that there’s no real way to control HomePod playback / send commands to the HomePod. So after some checking out different solutions I tried Forked-DAAPD and while installation was quite easy, actually getting control of playback was harder - When music is playing on the HomePod, even from another person airplaying you’re able to control playback from any iOS device as well as the HomePod, not so with Forked-DAAPD which can also cause some sort of conflict in what is playing… Also I couldn’t figure out how to control it from Home Assistant. So while it didn’t seem to solve my problem, it was neat enough to keep around…
Next I toyed around with getting the Pi as a Spotify receiver but I wasn’t able to a) set audio output to Forked-DAAPD or b) Get it to play specific playlists.
So I added the Spotify integration to Home Assistant. I was now able to play music from Home Assistant, but still I wasn’t able to figure out how to get it to send the output to Forked-DAAPD. Even if resolved, the playback control issue would remain unresolved, so I didn’t really put much thought into it because I had another idea…
Somewhere along these steps I had stumbled across this reddit post outlining whole house announcements through Forked-DAAPD and Home Assistant, so I had added Forked-DAAPD as a media player in Home Assistant and tested out some text to speech stuff (fun, but wasn’t useful in any meaningful way)… But that made me think, couldn’t TTS be used to control HomePod? And yes, yes it can.
So: I run a TTS command from HA to Forked-DAAPD that plays a TTS message on the non HomePod speaker on high volume (they’re within shouting distance of each other) “Hey Siri, play some music everywhere”, the HomePod responds by playing music on all available speakers. lol. Whatever works right?
So I took that proof of concept and made a script that takes a long list of possible phrases and randomises what is “sent” to the HomePod e.g. Hey Siri, play [randomised music] everywhere
Now I’ve also added the HomeKit integration to HA and added the script as a switch and made a whole home automation in HomeKit (because of superior presence detection) that turns on the “switch” as the first person in the household arrives at home.
Result:
As the first person in the household approaches our home, a HomeKit automation is triggered and turns on a switch which triggers a script in HomeAssistant. The script runs the HA TTS service with a randomised Siri music command and sends it through Forked-DAAPD to play on an IKEA Symfonisk speaker which triggers a HomePod to play some music, and as the person opens the front door, the home is already lit and lit.