Raspberry Pi as a Spotify Connect source

This is verified to work with a Raspberry Pi model 3 B+ with Raspbian Stretch on 01/20/19. It really should work with any Pi using Jessie too.

The program we will use to stream music from any device to our Pi is called “raspotify“, which makes our Pi into a Spotify connect source. We will install the program and then make changes to the configuration file to customize the bit rate and Spotify Connect name which can be anything you choose.

Install raspotify from console:
https://dtcooper.github.io/raspotify/

From script:

curl -sL https://dtcooper.github.io/raspotify/install.sh | sh

Or manually:
# Install curl and https apt transport
sudo apt-get -y install curl apt-transport-https

# Add repo and its GPG key
curl -sSL https://dtcooper.github.io/raspotify/key.asc | sudo apt-key add -v –
echo ‘deb https://dtcooper.github.io/raspotify jessie main’ | sudo tee /etc/apt/sources.list.d/raspotify.list

# Install package
sudo apt-get update
sudo apt-get -y install raspotify

Restart raspotify:
sudo systemctl restart raspotify

If raspotify does not appear after boot, here are some options.

——————
Now you can send Spotify to your Pi using Spotify Connect from any device!

If you want to make changes to the Pi as a Spotify Connect source:
sudo pico /etc/default/raspotify

You will need to comment out the “#” for each option.

Change the device name:
DEVICE_NAME=”Spotify on the Pi”

If you want to change the bitrate:
BITRATE=”320″

Change the audio output, first the :
–device hw:0,5
(Note: you will need to type “lsusb” to find the Bus and Device Number)

Save the file and restart the service:
sudo systemctl restart raspotify

Final comments: I found this to work beautify.  Regarding the option to change the audio out hardware, my USB device was spotty. If you leave this option alone and simply use the audio out jack or HDMI you will find it is very reliable.

Leave a comment

Your email address will not be published. Required fields are marked *