Set up Spotify on Raspberry Pi device of yours.In this video we will show you how to run Spotify on Raspberry Pi with ExaGear Desktop. To get ExaGear follow.
The Raspberry Pi has been very popular as a streaming music player. Sure, the only audio out option on the board is an analog stereo jack, but you can use a USB audio device to improve upon that if you wish. [Wouter van Wijk] wanted to use his RPi as a Spotify server. It’s a bit tricky to get everything configured for this, so he decided to give back by publishing a ready to use Spotify server image for the Raspberry Pi.
Raspberry Pi Spotify Player
The project is call the Pi MusicBox. Like some of the RPi Pandora setups we’ve seen he included the ability to use the hardware as an AirPlay device too. To connect to the Spotify service he uses the Mopidy package. It can also play tracks from local storage (including the home network). It’s even capable of mixing the two sources in the same queue. Possibly the best part is that it can be controlled with any Music Player Daemon (MPD) client like the smart phone screenshots seen above.
If you’re interested, check out his GitHub repo for the project.
Spotify for the terminal written in Rust
Connecting to Spotify’s API
spotify-tui
needs to connect to Spotify’s API in order to find music byname, play tracks etc.
Instructions on how to set this up will be shown when you first run the app.
But here they are again:
- Go to the Spotify dashboard https://developer.spotify.com/dashboard/applications
- Click
Create a Client ID
and create an app - Now click
Edit Settings
- Add
http://localhost:8888/callback
to the Redirect URIs - you don't need anything running on localhost, it will still work - You are now ready to authenticate with Spotify!
- Go back to the terminal
- Run
spt
- Enter your
Client ID
- Enter your
Client Secret
- You will be redirected to an official Spotify webpage to ask you for permissions.
- After accepting the permissions, you'll be redirected to localhost (blank webpage, might say something like 'Connection Refused' since no server is running), copy the URL and paste into the prompt in the terminal.
And now you are ready to use the spotify-tui
🎉
You can edit the config at anytime at ${HOME}/snap/spt/current/.config/spotify-tui/client.yml
.
Usage
Raspberry Pi Spotify Box
The binary is named spt
.
Raspberry Pi Music Player App
When running spotify-tui
press ?
to bring up a help menu that shows currently implemented key events and their actions.
Raspberry Pi Spotify Touch Screen
Limitations
This app uses the Web API from Spotify, which doesn't handle streaming itself. So you'll need either an official Spotify client open or a lighter weight alternative such as spotifyd - https://github.com/Spotifyd/spotifyd
If you want to play tracks, Spotify requires that you have a Premium account.
Spotify App Raspberry Pi
Built with ♥️ from the Spotify TUI upstream source at https://github.com/Rigellute/spotify-tui