Self Hosted Jukebox with NFC Cards

Fudgel1 pts0 comments

Self Hosted Jukebox with NFC Cards

Self Hosted Jukebox with NFC Cards

Austin Riba

26

May

2026

&&

rust,

linux,

self-hosting,

programming

&&

0 comments

My daughter turned 2 this month. She loves music and we bought her one of those<br>Yoto music boxes a while back. I never really liked it:<br>the music it comes with<br>is terrible and you are locked into their ecosystem to get more. But the main<br>problem with it is that we like to listen to music together on real speakers.<br>She really likes old Kanye! 🤷

The solution I came up with was to borrow the NFC card concept from Yoto but use them to create<br>a family friendly interface to the living room audio set-up. The result is a stack<br>of cards that my daughter can use to play whatever music she likes by tapping them on a reader next<br>to the living room speaker. She loves it!

Parent note: this setup can be completely screenless/headless. I&rsquo;ve got the TV on displaying the player<br>in most of the photos just for exhibition.

The Hardware

It took me a while to find a NFC card reader/writer that I could be pretty sure would work on Linux.<br>Like, surprisingly difficult. Ultimately I ended up with a USB<br>ACR1252U<br>and a stack of NTAG213 cards. The cards come in all sorts of form factors, but I stuck with<br>the boring credit card sized ones. Apparently you can encode these to work with the Yoto as well - they<br>are the same cards that Yoto sells at an approximately 1000x markup.

With this hardware it is pretty straightforward to read/write arbitrary data to the cards when the reader<br>is attached to a computer.

The Software

The family music collection is self hosted using Jellyfin but any Navidrome/Subsonic server<br>would work just as well.

The living room speaker is hooked up to the computer with the NFC reader attached running the Gelly<br>media player. I&rsquo;ve been working on Gelly for the previous ~6 months, so integrating NFC cards seemed like the natural<br>place to start. Instead of baking NFC functionality directly into Gelly which 99.9% of users would never touch,<br>I decided to simply add command line arguments which could<br>be invoked to play specific songs/albums/artists by ID as well as basic playback control. This has the benefit of<br>being generally useful for other projects that don&rsquo;t revolve around toddlers.

Gelly-NFC

With the ability to get text on and off NFC cards and a music player which can be controlled via the command line,<br>gelly-nfc is how we tie it all together. It&rsquo;s a single Python script which serves<br>two purposes:

Write data to blank NFC cards.

Listen for card taps from the reader and execute the corresponding Gelly command.

Adding an album to a card is simple, for example:

uv run main.py write "album:a7eaa2055a9aed8141e22377d467cb1e"

this will run the script, wait for a card to get tapped to the reader and write the string &ldquo;album:a7eaa2055a9aed8141e22377d467cb1e&rdquo;<br>to it. The ID can be copied to the clipboard from the Gelly GUI.

Conversely, running the script with no arguments puts it in listen mode which will listen for card taps and runs Gelly commands:

austin@localhost:~/Documents/gelly-nfc$ uv run main.py<br>Watching for NFC tags... (Ctrl-C to stop)<br>Running: ['flatpak', 'run', 'io.m51.Gelly', '--big-player', '--play-album', 'a7eaa2055a9aed8141e22377d467cb1e']

Simply leave the listen script running on the same host as Gelly and start tapping cards.

The gelly-nfc script can be easily modified to call other commands, so if you aren&rsquo;t using Gelly this could still<br>be a great starting point for enabling NFC cards for other players. MPD comes immediately to mind.

Bonus: Sticker Printer 👎

We bought a Canon IVY 2<br>mini printer to print stickers for the NFC cards. This is a terrible little printer. Don&rsquo;t buy one. I&rsquo;m actively looking<br>for suggestions for how to add better graphics for the cards!

It works!

After putting all the pieces together things worked really satisfactorily to me. It was easy to read, write cards and<br>Gelly responded to gelly-nfc commands flawlessly. The true test, of course, is the toddler test.<br>To my delight she was able to pick it up immediately!

There is one minor bug, however: this tyrannical two year old has one very favorite album: &ldquo;Baby Album&rdquo;. The first song<br>of &ldquo;Baby Album&rdquo; is now the most played song in our entire library, and there isn&rsquo;t even a close second. But hey,<br>you reap what you sow.

Even as an &ldquo;adult&rdquo; I find myself reaching for the cards often. It&rsquo;s nice to have some physicality with the act<br>of picking music as opposed to messing with the TV remote or fiddling with my phone. It&rsquo;s a little like going back to the age of CDs<br>or tapes that filled my childhood.

Overall this was a successful first &ldquo;nerd dad&rdquo; project. I&rsquo;m looking forward to both adding more cards to the collection<br>and to a future where we can listen to something other than &ldquo;Baby Album&rdquo; when<br>it&rsquo;s my daughter&rsquo;s...

cards gelly rsquo music album card

Related Articles