How to set up Spotify Connect streaming for a Raspberry Pi with the 30-pin Dock Adapter from Poolside Factory

 

 

Hardware needed

- Raspberry Pi to iPod HiFi 30-pin-dock Adapter for Airplay Audio Streaming from Poolside Factory. Comes with standoffs and screws to mount to the Raspberry Pi Zero form factor.

- Raspberry Pi Zero 2 W (Zero 1 is no longer supported by raspotify), with the connector header soldered on.  The 'W' version is necessary for this application.

- SD Card with capacity of 4GB or higher

 

Instructions

If you already have an SD card with a working Raspberry Pi image that you can log into over WiFi, you can use that one, otherwise you can follow these steps to create a fresh one.

Log in to your Raspberry Pi.

Change the hostname of your Raspberry Pi to what you want the name to be that shows up as the Bluetooth speaker name that you can stream to. For this, use raspi-config as shown in the above mentioned steps

Run these commands to bring your Raspberry Pi image up to date and install all the necessary packages (can take 20ish minutes, make sure the shell has your sudo password before you copy-paste the whole block - for instance by running 'sudo ls' first).  The blocks are grouped so that you can copy paste and run them together per group. This tutorial was created using Raspbian 12 Bookworm. 

sudo apt-get -y install curl && curl -sL https://dtcooper.github.io/raspotify/install.sh | sh

The following commands configure the Raspberry Pi to output the sound to the 30-pin dock adapter from Poolside Factory (if you have already run these commands as part of another Poolside Factory tutorial, then don't run them again to avoid duplicate configuration entries). 

sudo sed -i --follow-symlinks 's/dtparam=audio=on/dtparam=audio=off/' /boot/config.txt
sudo sed -i --follow-symlinks '/dtparam=audio=off/a dtoverlay=hifiberry-dac' /boot/config.txt

Reboot the Raspberry Pi for the configuration to become effective

sudo reboot

Now the Raspberry Pi with the 30-Pin Dock Adapter is ready for receiving music via Spotify Connect.  The speaker will show up with the name raspotify followed by your raspberry pi's hostname in brackets. 

These settings will remain after power cycles of the Raspberry Pi, so they will not have to be repeated.   You can use the following command to check the status of raspotify:

sudo systemctl status raspotify

It is possible to have both the code for streaming from a Spotify Connect source and and from an Airplay 2 source installed on the same Raspberry Pi installation. When one source is playing, then the other source will be ignored until the first source is stopped, and the second source restarted. Overall, this is a great setup allowing for streaming both Airplay 2 and Spotify Connect without having to change out the adapter plugged into a 30-pin dock speaker, such as for instance an Apple iPod HiFi. 

Leave a comment

Please note, comments must be approved before they are published