This is a small hobby-project of mine to learn Golang and to help automating my smart home.
Idea is to put NFC Tags on all the vinyls I own. If you scan a tag with your phone it will play the album on Spotify/Sonos.
I plan to achieve this by running a small webserver on a raspberry pi and then put a unique URI per vinyl on a NFC Tag. Once this URI is called the playback could start immediately.
- Webserver
- Authentication against Spotify
- Databaselike key/value store for NFC Tag(URL?) to Album matching (maybe Bitcask?)
- A lot of NFC Tags 😉
* How do we automatically play a specific Album (Spotify URI) on a specific Sonos zone player? (see: https://svrooij.io/sonos-api-docs/services/av-transport.html#adduritoqueue)
- https://www.instructables.com/Albums-With-NFC-Tags-to-Automatically-Play-Spotify/
- https://shkspr.mobi/blog/2020/09/how-can-i-launch-a-spotify-album-from-an-nfc-tag/
- https://developer.sonos.com/reference/control-api/
Provide the following ENV var to the docker container to make it work
HTTP_PORT
the port where the server should runREDIS_URI
a connection string to a redis serverSPOTIFY_CLIENT_ID
A spotify app client idSPOTIFY_CLIENT_SECRET
A spotify app client secretSONOS_PLAYER
The IP of your local Sonos to play onSONOS_COORDINATOR
UID of the ZonePlayer (e.gRINCON_347E5C03D62F01400
)
Photo by Victrola Record Players on Unsplash