Public Access
Say records and tags instead of cards
The tags are RFID stickers on vinyl records, not cards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
# Tag albums
|
||||
|
||||
Tells Home Assistant which album to play when an RFID card (a **Tag**) is scanned, and provides a web page to give new cards an album (an **Assignment**). See [CONTEXT.md](CONTEXT.md) for the vocabulary.
|
||||
Tells Home Assistant which album to play when a vinyl record's RFID sticker (a **Tag**) is scanned, and provides a web page to give newly tagged records an album (an **Assignment**). See [CONTEXT.md](CONTEXT.md) for the vocabulary.
|
||||
|
||||
How it fits together:
|
||||
|
||||
1. The ESPHome RFID reader sends `tag_scanned` to Home Assistant, as before.
|
||||
2. HA's `Play album by tag` script calls `POST /api/scans`. The service records the **Scan** and answers with the album, or `assigned: false`.
|
||||
3. A card the service hasn't seen before becomes an **Unassigned tag**. It appears on the web page within a few seconds, where you search the Music Assistant library and assign an album.
|
||||
4. When a card is removed, HA's `Stop album by tag` script calls `GET /api/tags/{tag_id}`. It stops the player only if that tag has an album.
|
||||
3. A tag the service hasn't seen before becomes an **Unassigned tag**. It appears on the web page within a few seconds, where you search the Music Assistant library and assign an album.
|
||||
4. When the record is removed, HA's `Stop album by tag` script calls `GET /api/tags/{tag_id}`. It stops the player only if that tag has an album.
|
||||
|
||||
## Demo
|
||||
|
||||
A card is scanned while the page is open, shows up under Unassigned tags, and gets an album from a live search of the Music Assistant library:
|
||||
A newly tagged record is scanned while the page is open, shows up under Unassigned tags, and gets an album from a live search of the Music Assistant library:
|
||||
|
||||

|
||||

|
||||
|
||||
## API
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h1>Tag albums</h1>
|
||||
|
||||
<h2>Unassigned tags</h2>
|
||||
<p class="muted">Scan a new card on the reader and it shows up here.</p>
|
||||
<p class="muted">Put a newly tagged record on the reader and it shows up here.</p>
|
||||
<div hx-get="/unassigned" hx-trigger="every 3s" hx-swap="innerHTML">
|
||||
{% include "_unassigned.html" %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user