A Spotify display for 64x64 RGB LED matrices (raspberry pi project v2)
Note
You can run this project either on a raspberry pi connected to an rgb matrix or in a window that emulates a matrix display. If you don't have the components yet, emulation is a great option!
Here is the list of hardware I used. You can ignore the software details as they are irrelevant for v2.
- Go to https://developer.spotify.com/dashboard
- Create an account and/or login
- Select "Create app" (name/description does not matter)
- Add http://localhost:8080/callback under Redirect URIs
- Save, then tap "Settings" in the upper right
- Copy the generated Client ID and Secret ID for later
matrix.mp4
The above video is from my reddit post here.
Important
Please see the pi setup wiki page for a full installation guide!
- Clone and enter the repo
git clone --recurse-submodules https://github.com/kylejohnsonkj/rpi-spotify-matrix-display
cd rpi-spotify-matrix-display/
- Set your Client ID and Secret ID in the config.ini 🙂
- Create and activate a python virtual environment
python3 -m venv .venv
source .venv/bin/activate
- Install dependencies
python3 -m pip install -r requirements.txt
- Run the controller emulated (-e) from the impl/ directory
cd impl/
python3 controller_v3.py -e
- Authorize Spotify
- After running, follow instructions provided in the console. Pasted link should begin with http://localhost:8080/callback
- After successful authorization, play a song and the display will appear!
Argument | Default | Description |
---|---|---|
-e , --emulated |
false | Run in a matrix emulator |
-f , --fullscreen |
false | Always display album art in full screen (64x64) |
-h , --help |
false | Display help messages for arguments |
Configuration is handled in the config.ini. I have included my own as a sample.
For Matrix configuration, see https://github.com/hzeller/rpi-rgb-led-matrix#changing-parameters-via-command-line-flags. More extensive customization can be done in impl/controller_v3.py
directly.
For Spotify configuration, set the client_id
and client_secret
to your own. You may leave redirect_uri
alone. I have also included a device_whitelist
which is disabled by default.
Thanks to allenslab for providing the original codebase for this project, matrix-dashboard. You can find his original reddit post here. This project is an adaption of his Spotify app for 64x64 matrices, while also packing some other improvements.
Thanks to ty-porter for his fork of matrix-dashboard from which my development branched from. The emulation support his RGBMatrixEmulator project added made it a breeze to develop efficiently.
And finally, thanks to hzeller for his work on rpi-rgb-led-matrix.