docs.na.id.au

Why this exists

RFID tags & music albums

How to play a music album by tapping an RFID/NFC tag — a physical “remote control” for the music system that anyone in the house can use without a phone or a voice command.

Why this exists

Voice control needs a working mic and a network; the HA dashboard needs a phone. A tag taped to a bookshelf, a record, or the side of the music room door works for everyone, including kids and guests. Tap the tag, and the album it represents starts playing — no app, no speaking, no configuration.

Hardware

The practical detail is where the reader plugs in. The simplest arrangement is a reader on the same machine (or LAN box) that runs the music server, so taps are visible to HA without extra wiring.

Concept: one tag = one album

Each tag’s UID maps to exactly one album. The mapping lives in one place — a YAML dict in the automation (or a template sensor) — so adding an album is a one-line change:

tag_map:
  '04:12:34:56': 'Abbey Road'      # UID -> album
  '04:9a:bc:de': 'Dark Side of the Moon'

A small template sensor turns the raw reader state into a readable “album tapped” value (or unknown), which makes testing and the debug log pleasant: instead of staring at UIDs, the log says which album.

Automation

alias: 'Media:Album Tag'
trigger:
  - trigger: state
    entity_id: sensor.rfid_reader
    to:
      - '04:12:34:56'   # or: any, if the template sensor does the lookup
condition:
  - condition: template
    value_template: >-
      {{ trigger.to in [ '04:12:34:56', '04:9a:bc:de' ] }}
action:
  - action: media_player.play_media
    target:
      entity_id: media_player.music_room_speakers
    data:
      media_content_id: 'mpd:album:Abbey Road'
      media_content_type: 'music'
mode: single

Design points:

Tips & tricks



Source Disclaimer