An assignment is now an ordered list of albums (e.g. one vinyl compiling two EPs that are separate releases in the library). Albums move to their own table, with a migration for existing databases. The scan and lookup responses return an albums list instead of the single artist/album/uri fields. The tag page lists its albums with up, down and remove, and search results get an Add button. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.6 KiB
Tag albums
A small service that tells Home Assistant which album to play for a scanned RFID card, and a web page to assign albums to new cards.
Language
Tag:
An RFID sticker on a vinyl record, identified by the ID the reader reports (e.g. 53-13-0B-2A-34-00-01). Nothing is ever written to it.
Avoid: card, NFC tag
Assignment: The link from one Tag to an ordered list of one or more albums (artist + album) in the music library, played one after the other. Usually one album; more when one physical record holds several digital releases (e.g. a vinyl compiling two EPs). Avoid: encoding, mapping, tag map
Unassigned tag: A Tag the service has seen scanned but that has no Assignment yet. Avoid: unknown tag, new tag
Scan: One report that a Tag was placed on a reader, as relayed by Home Assistant. A Scan of an Unassigned tag is how the service learns about it.
Relationships
- A Tag has zero or one Assignment
- An Assignment holds one or more albums, in play order
- Every Scan is of exactly one Tag; the first Scan of an unseen Tag creates it as an Unassigned tag
Example dialogue
Dev: "I stuck a tag on a new record and put it on the reader. Do we need to encode it?" Domain expert: "It's an Unassigned tag now; open the page and give it an Assignment. Nothing gets written to the tag."
Flagged ambiguities
- "Album" in an Assignment means a release in the digital library (album or EP), not the physical record: one record can map to several.
- "Encode the tags" meant assigning an album to a Tag, not writing data onto it. Resolved: Assignment.