docs(playback): formally document the "stopping" status/playback state (F-065)

Player::setStatus() publishes action "stopping" when the run-time cap is
reached and BellEngine is finishing the current melody loop, but the spec
only listed playing/paused/idle. Kept it (not suppressed): it is a real
state that can last a whole loop while bells still ring, suppressing it on
MQTT alone would break WS/MQTT parity, and v1 tablets already know it.

Adds a state table (entry/exit, stop/play behaviour) to mqtt-events.md and
updates the topic spec and API reference. No firmware change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 20:10:03 +03:00
co-authored by Claude Opus 5.5
parent 204b54fce1
commit fe5ab6223c
4 changed files with 39 additions and 3 deletions
+12 -1
View File
@@ -113,7 +113,7 @@ Flat — no envelope wrapper.
| Field | Type | Description |
|-------|------|-------------|
| `action` | string | `playing` \| `paused` \| `idle` |
| `action` | string | `playing` \| `paused` \| `stopping` \| `idle` — see [States](#states) |
| `time_elapsed` | integer | Seconds since playback started, as of `ts` (0 for `idle`) |
| `projected_run_time` | integer | Projected total run time in ms (0 if not applicable) |
| `pid` | string | Melody being played (`""` when idle) |
@@ -129,6 +129,17 @@ Flat — no envelope wrapper.
The WebSocket transport receives the same fields on every transition, wrapped in the legacy broadcast envelope: `{ "status": "INFO", "type": "playback", "payload": { ...fields above... } }`.
### States
| `action` | Meaning | Entered from | Leaves to |
|---|---|---|---|
| `playing` | Bells are ringing. | `idle` (play accepted), `paused` (segment pause over) | `paused`, `stopping`, `idle` |
| `paused` | Between segments of an `interval` (or legacy `continuous_loop`) play — bells silent, playback still active. | `playing` | `playing`, `idle` |
| `stopping` | The run-time cap (`duration`) has elapsed; the bells are **finishing the current melody loop** before stopping (can last up to one full loop, i.e. steps × `speed`). Still ringing. | `playing` (timer reached `duration`) | `idle` (loop finished) |
| `idle` | Nothing playing. | any (`playback.stop`, natural end, overload force-stop) | `playing` |
`playback.stop` during `playing`/`paused`/`stopping` cuts the bells immediately and goes straight to `idle` — it never passes through `stopping`. A new `playback.play` is rejected in every state except `idle`. The heartbeat's independently-derived `state` reports `idle` during `stopping`.
---
## `vesper/{id}/control/reports`