Spotify is one of the most common Music Services used in Europe. As Apple now also has support for the Dutch language on the HomePod I wanted to start using an HomePod in my office when working from home so I can stream music and just dont have to pause the music everything I get an Teams call and have to grab my bluetooth headset.
The Problem
By default playing music from Spotify on a Desktop system (Windows 11) you are not able to stream it to an HomePod as the HomePod does not support the Spotify Connect service. In this case I start my stream from my Apple iPhone 8 to get started and stream music to the HomePod.
This is the normal way you should use it with a HomePod, but there should be an easier way as Home Automation guy. So I started experimenting with some opensource / forked software that was able to run on my Raspberry Pi 3B+.
The solution!
Yes there is a solution! And even better, it is fairly easy to setup! With SpoCon, Owntone you can run an sort of emulated Spotify Connect device on the Raspberry and let OwnTone use the audio output of spotify to send it to the SpoCon device!
- Easy to setup
- HomePod as a Spotify Connect playback device
- Control the playback from any Spotify client (iOS, Windows, etc)
- There is however a few seconds delay but who cares, it works!
How-To setup?
We need a simple Linux system with for example Raspbian. You can follow the steps below to setup your SpoCon with Owntone and HomePod.
- Install the SpoCon package, this contains the librespot-java client in an easy to use 1-line installer. Use the line:
$ curl -sL https://spocon.github.io/spocon/install.sh | sh
- Now we need to make a pipe for communication between OwnTone and SpoCon. Check if we have a music folder in the /srv/ folder else make this folder.
$ sudo mkdir /srv/music
$ sudo mkfifo /srv/music/spotify
$ sudo mkfifo /srv/music/spotify.metadata - Lets make sure the SpoCon user has access
sudo chown spocon: /srv/music/spotif*
- Next step is to configure the SpoCon application and add the PIPE into the Player
deviceType = “SPEAKER”
deviceName = “SpoCon-HomePod”[player]
metadataPipe = “/srv/music/spotify.metadata”
output = “PIPE”
pipe = “/srv/music/spotify” - Install OwnTone server, this is really easy, for Raspbian BullsEye see below else check the Raspberry forums
$ wget -q -O – http://www.gyfgafguf.dk/raspbian/owntone.gpg | sudo gpg –dearmor –output /usr/share/keyrings/owntone-archive-keyring.gpg
$ sudo wget -q -O /etc/apt/sources.list.d/owntone.list http://www.gyfgafguf.dk/raspbian/owntone-bullseye.list
$ sudo apt update && sudo apt install owntoneSee also the Forum Post or the Official OwnTone page
- Now restart OwnTone and SpoCon to enable the changes made to the application
$ sudo service owntone restart
$ sudo service spocon restart - Now configure OwnTone, as I allow everyone on the network to play music I havent had any issues pairing, but you have to enable the output to the HomePod. So login to the URL at http://owntone.local:3689 and check under Settings –> Remotes & Output if you can see the HomePod speaker (and maybe some other speakers on your network.
- Next click in the bottom right in OwnTone on the Up Arrow and enable the HomePod speaker (make sure it is not Grey but Black so it is enabled.
Now when Starting Spotify you will see your new Spotify Connect device like below!