Skip to content

Surface command-status faults as an "error" LED state#20

Open
Daniel Botros (danielbotros) wants to merge 1 commit into
mainfrom
led-error-mode
Open

Surface command-status faults as an "error" LED state#20
Daniel Botros (danielbotros) wants to merge 1 commit into
mainfrom
led-error-mode

Conversation

@danielbotros

@danielbotros Daniel Botros (danielbotros) commented Jul 15, 2026

Copy link
Copy Markdown

Lets a machine flash its LED strip red when a watched command resource faults — e.g. the beanjamin coffee service after a failed brew (companion PR: viamrobotics/beanjamin#256).

  • voice-command: while its command_status resource raises the conventional fault_active: true in Status(), voice-command reports its lifecycle state as "error" (outranking conversation activity). voice-command is the single state owner, so no arbitration is needed anywhere: the flag is transient on the source and the state reverts on its own. The nested status fetch is bounded (1s timeout) so a wedged source can't stall Status() consumers.
  • led-bridge: actionForState allow-lists "error" so the poller forwards it.
  • Firmware (led-indicator.ino): new MODE_ERROR — square-wave red flash (~400ms on/off) until another state arrives. No timer or previous-mode memory in the firmware; the host owns all transitions, keeping the sketch a pure state renderer.

The firmware is reference-only in this repo (not built at runtime); deployed strips need a reflash to render the new mode. Older firmware ignores the error line, so the Go changes are safe to roll out first.

🤖 Generated with Claude Code

@danielbotros Daniel Botros (danielbotros) changed the title led-bridge: add an "error" state rendered as a transient red flash Surface command-status faults as an "error" LED state Jul 15, 2026
@danielbotros
Daniel Botros (danielbotros) marked this pull request as ready for review July 17, 2026 16:17
While the command_status resource raises the conventional
fault_active: true in its Status(), voice-command reports its
lifecycle state as "error" (outranking conversation activity, bounded
by a 1s fetch timeout so a wedged source can't stall consumers).
led-bridge forwards the state, and the reference firmware renders it
as a red flash (~400ms on/off) until another state arrives.

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants