Skip to content

mesh: LightOverrideMsg — command a single light across devices - #463

Open
bennotk wants to merge 1 commit into
claude/issue-457-overridefrom
claude/issue-458-override-msg
Open

mesh: LightOverrideMsg — command a single light across devices#463
bennotk wants to merge 1 commit into
claude/issue-457-overridefrom
claude/issue-458-override-msg

Conversation

@bennotk

@bennotk bennotk commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #462 (base branch claude/issue-457-override) — merge that one first; GitHub retargets this PR to main automatically when the base branch is deleted.

  • New additive MsgType::LightOverride (37) with LightOverrideMsg: targetMac[6] + lightIndex (addressing mirrors SetGroupMsg, target filtering after parse), full LightConfig snapshot, durationMs (0 = stays until displaced), and a clear flag so any device — later a graph node — can return a light to its group without supplying a snapshot
  • Receiver wiring in main.cpp: a targeted device stores/clears the override through the exact same config,web: per-light override with last-command-wins arbitration #457 arbitration path as the local REST surface (LightOverrides + applyEffectiveLight + peers push), so concurrent senders resolve by receive order — last one wins; non-targets ignore the message entirely
  • MeshManager::broadcastLightOverride() takes a fully-built message — snapshot construction deliberately stays with the sender (the set-light button action, actions,web: set-light button action targeting a light on any device #459, per the rework plan)
  • Inventory row in docs/mesh-compatibility.md: fixed-size, len >= sizeof(LightOverrideMsg), same-firmware wire policy, no existing message touched
  • No mock/UI changes needed: the dashboard's "Overridden" indicator from lights,web: per-light override with last-command-wins arbitration #462 reads the light's override state regardless of origin, so a mesh-arriving override shows up identically via the existing peers push

Closes #458

Test plan

  • npm run lint and npm test (44/44) pass — no JS touched, run as regression
  • clang-format --dry-run --Werror clean on all changed src/ files
  • On pr- OTA builds on two devices (A sends, B receives — needs a sender, which lands with the actions,web: set-light button action targeting a light on any device #459 button action; until then reviewable as message + receiver wiring): a broadcast targeting B overrides exactly the addressed light on B while other devices update nothing, clear returns it to the group from any sender, B's dashboard flips its indicator both ways

🤖 Generated with Claude Code

https://claude.ai/code/session_01QCqsYkCrhRHLoWZFuDTWjh


Generated by Claude Code

@bennotk bennotk added the enhancement New feature or request label Jul 24, 2026 — with Claude

bennotk commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Same infrastructure-level CI failure as on #462: every job fails within ~2 seconds with no runner assigned (runner_name empty), no logs, no output — GitHub isn't provisioning runners (most likely the account's Actions minutes/spending limit). Nothing to fix in this branch; lint, tests (44/44), and clang-format are green locally. I'll re-run the workflows on my next check-in.


Generated by Claude Code

@bennotk
bennotk force-pushed the claude/issue-457-override branch from 1334ece to 7e4aeca Compare July 25, 2026 10:08
@bennotk
bennotk force-pushed the claude/issue-458-override-msg branch 2 times, most recently from 33b5710 to 3fbd9cf Compare July 25, 2026 10:11
@bennotk
bennotk force-pushed the claude/issue-457-override branch from cccbaca to 54fe618 Compare July 25, 2026 10:19
Additive MsgType carrying targetMac + lightIndex (addressing mirrors
SetGroupMsg), a full LightConfig snapshot, durationMs, and a clear
flag. The receiver funnels it through the same #457 arbitration as the
local REST surface — receive order decides between concurrent senders —
and pushes the dashboard's override state. Sender construction of the
snapshot stays with the caller (the set-light button action, #459).
Inventory entry in docs/mesh-compatibility.md with the len >= sizeof
framing rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QCqsYkCrhRHLoWZFuDTWjh
@bennotk
bennotk force-pushed the claude/issue-458-override-msg branch from 3fbd9cf to 4e321e0 Compare July 25, 2026 10:19

bennotk commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator Author

CI is green after rebasing onto the renamed project's main and onto #462's fixed head — all 10 checks pass, including both firmware builds and the published pr-463 build.

Still stacked on #462 (base branch claude/issue-457-override); merge that one first and GitHub retargets this PR to main automatically.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants