Spotify + Airplay Possible?

Could anyone tell me if the following is possible to achieve?
I currently have the following:
Ubuntu on a laptop running HA
Mac OSX Sierra running Itunes
A number of Airplay Speakers

I have seen that there is a component for Itunes and with a bit of work it can control Airplay speakers, I have also seen the component for Spotify.

What it would like to achieve is being able to play a Spotify Playlist through the Airplay speakers. I haven’t set up the components for either in HA just yet but would it be doable?

1 Like

I’m using forked-daapd on a separate rPi3, which should be able to stream spotify to your airplay speakers. I’m using it to run a centralized audio server and cast to various rooms on different platforms (airport express speakers, google home minis, chromecasts, and shairport).

I don’t know of any way to do this all on the same pi as your home assistant installation.

1 Like

Hiya @ptrsnja - you seem to be doing pretty much what I want to be doing.

I’ve got a couple of existing AirPlay devices (a HiFi and an AudioEngine A5) and I’ve got three RaPi Zero W’s sat around waiting for a project. I thought I’d installed forked-daapd on one of the Pis and then add pHAT DACs on the others, then connect the pHAT DAC Pis to normal speakers.

Would that then give me the ability to use Amazon Polly, stream internet radio etc etc to the AirPlay speakers using forked-daapd? Am I right that without forked-daapd, Home-Assistant can’t stream anything to the AirPlay devices?

Thanks!

That’s a good question.

There is native support for Spotify, but I don’t have a premium account, so I’ve never tested it. As far as I can tell, it looks really simple to get going, and would allow you to stream from spotify to your airplay devices.

I haven’t tried opening audio streams using forked-daapd. I’m using it to play local media files (local to the pi forked-daapd is running on) on various speakers around my place. I briefly attempted to open a youtube audio stream, but didn’t manage to get any success.

Theoretically, it should be able to handle opening an audio pipe and sending it on to your air play devices, but I’ve never seen this working. There’s a pretty good readme on the github repository, which would be my recommendation on where to start.

An alternative for your pi zeros would be volumio. I’m running it on one pi zero, which means I can also use that device as an airplay receiver with forked-daapd, but it has native add-ons for youtube music as well as many podcast services. You might have better success with that, but volumio can’t stream to any remote speakers - only the DAC on the pi on which it’s running.

If you have any questions, be sure to reach out. I’ve also got a YouTube tutorial on getting forked-daapd installed and integrated into home assistant (assuming that’s why you reached out) that you might find helpful.

And finally, if you manage to open a streaming audio pipe in forked-daapd (such as a podcast) and send it on to your airplay speakers, I’d love to know how you got it to work.

Cheers