explaingit

nebarik/esp32-nfc-reader

Analysis updated 2026-05-18

2ShellAudience · generalComplexity · 3/5Setup · hard

TLDR

Template files and a guide for building an ESP32 NFC reader that automatically plays albums in Home Assistant when you scan a tagged CD case.

Mindmap

mindmap
  root((esp32-nfc-reader))
    Hardware
      ESP32 microcontroller
      PN532 NFC module
      NFC sticker tags
    Firmware
      ESPHome config
      Compiled via CLI
      Flashed via browser
    Home Assistant
      Tags appear automatically
      Named by album
    Automation Script
      match_album.sh
      Pulls tags from HA
      Matches to Music Assistant
      Generates YAML automation
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a physical NFC reader that plays a CD album on your smart speakers when you scan the case.

USE CASE 2

Automate album playback in Home Assistant by linking NFC sticker tags to Music Assistant library entries.

USE CASE 3

Flash custom firmware onto an ESP32 using ESPHome and connect it to Home Assistant without writing any code.

What is it built with?

ShellESPHomeHome AssistantYAML

How does it compare?

nebarik/esp32-nfc-readerchrisor-dev/claude-autosyncdangerousyams/muxer
Stars222
LanguageShellShellShell
Setup difficultyhardmoderatemoderate
Complexity3/53/53/5
Audiencegeneraldeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires an ESP32, PN532 NFC module, soldering, and existing Home Assistant and Music Assistant installations.

In plain English

This project provides the template files and step-by-step instructions to build a physical NFC tag reader that automatically plays an album in Home Assistant when you scan a tag. The motivating use case is a CD collection: you attach NFC stickers inside CD cases, scan a case on the reader, and the corresponding album starts playing on nearby smart speakers. The hardware side requires an ESP32 microcontroller and a PN532 NFC module, both available for a few dollars each. You flash custom firmware onto the ESP32 using the ESPHome tool, which compiles the provided configuration file and produces a binary you upload via a browser-based flasher at web.esphome.io. A short wiring step connects the NFC module to the ESP32 using four wires and puts the module into I2C mode by flipping a physical switch. Once powered and connected to your Wi-Fi, the ESP32 appears in Home Assistant automatically. After scanning your NFC tags in Home Assistant and naming each one after the corresponding album, the second part of the project takes over. A shell script called match_album.sh pulls the list of tags from Home Assistant, matches each tag name to an album in Music Assistant, and generates a Home Assistant automation YAML file that maps each tag to the correct playback command. Running the script once updates the automation in Home Assistant with all the matches. Tags that do not match any album are logged in a separate file so you can rename them and retry. The repository is described as template files and a guide for people who want to skip the research and assembly work that the author spent a long time doing.

Copy-paste prompts

Prompt 1
I want to build the esp32-nfc-reader project. Walk me through the wiring between the ESP32 and the PN532 NFC module and what the nfc-reader.yaml config needs.
Prompt 2
How does the match_album.sh script match my Home Assistant NFC tag names to albums in Music Assistant? What happens to tags that do not match?
Prompt 3
I scanned my NFC tags in Home Assistant but they are not showing up under Settings > Tags. What does the esp32-nfc-reader guide suggest to check?

Frequently asked questions

What is esp32-nfc-reader?

Template files and a guide for building an ESP32 NFC reader that automatically plays albums in Home Assistant when you scan a tagged CD case.

What language is esp32-nfc-reader written in?

Mainly Shell. The stack also includes Shell, ESPHome, Home Assistant.

How hard is esp32-nfc-reader to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is esp32-nfc-reader for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub nebarik on gitmyhub

Verify against the repo before relying on details.