script type="text/javascript"> jQuery(document).ready(function(){ jQuery("article.et_pb_post").each(function(){ jQuery(">a:first-child, .et_pb_image_container", this).insertAfter(jQuery(".post-meta", this)); }); });
Select Page

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.

  1. Install the SpoCon package, this contains the librespot-java client in an easy to use 1-line installer. Use the line:

    $ curl -sL | sh

  2. 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

  3. Lets make sure the SpoCon user has access

    sudo chown spocon: /srv/music/spotif*

  4. Next step is to configure the SpoCon application and add the PIPE into the Player

    deviceType = “SPEAKER”
    deviceName = “SpoCon-HomePod”

    metadataPipe = “/srv/music/spotify.metadata”
    output = “PIPE”
    pipe = “/srv/music/spotify”

  5. Install OwnTone server, this is really easy, for Raspbian BullsEye see below else check the Raspberry forums 

    $ wget -q -O – | sudo gpg –dearmor –output /usr/share/keyrings/owntone-archive-keyring.gpg
    $ sudo wget -q -O /etc/apt/sources.list.d/owntone.list
    $ sudo apt update && sudo apt install owntone

    See also the Forum Post or the Official OwnTone page

  6. Now restart OwnTone and SpoCon to enable the changes made to the application

    $ sudo service owntone restart
    $ sudo service spocon restart

  7. 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.
  8. 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!