RFID Reader + Tidal Connect (URIs) on Volumio

In pursuit of “better” methods to play music I was wondering if anyone has been successful getting an RFID card reader to play Tidal URIs (albums/playlists) on a Volumio RPi?

My current setup is using Phoniebox + Mopidy + Mopidy-Tidal to allow playback of Tidal URIs assigned to a RFID tag. I then use SNAPCAST send the sound to my Monoprice whole house 6-zone amp for distribution to the house. This has been relative stable minus frustrations with daily PN532 reader issues due what seems to be I2C issues requiring power-cycling the RPi to resolve sometimes - other times not. I have also attempted to use a RC522 over SPI but couldn’t get Phoniebox to recognize the reader (although I have a script that is able to read the RFID tag so it’s connected to the RPi correctly - I think issue is I’m on Bookworm vs. Buster). I’ve ordered a USB RFID reader to maybe eliminate the RFID issues (will know next week how that goes).

While this setup works I feel a cleaner solution would be leverage Volumio’s Tidal Connect architecture (plus ability to cast via Volumio to Airplay/Google Cast devices w/o SNAPCAST involved).

I found fywk’s Github project (GitHub - fywk/rfid-volumio: Control Volumio on Raspberry Pi via RFID) that seemed promising but limited to Spotify and MPD sources. From what I can tell Tidal isn’t a supported music source. I’ve opened up an issue (question) to see if Tidal URIs are/could be supported.

I’m not a coder so looking at the Tidal API docs and such is like a infant trying to understand physics.

There are many Volumio Spotify and webradio solutions out there but I just can’t find a Volumio Tidal one.

Thanks

I’ve been doing some hacking via SSH and CURL commands. I have been able to get a webradio to play via the following curl:

curl -i --header "Content-Type: application/json" pihome:3000/api/v1/replaceAndPlay --data '{"service": "webradio", "type": "webradio", "title": "Nova%20La%20Nuit", "uri": "http://nova-ln.ice.infomaniak.ch/nova-ln-128", "albumart": "https://www.nova.fr/sites/default/files/2020-06/Nova%20la%20Nuit_1.jpg"}'

But haven’t been successful in getting a Tidal album to play. I’m using the following curl command:

curl -i --header "Content-Type: application/json" pihome:3000/api/v1/replaceAndPlay --data '{"status":"play","position":0,"title":"The Seventh Seal","artist":"Van Halen","album":"Balance","uri":"uri":"tidal:album:6442652","trackType":"tidal","stream":false,"updatedb":false,"volatile":false,"service":"tidalconnect"}'

The URI is grabbed from Mopidy. The dev log shows the following after I issue that command. It appears to add the album to the queue (see boldfaced text), but the doesn’t play (even with the “toggle” or “play” curl statements, nor does it show up in the Volumio GUI as being in the queue). Has anyone been successful in getting an album queued and playing via SSH in the Volumio.local terminal?

info: CoreCommandRouter::volumioReplaceandPlayItems
info: CoreStateMachine::ClearQueue
info: CoreStateMachine::stop
info: CoreStateMachine::setConsumeUpdateService undefined
info: CorePlayQueue::clearPlayQueue
info: CorePlayQueue::saveQueue
info: CoreCommandRouter::volumioPushQueue
info: CoreStateMachine::addQueueItems
info: CorePlayQueue::addQueueItems
info: Preload queue cleared
**info: Adding Item to queue: tidal:album:6442652**
**info: Exploding uri tidal:album:6442652 in service tidalconnect**
info: CoreCommandRouter::volumioPushQueue
info: CorePlayQueue::saveQueue
info: CoreStateMachine::updateTrackBlock
info: CorePlayQueue::getTrackBlock
info: CoreCommandRouter::volumioPlay
info: CoreStateMachine::play index 0
info: CoreStateMachine::setConsumeUpdateService undefined
**info: CoreStateMachine::stop**
info: CoreStateMachine::setConsumeUpdateService undefined
info: CoreStateMachine::play index undefined
info: CoreStateMachine::setConsumeUpdateService undefined
info: CorePlayQueue::getTrack 0
info: CoreStateMachine::startPlaybackTimer
info: CorePlayQueue::getTrack 0
info: CoreCommandRouter::volumioGetVisibleSources
info: CoreCommandRouter::executeOnPlugin: my_music , getDisabledSources
info: CoreCommandRouter::executeOnPlugin: mpd , getMyCollectionStatsObject

Also I don’t understand if those CoreStateMachine::setConsumeUpdateService undefined messages are an issue.

If I could get the Tidal album added via curl it would get me 1 step closer to trying to bash together some code from GITHUB/RFID reader projects, but I’m stuck with what should be a simple task.

Thanks.

I was finally able to successfully come up with a solution for using RFID tags to play Tidal (subscription) albums via Volumio (Premium subscription) using Grok. It’s written in Python. Hopefully this will help others would like to have similar functionality.

Requires a USB RFID reader and RFID tags. There are only 2 files needed - 1) the python code and 2) the rfid_lookup.csv file.

https://github.com/funetn/Volumio-Tidal-RFID-Playback/tree/main