NOTEPAD: what the house port settled, and what it left

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-22 14:46:08 +02:00
co-authored by Claude Opus 5
parent 436ca7e9af
commit 0f1d2cc483
+35 -10
View File
@@ -171,17 +171,42 @@ dashboard, seeded by `make -C app seed-house`.
### Porting the Node-RED flows
What the reference actually does, extracted while building the write-path rig.
One `Art-Net Out` node in 865 covers every physical device: `mqtt in <topic>`
-> `change` (msg.topic = DMX channel) -> an `nCH` encoder function -> Art-Net,
to 192.168.1.12 universe 1. Payloads are bare: `ON`/`OFF`, a number, `[h,s,v]`,
`UP`/`DOWN`. Nothing is retained, so state lives only in Node-RED globals and
is lost on its restart.
Built: `scripts/tinyhouse/`, `make -C app seed-tinyhouse`. Nineteen flows, 109
nodes, three dashboards, against the reference's 865. What each requirement
became, what was deliberately dropped, and the cutover order are in
`docs/private/node-red-transition.md`. What is left here is what the seeding
does not settle.
- CHORE/FLOW: three DMX channel collisions in the reference — ch 9 (`light/bathRoomLight` vs `light/bathRoomSinkLight`), ch 28 (`actor/windowOpenerStorage` 28-29 vs `light/traverseAmbientLight` 28-30), ch 129 (`actor/canopy` 129-130 vs an orphaned 1CH mapping). Decide these deliberately rather than porting them.
- CHORE/FLOW: 1CH values are not scaled. `light/traverseSpotLight` and `light/kitchenDirectLight` receive 0-100 and that number lands on DMX as-is, so those fixtures never go above 100/255. The 4CH "A" channel gets `v` raw for the same reason. Faithful is ugly; deliberate is better.
- BUG/FLOW: the reference's `function 9`/`function 10` publish the string `"undefined"` for unselected zones (`var a, b, c = [0,0,0]` only initialises `c`), which reaches the 3CH/4CH encoders and produces `NaN` DMX values. A port should emit an explicit `OFF`.
- CHORE/FLOW: dead in the reference and not worth porting — the `AmbientModeToLight` chain, the four Dashboard toggle chains, `light/generalLight` (written, no consumer), `light/outdoorPavillonLight` (no wiring), `Color Adapt`.
- CHORE/FLOW: the DMX channel collisions were decided rather than ported — ch 9
is one bathroom fixture, and `light/traverseAmbientLight` (28-30, colliding
with the window opener's 28-29) is left out on the assumption that it is
decommissioned, since the live scene engine never drove it. The stray 1CH
mapping on 129 beside the awning's 129-130 is dropped. **Check the wiring
before `dmx` transmits.**
- CHORE/FLOW: 1CH values are still used raw, so those fixtures still never go
above 100/255, and the 4CH master channel still takes `v` on a different
scale from its colour channels. Both are `scale` and `master_raw` settings on
the encoders now, so fixing one is a decision about one fixture rather than a
surprise across all of them.
- CHORE/FLOW: `artnet.baseline` in `house.json` is empty. A frame carries the
whole universe, so the first one this node sends darkens every channel it is
not driving. Fill it in from what the fixtures are at, before transmitting.
- FEAT/FLOW: the deferred half of the port — the media plug and the radio at
192.168.1.227, the alarm clock, audio through `thgui/display/audio`, and the
fire alarm. The alarm's hook exists: every arbiter takes a `force_at` pulse,
so an alarm flow provides `safety.fire` and each actuator binds it with its
own safe value.
- CHORE/FLOW: the 433 MHz weather stations retain `status = dead`. Nothing
waits on them, but every humidity rule is inert until they are back.
- CHORE/INFRA: `TZ` now reaches the api container and is set to Europe/Berlin.
The container has to be recreated once before any cron means local time.
- CHORE/UI: a rollershutter is three buttons, because there is no cover widget
and no position to bind one to. A cover widget with an up/stop/down control
would be one tile instead of three, on four motors.
- PERF/FLOW: the MQTT node opens one connection per node, while
`docs/reference/node-types.md` says nodes sharing a broker share one. Eight
nodes speak to the house broker here. Either a shared client registry or a
correction to the sentence.
### Bugs found while building the screens