Im trying to get Volume to work with a Rfid card reader. The card reader works fine and managed to get socket.io to work also for things like Volume up, pause etc…
I haven’t managed yet to play a track or playlist from Spotify with a card, I can’t figure out how to edit io.emit command for that. Would be very grateful for any help, if possible in Python please
The below example works to rise the volume,
from socketIO_client import SocketIO
with SocketIO('localhost', 3000) as socketIO:
socketIO.emit('volume', '+')
But to play a Spotify playlist?? the below line doesn’t work and I have no idea how to write it…
I’m trying to do something similar, but trying to install phoniebox or some other pre developed package. Have you had a look at anything like this? I’m sure it’s far more bloated than your system but might give you some insight into what they’re doing, they have an option to play a spotify playlist via RFID.
I have wired up a card reader to my Raspberry Pi and have released the software and instructions on Github: github.com/tinkerthon/volumio-rfid
With this, you can link RFID cards to Spotify URLs hand have them played whenever you put a card on the reader. The card id/URL pair is managed in a (free) Airtable CMS.