Skip to content

NFC controlled Spotify speaker on the Raspberry Pi

License

Notifications You must be signed in to change notification settings

mlagerberg/chuckberry

Repository files navigation

ChuckBerry

Chuck a tag onto a Raspberry, and hear the music!

A small Python project that connects to an NFC antenna, and acts as a Spotify Remote to control music depending on which tag is on the sensor.

The ChuckBerry in action

🎵 Website | 💻 Blog post

Getting started

  1. First, follow the installation instructions or simply run ./setup.sh. Designed to run on Raspbian.
  2. Copy the .sample.env file to .env, and edit it. The ENDPOINT can either be a URL to a JSON endpoint, or a local JSON file. This JSON is where you edit which tag plays which playlist. Check the sample.json to see the required format.
  3. Then run the script:
python3 ./main.py 

Running it as root allows you to shut down the Pi using a tag, if that is something you'd want to do.

Hardware blueprint

Troubleshooting

Does Spotify pretend to play music, but you hear nothing? And the confirmation beeps and sounds are working just find? The LibreSpot service we use to turn the Pi into a connected speaker might be having trouble with Spotify. Try adding these lines to /etc/hosts:

127.0.0.1 	apresolve.spotify.com
104.199.65.124 	ap-gew4.spotify.com

Thanks to this user on Github.

More info

About

NFC controlled Spotify speaker on the Raspberry Pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages