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.
- First, follow the installation instructions or simply run
./setup.sh
. Designed to run on Raspbian. - Copy the
.sample.env
file to.env
, and edit it. TheENDPOINT
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 thesample.json
to see the required format. - 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.
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.
- Nexmosphere serial protocol documentation (PDF).
- Installation instructions are in INSTALL.md.