I love streaming Spotify music, but my phone's and laptop's built-in speakers aren't the best. Typically, I use HomePod to stream music from my iPhone and iPad despite knowing it lacks native Spotify integration and works only with AirPlay-supporting Apple devices. Also, the fact that HomePod is absent from the Spotify Connect-enabled products list hurts; it doesn't work directly with Android phones and Windows or Linux-based computers.

Because of that, I decided to turn the HomePod into a Spotify Connect device with a Raspberry Pi SBC. It is a makeshift solution involving packages that aren't actively maintained and work only on Raspberry Pi with Debian or Ubuntu. Since it's unlikely that Apple will work with Spotify to make it a Spotify Connect device anytime soon, I managed to convert the HomePod into a universal, unrestricted Spotify speaker using a Raspberry Pi 4B. Here's how to do it.

Streaming Spotify music to HomePod over AirPlay Isn't Straightforward

The official ways are more like a workaround

HomePod Mini

When using Spotify on my iPhone, iPad, or Mac, I need to open the Control Center to choose AirPlay and switch the Sound Output source to HomePod. Well, that's not exactly an ideal integration. Alternatively, I can ask Siri to play a song using the Spotify app on my iPhone (iOS 17.4 or higher), iPad (iPadOS 17.4 or higher), and Mac (macOS 10.14 Sonoma or higher). However, getting Siri to use Spotify to play music over HomePod is a struggle, mostly because Apple allows limited integration of third-party apps with Siri.

Besides that, I am at the mercy of third-party apps such as AirMusic and AirStreamer on Android phones and Windows 11 computers to use Spotify with HomePod over AirPlay. That means I need to always update those AirPlay mirroring apps for Android and Windows devices.

These workarounds didn't offer one thing — the capability to use the HomePod as a wireless speaker for seamless playback from any device or platform. I wanted the HomePod to work with all of them without using third-party apps on a mobile or computer.

  • Raspberry Pi 4 computer
    Storage
    MicroSD card slot
    CPU
    Arm Cortex-a72 (quad-core, 1.8GHz)
    Memory
    1GB, 2GB, 4GB, or 8GB of LPDDR4
    Operating System
    Raspberry Pi (Official)
    Ports
    2x USB-A 3.0, 2x USB-A 2.0, 40-pin GPIO, 2x micro-HDMI, 2-lane MIPI DSI display port, 2-lane MIPI CSI camera port, 4-pole stereo audio and composite port, microSD card slot, USB-C (for 5V power), Gigabit Ethernet
    GPU
    VideoCore VI
  • A render of the Raspberry Pi 5
    CPU
    Arm Cortex-A76 (quad-core, 2.4GHz)
    Memory
    Up to 8GB LPDDR4X SDRAM
    Operating System
    Raspberry Pi OS (official)
    Ports
    2× USB 3.0, 2× USB 2.0, Ethernet, 2x micro HDMI, 2× 4-lane MIPI transceivers, PCIe Gen 2.0 interface, USB-C, 40-pin GPIO header
    GPU
    VideoCore VII
    Starting Price
    $60

Finding suitable software to turn a HomePod into a Spotify Connect device

Getting the right tools, even if they're a bit rusty

To make HomePod available to all devices, I needed to make it discoverable on the local network. For that, I chose OwnTone (Linux, FreeBSD, macOS) as an audio media server for streaming music to AirPlay devices (multiroom), Chromecast, Roku, and iTunes over a local network. It supports local music libraries, podcasts, audiobook files, internet radios, and Spotify (requires Spotify Premium).

Next, I picked SpoCon (a Debian and Ubuntu package), which turns a HomePod into a Spotify Connect device when an SBC like a Raspberry Pi sits between them. SpoCon and OwnTone work on any SBC with at least Debian 12, Ubuntu, or Raspbian. I have a Raspberry Pi 4B running a handful of projects and use it to install the SpoCon and OwnTone servers.

So here's what you'll need to turn your HomePod into a local Spotify Connect device.

  • HomePod or HomePod mini
  • Spotify Premium account to use with OwnTone server
  • Raspberry Pi or other SBC with Debian 12 (at least) or Ubuntu

Installing and configuring SpoCon software to make HomePod discoverable

Necessary to make HomePod visible to all devices on the local network

The first step involves installing the SpoCon package on your Raspberry Pi with Bookworm to ensure that HomePod is visible over the network. I used a headless (no GUI) Raspbian version on my Raspberry Pi and invoked Terminal over SSH to install the packages.

Using a root account makes downloading and installing packages easier.

Here's how to add SpoCon on a Raspberry Pi.

  1. Paste the following command in the Terminal to easily install software resources from independent software vendors and manage the distribution.
    Install the Software Properties Common package using Terminal on Raspberry Pi
    sudo apt-get install software-properties-common
  2. Next, paste the command below to set up the PPA keys for the SpoCon package.
    Use SpoCon repository and dependencies installation script in Terminal
    curl -sL https://spocon.github.io/spocon/install.sh | sh
  3. Since Bookworm removes support for openjdk-11-jre and openjdk-8-jre dependencies, the SpoCon package won't install automatically. You need to unpack, edit the dependencies, and repack the SpoCon package. Paste the following command to download SpoCon's .deb package into the /home/pi directory.
    Download the Spocon .deb package directly
    sudo apt-get download spocon
  4. Create a temporary folder to unpack the downloaded SpoCon .deb package.
    Make a temporary directory from Terminal
    sudo mkdir temp
  5. Unpack the SpoCon .deb package in the temp folder.
    Unpack the SpoCon .deb package in the temporary folder
    sudo dpkg-deb -R spocon_1.6.3_arm64.deb temp
  6. Next, you'll need to edit and change the dependency value from the control in the unpacked .deb file. To do that, copy and paste the command below.
    Edit the Control File in the Temporary folder where the SpoCon .deb is unpacked
    sudo nano ./temp/DEBIAN/control
  7. Append "| openjdk-17-jre" at the end of the dependency value line.
    Append OpenJDK-17-JRE text at the end of the Dependency values
    Depends: libasound2, adduser, openjdk-11-jre | openjdk-8-jre | openjdk-17-jre
  8. Press the Control + O shortcut to add the changes to the control file and hit Control + X to close it.
  9. Repackage the updated .deb package using the command below.
    Build a new .deb file from the unpacked SpoCon .deb package in temporary folder
    sudo dpkg-deb -b ./temp spocon_new.deb
  10. Finally, run this command to install the SpoCon New.deb file. It will automatically fetch the other dependencies required by the package.
    Install the new edited and repackaged SpoCon .deb file
    sudo apt-get install -y ./spocon_new.deb

After that, you must create folders so SpoCon can communicate with the OwnTone server to send the details of the music or audio file to the stream.

  1. In Terminal, paste the following command to create a new directory.
    Create new directory to pipe Spotify music data for SpoCon and OwnTone
    sudo mkdir /srv/music
  2. Create pipe folders for SpoCon and OwnTone to communicate and serve Spotify's music metadata.
    Create pipe folders for Spotify to let SpoCon and OwnTone communicate
    sudo mkfifo /srv/music/spotify; mkfifo /srv/music/spotify.metadata
  3. Give SpoCon user access to these pipe folders using the command below.
    Give the SpoCon User the Access to Spotify's pipe folders
    sudo chown spocon: /srv/music/spotif*

Next, you must add the pipe folder paths to SpoCon's configuration file so that it can correctly share Spotify configuration details with the OwnTone server and show HomePod as a Spotify Connect device on a local network with an assigned name.

  1. In Terminal, open the SpoCon configuration .toml file to edit.
    Open the SpoCon's Configuration File using Nano in Terminal to Edit
    sudo nano /opt/spocon/config.toml
  2. Edit the configuration file to change the following values inside the double quotes.
    Make Changes in the SpoCon's Configuration File to add custom values
    deviceType = “SPEAKER”
    deviceName = “HomePod”
    [player]
    initialVolume = 21845
    metadataPipe = “/srv/music/spotify.metadata”
    output = “PIPE”
    preferredAudioQuality = "VERY_HIGH"
    pipe = “/srv/music/spotify”
    logAvailableMixers = true
    volumeSteps = 64
  3. Press Control + O to write the changes to the configuration .toml file and press Control + X to close it.

Installing and configuring the OwnTone server to grab and stream music metadata

Making an audio media server handle the streaming duties for HomePod

Here's how to install the OwnTone server to manage the audio streaming tasks.

  1. Paste the following command to add the OwnTone repository key to your Raspberry Pi.
    Run this command in Terminal to add OwnTone repository key on Raspberry Pi
    wget -q -O - http://www.gyfgafguf.dk/raspbian/owntone.gpg | sudo gpg --dearmor --output /usr/share/keyrings/owntone-archive-keyring.gpg
  2. Fetch OwnTone's sources list that is Bookworm compatible and add it to your Raspberry Pi's default sources list.
    Fetch OwnTone Sources List compatible with Bookworm on Raspberry Pi
    sudo wget -q -O /etc/apt/sources.list.d/owntone.list http://www.gyfgafguf.dk/raspbian/owntone-bookworm.list
  3. Run a command to update all packages and install the OwnTone server along with other dependencies.
    Run this command in Terminal to update packages and install OwnTone Server
    sudo apt-get update && sudo apt-get install owntone
  4. Restart the OwnTone service and SpoCon service together.
    Run the command in Terminal to restart OwnTone server and SpoCon service
    sudo service owntone restart && sudo service spocon restart

Finally, ensure that the OwnTone server recognizes your HomePod. Here's how you can check.

  1. Open the OwnTown server URL below in a browser on a mobile device or computer on your local network.
    Open the OwnTone homepage URl in a web browser
    http://owntone.local:3689/#/
  2. Click the Upward-Arrow in the bottom-left corner of the window to check if your HomePod's name appears on the list of devices.
    Click on the Upward-Arrow button in the bottom-left corner of the OwnTone page
    If it appears with a black font and slider, you're ready to use it.
    Check the Speakers list on the bottom-left corner of the OwnTone page

Otherwise, you must enable it from the Hamburger menu in the top-left corner -> Settings -> Remotes and Outputs -> Speaker pairing and device information. Look for your HomePod's name and enable the toggle next to it.

Use HomePod to stream Spotify from any device on a local network

Using the Spotify app on a Mac, Windows, or Android makes it convenient to use HomePod as a Spotify Connect speaker. The only tip I can offer is to try not to use Spotify on an iPhone or iPad while playing songs on HomePod from other devices. On the iPhone or iPad, Spotify sometimes switches to AirPlay overzealously. A 2-3-second delay/lag occurs using Spotify with HomePod in this setup, but it won't bother you after a few weeks.

There's a downside to this setup. HomePod appears as a Spotify Connect device to any Spotify Premium user on the same local network. That means people on your guest network can hijack your playlist queue and mess around. Of course, you can edit the SpoCon configuration file to add your Spotify username, password, and authentication blob in the configuration file so that only you can get to use the HomePod as a Spotify Connect device.

This is only a one-time setup that takes a few minutes. If you really enjoy music as much as I do, check out how to make a custom Spotify recommender using Python to find new music or build a digital jukebox on a Raspberry Pi.

  • home-pod-speaker
    Display
    No
    Dimensions
    3.3 x 3.9 inches
    Weight
    345g
    Clock
    No
    Integrations
    iHeart Radio, Radio.com, Deezer, TuneIn, Pandora and Amazon Music
    Woofer Size
    4-inch (10 cm) woofer

    The Apple HomePod Mini is an affordable, Siri-enabled speaker that offers plenty of neat smart features, including temperature and humidity monitoring. However, you should only get one if you're in the Apple ecosystem.

  • Apple HomePod 2

    The HomePod 2 comes with a large build, loud sound, wide touchscreen, and more. It seamlessly connects to other Apple devices and offers room temperature and humidity sensors.