Design: make a scheme describe intent, so it can drive devices other than WLED #155
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
security
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#155
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why this has to come first
Every other "beyond WLED" item depends on this decision. That includes #13 (multi-controller), #12 (MQTT/HA) and the device issues filed alongside it: on/off decorations (#156), colour smart lights (#157), and FPP shows (#158). It is much cheaper to make now than after they are built.
Today a scheme is a WLED payload in disguise. Its segments carry WLED
effect_id,sx,ix,paland colour slots, andscheme_translator.pyturns that almost 1:1 into/json/state. Verified againstmain:DemoControllersubclasses the concrete HTTPWLEDController(services/demo_controller.py), and every call site type-hints the concrete class (wled_push,ramp,quick_push_manager).services/wled_controller.py).WLEDControllerclass early": a single-vendor abstraction.Iris's distinctive value is the calendar, schemes and human review, not device control; Home Assistant already controls every device. So the goal is that the curated calendar can drive whatever decorations someone owns, without Iris turning into a home-automation hub.
Proposal to evaluate
1. A scheme expresses intent, with optional device-specific detail:
wled: {effect_id, sx, ix, pal}. It lets WLED keep exact fidelity, because nobody should lose the ability to pick Fire 2012 at speed 140.2. Device renderers, one per device type, each turning intent (plus its override block, if present) into that device's command:
3. A
ControllerProtocol, with capability flags (pixels,color,switch,sequence), implemented byWLEDController,DemoControllerand each new backend. The scheduler iterates devices and pushes each one its rendering. Push, retry, watchdog (#148), ramp and quick-push logic become per-device.4. Migration:
wled:override block holding their exact current values, so nothing about an existing install changes.Questions the design must answer
controller_idFKs in §16.3 becomedevice_id. Reconcile the two before either is built.prompt_builder.py) should generate intent plus the WLED block. Intent is also easier for a model to get right than opaque effect IDs (see #132 for how that went).Deliverable
A design doc (
docs/design/device-model.md) and an updated spec §16, reviewed before any of the dependent issues start, plus a spike: the Protocol and WLED renderer refactor with zero behaviour change, proven by the existing test suite passing unchanged.