Crappy weather in Paris... So this weekend is RFID weekend !
My Spotify account is used by my kids on a regular basis now and not all of them are old enough to read. A few lines of script later, and Spotify is accessible to all of them (which seems to already cause healthy fights, but let's stay focused...).
I used Mir:ror in a previous Instructable: it is a RFID reader that used to need a web service from a now dead company (Violet).
Said RFID reader can be accessed locally by simple scripts (including osascript).
What you will need for this project:
- a Mir:ror from violet (about 10 / 15 euros on ebay / in a garage sale these days)
- compatible RFID cards (any ISO14443A card, ebay is your friend)
- a Mac running OSX (mine is running 10.6.8). [minimum Intel-mac, running 10.5]
Step 1: OSX
[note: I used to use node.js here but due to incompatibility with 10.5.8, I ended up modifying a hidapi example instead.]
Hidtest is a program that opens the device and reads from it. It is a modified example of the hidapi package. Details in step 4.
Copy the attached hidtest and spotify_osx.sh files into your home directory.
Then, in a terminal:
bash-3.2$ chmod 777 spotify_osx.sh
bash-3.2$ chmod 777 hidtest
start the script in a terminal