Skip to content

mesh: LightOverrideMsg — command a single light across devices #458

Description

@bennotk

Part of LightWitch M1 — see the rework plan. Builds on the local override mechanics from #457.

Proposed change

  • New additive MsgType::LightOverride with LightOverrideMsg:
    • targetMac[6] + lightIndex (addressing mirrors SetGroupMsg)
    • full LightConfig snapshot
    • durationMs (0 = permanent until displaced)
    • clear flag (drop the target's override without supplying a snapshot — so any device or, later, a graph node can clear)
  • Receiver applies it through the config,web: per-light override with last-command-wins arbitration #457 arbitration (receive order decides between concurrent senders — last wins).
  • No changes to any existing message; stays inside the same-firmware wire policy.

Acceptance criteria

  • A broadcast with targetMac of device B overrides exactly the addressed light on B; other devices update nothing.
  • clear returns the light to its group from any sender.

Checklist obligations

  • Add the message to the inventory table in docs/mesh-compatibility.md with its framing rule (fixed-size, len >= sizeof)
  • Mock parity where the UI is involved (dashboard reflects an override arriving via mesh)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions