/aoede

Dedicated spotify device built with a raspberry pi zero

Primary LanguageScala


A Spotify player/remote controller build for cheap, with a raspberry pi

screenshot


Hardware

Obviously you can use other things, because 99% of this is software, but here are the things I used.

I left links for bulk stuff, obviously buy them as you see fit.


Software setup

I use ScalaFX, ScalaFXML and Undertow for the app, big thanks to the maintainers. You will only need a Java8 (and up) runtime.

  • Register a Spotify account
  • Pay for premium :)))
  • Go to the developer dashboard
  • Create an app
  • Plug client-id and client-secret into your application.properties file
  • Add a redirect URL in the dashboard, and plug it into the file. If you want automated setup, leave local-server on true and use http://localhost:9001/ (it's over 9k), but you have no idea if my code is stealing your credentials (it's not). You can also use http://144.202.12.141:9005 but I can't guarantee that I won't forget to pay Vultr for the VPS. Alternatively, pip install flask && python app.py to run a local server.

I recommend you do these steps on your computer, and just copy over the config later. If you use the automated setup, you will be prompted to log in to your account in the browser of your choice, i recommend setting it up on your pi with a keyboard at least once (or use VNC).


  • Install headless raspbian on your sd card (you don't need any of the extra software)
  • Add the networks you will use to the wpa-supplicant.conf file
  • Enable SSH
  • Detailed tutorial for previous steps
  • ssh into your pi (ssh pi@raspberrypi.local) password: pi
  • I will add a setup script later
  • Get your application.properties file near the .jar file on the pi (cat application.properties.template | nc termbin.com 9999 | xclip -i then curl *middle click* > application.properties)
  • Add java -jar spotify.jar to startup