node-red-contrib-dmx-for-ha 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +282 -0
- package/docs/config_node_spec.md +236 -0
- package/docs/dmx_node_env_reference.md +341 -0
- package/docs/master_todo.md +428 -0
- package/docs/node_contracts.md +278 -0
- package/docs/nr_subflow_gotchas.md +258 -0
- package/nodes/ha-mqtt-button.html +326 -0
- package/nodes/ha-mqtt-button.js +158 -0
- package/nodes/ha-mqtt-config.html +233 -0
- package/nodes/ha-mqtt-config.js +81 -0
- package/nodes/ha-mqtt-dmx-group.html +392 -0
- package/nodes/ha-mqtt-dmx-group.js +265 -0
- package/nodes/ha-mqtt-dmx.html +547 -0
- package/nodes/ha-mqtt-dmx.js +537 -0
- package/nodes/ha-mqtt-pir.html +343 -0
- package/nodes/ha-mqtt-pir.js +183 -0
- package/nodes/ha-mqtt-relay.html +326 -0
- package/nodes/ha-mqtt-relay.js +289 -0
- package/package.json +39 -0
- package/subflow/README.md +35 -0
- package/subflow/button_node_v5.0.3.js +324 -0
- package/subflow/dmx_group_node_v0.3.8.js +860 -0
- package/subflow/dmx_node_v0.5.9.js +1994 -0
- package/subflow/pir_node_v1.0.3.js +365 -0
- package/subflow/relay_node_v4.0.2.js +553 -0
- package/subflow/subflow_definitions.json +6154 -0
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
# DMX Node-RED Project — Master TODO & Roadmap
|
|
2
|
+
**Last updated:** Session 3
|
|
3
|
+
**Discord:** @deswaggy
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Project Versions
|
|
8
|
+
|
|
9
|
+
| Node | Current Version | Status |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| DMX NODE | 0.5.9 | World tested — field testing pending |
|
|
12
|
+
| DMX GROUP NODE | 0.3.8 | World tested — field testing pending |
|
|
13
|
+
| 230V RELAY NODE | 4.0.2 | World tested — field testing pending |
|
|
14
|
+
| BUTTON NODE | 5.0.3 | World tested — field testing pending |
|
|
15
|
+
| PIR / BINARY SENSOR NODE | 1.0.3 | World tested — field testing pending |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Versioning Convention
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
MAJOR.MINOR.PATCH
|
|
23
|
+
│ │ └── Bug fix / small addition (+0.0.1)
|
|
24
|
+
│ └──────── New feature / significant change, no breaking (+0.1.0, reset patch)
|
|
25
|
+
└────────────── Breaking change / full rewrite (+1.0.0, reset minor + patch)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## DMX NODE (v0.5.9)
|
|
31
|
+
|
|
32
|
+
### World Testing
|
|
33
|
+
- [ ] Worst-case perf test — 200–300 rgbw subflows simultaneous
|
|
34
|
+
- [ ] Snapshot into _dev & beta nodes
|
|
35
|
+
- [ ] HA automations wired to new nodes
|
|
36
|
+
- [ ] Begin migrating rules from NR to HA — NR remains as virtual lighting desk only, no rules post-migration
|
|
37
|
+
- [ ] Tune GAMMA constant per fixture type based on real-world fade observation
|
|
38
|
+
- [ ] Tune `<DMX_transition_ticks_ps>` per fixture based on deployment size
|
|
39
|
+
- [ ] Validate `<DMX_ct_min_mireds>` & `<DMX_ct_max_mireds>` against fixture spec sheets
|
|
40
|
+
- [ ] Validate `<DMX_Brightness_Initial_on_value>` bump level per room/fixture
|
|
41
|
+
- [ ] Stress test disk-save timer under rapid command bursts (colour wheel drag)
|
|
42
|
+
- [ ] Confirm all effects self-terminate and `restoreAfterEffect()` correctly on all color modes
|
|
43
|
+
- [ ] Verify recovery state payload on reboot for each supported color mode
|
|
44
|
+
|
|
45
|
+
### Post Testing — Release & Documentation
|
|
46
|
+
- [x] Audit discovery payload field names — `default_entity_id` is not a valid HA MQTT
|
|
47
|
+
discovery field. The correct field is `object_id`. DMX and Group Nodes likely need
|
|
48
|
+
this corrected before packaging — check if entity_ids are being generated correctly
|
|
49
|
+
in HA or defaulting to name-based slugs. Button and PIR nodes use `object_id` correctly.
|
|
50
|
+
- [x] Package as a proper Node-RED node (package.json, node .js + .html)
|
|
51
|
+
- [ ] Git repository setup with branch structure (_dev / beta / main)
|
|
52
|
+
- [x] README — project overview, what the node does, where it fits in HA → NR → DMX chain
|
|
53
|
+
- [ ] README — architecture diagram: HA dashboard → MQTT → NR subflow → DMX controller
|
|
54
|
+
- [x] README — installation & setup (NR dependencies, settings.js context store config, MQTT broker)
|
|
55
|
+
- [ ] README — how to deploy a new fixture (step by step using the env checklist)
|
|
56
|
+
- [ ] README — env variable reference (fold in dmx_node_env_reference.md)
|
|
57
|
+
- [ ] README — transition & effects guide (rate limit vs ticks, tuning for deployment size)
|
|
58
|
+
- [x] README — troubleshooting guide (common faults, what to check in NR context store panel)
|
|
59
|
+
- [ ] README — gamma & DMX min output note for lighting designers:
|
|
60
|
+
Explain that GAMMA=2.2 is perceptually correct but collapses sub-threshold
|
|
61
|
+
brightness levels to DMX zero. <DMX_min_output>=1 (default) prevents the
|
|
62
|
+
fixture appearing off when the HA slider is visibly above 0%. Lighting
|
|
63
|
+
designers wanting pure gamma response can set <DMX_min_output>=0 and tune
|
|
64
|
+
the GAMMA constant (2.2 = sRGB standard, 2.5–2.8 suits most LED fixtures).
|
|
65
|
+
Note: 5% on the HA slider is genuinely sub-threshold at GAMMA=2.2 — this
|
|
66
|
+
is mathematically correct, not a bug.
|
|
67
|
+
- [ ] README — version history
|
|
68
|
+
- [ ] README — wiring diagram (how subflow connects to SYSTEM node, MQTT in/out, etc.)
|
|
69
|
+
- [ ] Submit to Node-RED flows library (flows.nodered.org)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## DMX GROUP NODE (v0.3.8)
|
|
74
|
+
|
|
75
|
+
### World Testing
|
|
76
|
+
- [ ] Wire into test environment — single-level (Group Node → DMX Node × N)
|
|
77
|
+
- [ ] Test recursive group — Group Node → Group Node → DMX Node
|
|
78
|
+
- [ ] Test Bedroom 1 real-world hierarchy (mixed color modes across children)
|
|
79
|
+
- [ ] Verify `dmx_trace` path and depth are correct at each hop
|
|
80
|
+
- [ ] Trigger loop guard — circular wiring, confirm `node.warn` + red status + hard stop
|
|
81
|
+
- [ ] Confirm group effects forward simultaneously and children stay in sync
|
|
82
|
+
- [ ] Stress test — rapid commands from HA dashboard across 3+ group levels
|
|
83
|
+
- [ ] Confirm recovery state on reboot for all color modes
|
|
84
|
+
- [ ] Verify disk-save timer resets correctly on rapid commands
|
|
85
|
+
- [ ] Confirm `<DMX_Effects_Group_Controlled>=true` blocks direct HA effects correctly
|
|
86
|
+
- [ ] Confirm `<DMX_Effects_Group_Controlled>=false` allows direct HA effects correctly
|
|
87
|
+
|
|
88
|
+
### Post Testing — Release & Documentation
|
|
89
|
+
- [x] Package as a proper Node-RED node alongside DMX Node
|
|
90
|
+
- [x] Shared utility decision: INLINE for v1 — extract to shared module in v2 post-stability
|
|
91
|
+
- [ ] Git repository alongside DMX Node (_dev / beta / main)
|
|
92
|
+
- [ ] README — Group Node overview and role in HA → NR → DMX chain
|
|
93
|
+
- [ ] README — topology diagram (Parent Group → Sub Group → DMX Node)
|
|
94
|
+
- [ ] README — `dmx_trace` explained (source, path, depth, loop detection)
|
|
95
|
+
- [ ] README — env variable reference for Group Node
|
|
96
|
+
- [ ] README — wiring guide (5 outputs, AUX input, recursive topology)
|
|
97
|
+
- [ ] README — effects guide (synced group effects vs individual fixture effects)
|
|
98
|
+
- [ ] README — state aggregation explained (last sent wins, no upward propagation)
|
|
99
|
+
- [ ] README — troubleshooting (loop guard, unknown message warn, G-prefix context keys)
|
|
100
|
+
- [ ] Add Group Node env vars to `dmx_node_env_reference.md`
|
|
101
|
+
|
|
102
|
+
### Group Node — Future Design
|
|
103
|
+
- [ ] AUX input contract finalised — confirm `dmx_trace` payload structure is stable
|
|
104
|
+
- [ ] State aggregation — confirm "last sent wins" holds in real-world automation scenarios
|
|
105
|
+
- [ ] Consider HA automation helper for edge case (e.g. wall button turns on single child — should parent reflect this?)
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## DMX GROUP NODE — Future: Group of Groups
|
|
110
|
+
- [ ] Bedroom 1 style hierarchy tested end to end (5 sub-groups, mixed color modes)
|
|
111
|
+
- [ ] Ceiling style hierarchy tested (3 sub-groups, same color mode)
|
|
112
|
+
- [ ] Confirm `dmx_trace.depth` increments correctly through 3+ levels
|
|
113
|
+
- [ ] Confirm loop guard fires correctly at configured depth limit
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## BUTTON NODE (v5.0.3)
|
|
118
|
+
> Pure MQTT — no websocket dependency. Dual HA entity discovery:
|
|
119
|
+
> binary_sensor (automation trigger) + button (UI dashboard mirror).
|
|
120
|
+
> HA off_delay handles auto-clear. 4 outputs. Subflow input kept for SYSTEM node.
|
|
121
|
+
|
|
122
|
+
### World Testing
|
|
123
|
+
- [ ] Wire into test environment
|
|
124
|
+
- [ ] Test device add — binary_sensor and UI button both appear in HA device registry
|
|
125
|
+
- [ ] Test physical press — binary_sensor ON then auto-clears via off_delay
|
|
126
|
+
- [ ] Test UI button press — same result as physical press
|
|
127
|
+
- [ ] Test device remove — both entities removed from HA
|
|
128
|
+
- [ ] Test sibling payloads silently ignored (no false triggers)
|
|
129
|
+
- [ ] Test with old firmware (flat "buttons" topic) via translation layer
|
|
130
|
+
- [ ] Test with new firmware (structured topic) once firmware updated
|
|
131
|
+
- [ ] Validate serial_number clean and unique across all test buttons
|
|
132
|
+
- [ ] Migrate existing HA automations from button.press to binary_sensor ON triggers
|
|
133
|
+
|
|
134
|
+
### Post Testing — Release & Documentation
|
|
135
|
+
- [x] Package as proper Node-RED node
|
|
136
|
+
- [ ] README — overview, dual entity design, why no websocket dependency
|
|
137
|
+
- [ ] README — payload format "{panelId}-{GPIOpin}" explained
|
|
138
|
+
- [ ] README — button position conventions (A/B/C/D for 1/2/3/4 gang plates)
|
|
139
|
+
- [ ] README — translation layer guide for old firmware rollout
|
|
140
|
+
- [ ] README — env variable reference
|
|
141
|
+
- [ ] README — troubleshooting
|
|
142
|
+
- [ ] Add Button Node env vars to master env reference document
|
|
143
|
+
|
|
144
|
+
### Env Vars — Changes from v4.x
|
|
145
|
+
- Renamed: `<HA_BUTTON_icon>` → `<HA_icon>`
|
|
146
|
+
- Renamed: `<DEVICE_area_case>` → `<DEVICE_situation>`
|
|
147
|
+
- Added: `<BUTTON_hold_time_seconds>` (float, default 0.5)
|
|
148
|
+
- Kept: `<BUTTON_Type>` (default "Wall" — retained for future flexibility)
|
|
149
|
+
- Kept: `<CONTROLLER_Model>` (used in hw_version device info)
|
|
150
|
+
- Deleted: `<HA_Payload>`, `<HA_device_class>`, `<HA_entity_category>`, `<HA_schema>`
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## BINARY SENSOR NODE / PIR SENSOR NODE (v1.0.3)
|
|
155
|
+
> Pure MQTT binary_sensor with device_class: motion.
|
|
156
|
+
> HA off_delay handles auto-clear. Configurable warm-up delay on boot.
|
|
157
|
+
> Time-based NR debounce reduces MQTT traffic. 4 outputs. Subflow input kept.
|
|
158
|
+
|
|
159
|
+
### World Testing
|
|
160
|
+
- [ ] Wire into test environment
|
|
161
|
+
- [ ] Test device add — PIR appears "offline" then "online" after warmup delay
|
|
162
|
+
- [ ] Test PIR trigger — binary_sensor ON then auto-clears via off_delay
|
|
163
|
+
- [ ] Test debounce — rapid triggers during hold period don't re-publish to HA
|
|
164
|
+
- [ ] Test device:avty "online"/"offline" from SYSTEM node and admin panel
|
|
165
|
+
- [ ] Test device remove — entity removed, availability goes offline
|
|
166
|
+
- [ ] Test reboot scenario — PIR stays offline during warm-up, no mass light injection
|
|
167
|
+
- [ ] Test with old firmware ("MW3D/Master/PIR_Sensors") via translation layer
|
|
168
|
+
- [ ] Test with new firmware ("MW3D/Master/13/pir") once firmware updated
|
|
169
|
+
- [ ] Validate serial_number clean and unique across test sensors
|
|
170
|
+
- [ ] Confirm sibling PIR payloads silently ignored
|
|
171
|
+
|
|
172
|
+
### Post Testing — Release & Documentation
|
|
173
|
+
- [ ] Package as proper Node-RED node
|
|
174
|
+
- [ ] README — overview, availability topic rationale (the 3am story)
|
|
175
|
+
- [ ] README — payload format explained
|
|
176
|
+
- [ ] README — warm-up sequence and why it exists
|
|
177
|
+
- [ ] README — env variable reference
|
|
178
|
+
- [ ] README — translation layer guide for old firmware rollout
|
|
179
|
+
- [ ] README — troubleshooting (PIR stuck offline, false triggers)
|
|
180
|
+
- [ ] Add PIR Node env vars to master env reference document
|
|
181
|
+
- [ ] Consider heartbeat mechanism to replace daily sun-event "add" inject
|
|
182
|
+
|
|
183
|
+
### Env Vars — Changes from v0.1.x
|
|
184
|
+
- Renamed: `<HA_PIR_icon>` → `<HA_icon>`
|
|
185
|
+
- Renamed: `<DEVICE_area_case>` → `<DEVICE_situation>`
|
|
186
|
+
- Added: `<PIR_hold_time_seconds>` (num, default 15)
|
|
187
|
+
- Added: `<PIR_warmup_seconds>` (num, default 120)
|
|
188
|
+
- Kept: `<PIR_Cable_Color>` (now used in hw_version device info — "Purple Cat5 cable")
|
|
189
|
+
- Deleted: `<PIR_Friendly_Name>`, `<PIR_Friendly_Sensor>`, `<HA_Payload>`, `<CONTROLLER_Model>`, `<HA_device_class>`, `<HA_schema>`
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 230V RELAY NODE (v4.0.0)
|
|
194
|
+
> **Important:** The 230V Relay Node has NO relationship to DMX whatsoever.
|
|
195
|
+
> It is a completely separate control path, separate protocol, separate hardware.
|
|
196
|
+
> Do not reference DMX in this node's code, comments, or documentation.
|
|
197
|
+
> See "DMX Power Devices" section below for the DMX side of 230V control.
|
|
198
|
+
|
|
199
|
+
### World Testing
|
|
200
|
+
- [ ] Wire into test environment
|
|
201
|
+
- [ ] Test device add — discovery payload, MQTT subscribe, recovery state
|
|
202
|
+
- [ ] Test ON/OFF from HA — confirm relay payload is integer 1/0 not string
|
|
203
|
+
- [ ] Test flash_short and flash_long — confirm relay fires then restores
|
|
204
|
+
- [ ] Test strobe — confirm 500ms minimum interval respected
|
|
205
|
+
- [ ] Test device remove — unsubscribe, memory cleared, status red
|
|
206
|
+
- [ ] Test AUX input from DMX Group Node
|
|
207
|
+
- [ ] Test recovery state on reboot — physical relay re-asserted to match HA
|
|
208
|
+
- [ ] Validate serial_number is clean and unique across test fixtures
|
|
209
|
+
- [ ] Test with mechanical relay — confirm strobe safe at 500ms
|
|
210
|
+
- [ ] Test with SSR — confirm strobe acceptable at 500ms
|
|
211
|
+
|
|
212
|
+
### Post Testing — Release & Documentation
|
|
213
|
+
- [ ] Package as proper Node-RED node alongside DMX Node and Group Node
|
|
214
|
+
- [ ] Git repository alongside other nodes
|
|
215
|
+
- [ ] README — overview and what this node is NOT (not DMX)
|
|
216
|
+
- [ ] README — relay MQTT topic format and integer payload convention
|
|
217
|
+
- [ ] README — env variable reference
|
|
218
|
+
- [ ] README — wiring guide (4 HA outputs + 1 relay controller output)
|
|
219
|
+
- [ ] README — effects guide + mechanical relay vs SSR note for strobe
|
|
220
|
+
- [ ] README — troubleshooting
|
|
221
|
+
- [ ] Add 230V Relay Node env vars to master env reference document
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## DMX POWER DEVICES (Future Discussion)
|
|
226
|
+
> **Clarification:** DMX Power Devices are controlled via the standard **DMX Node**,
|
|
227
|
+
> not the 230V Relay Node. They are DMX-decodable hardware that happen to switch
|
|
228
|
+
> or dim 230V circuits. The DMX Node sends DMX payloads over MQTT as normal —
|
|
229
|
+
> the hardware on the other end handles the 230V switching internally.
|
|
230
|
+
> The 230V Relay Node is an entirely separate, non-DMX control path.
|
|
231
|
+
|
|
232
|
+
- [ ] DMX 230V Dimmer — use DMX Node with `brightness` color mode
|
|
233
|
+
Examples: theatre profile lights, fresnels, tungsten fixtures on a DMX dimmer rack
|
|
234
|
+
- [ ] DMX 230V Relay — use DMX Node with `onoff` color mode
|
|
235
|
+
Examples: fans, socket outlets, remote power switching via DMX relay card
|
|
236
|
+
- [ ] Prefix convention (shared across ALL node types — end user sees device intent, not implementation):
|
|
237
|
+
`L` = Light (DMX Node, 230V Relay Node in lighting role)
|
|
238
|
+
`P` = Power (DMX Node in power role, 230V Relay Node in power role)
|
|
239
|
+
`LG` = Light Group (DMX Group Node)
|
|
240
|
+
`PG` = Power Group (DMX Group Node in power role)
|
|
241
|
+
The end user sees L/P/LG/PG — they don't need to know whether it's
|
|
242
|
+
DMX, relay, or any other underlying technology. Keeps HA dashboard,
|
|
243
|
+
cable labels, Master Fixture Control Document, and Electrical Plans
|
|
244
|
+
clean and consistent. L and P fixtures are on separate plan pages
|
|
245
|
+
to keep IDs short and unambiguous.
|
|
246
|
+
- [ ] Confirm DMX Node handles power devices correctly as-is (color mode selection sufficient)
|
|
247
|
+
- [ ] Document use case in README under "Power Devices" — clearly separate from 230V Relay Node
|
|
248
|
+
- [ ] Add note: a DMX Power Device group uses DMX Group Node with `onoff` or `brightness`,
|
|
249
|
+
prefixed `PG` — same pattern as lighting groups
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Shared Utility Module (Future — Node Package Build)
|
|
254
|
+
- [ ] Extract shared helpers from DMX Node and Group Node:
|
|
255
|
+
- `recall(ramKey, diskKey, fallback)`
|
|
256
|
+
- `rememberRam(values)`
|
|
257
|
+
- `rememberDisk(values)`
|
|
258
|
+
- `startDiskSaveTimer(onComplete)`
|
|
259
|
+
- `sendStatus(fill, shape, text)`
|
|
260
|
+
- `hsvToRgb(h, s, v)`
|
|
261
|
+
- [ ] Decide module format (CommonJS vs ES module) based on NR node package requirements
|
|
262
|
+
- [ ] Write unit tests for shared helpers
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## Git Repository (Future)
|
|
267
|
+
- [ ] Repository name TBD
|
|
268
|
+
- [ ] Branch structure: `main` / `beta` / `_dev`
|
|
269
|
+
- [ ] Nodes as separate packages or monorepo — TBD
|
|
270
|
+
- [ ] Contribution guidelines
|
|
271
|
+
- [ ] Issue templates (bug report, feature request)
|
|
272
|
+
- [ ] License selection
|
|
273
|
+
- [ ] Open source contribution / Node-RED flows library submission
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## DMX NODE — Pending Field Testing Decisions
|
|
278
|
+
|
|
279
|
+
### Gamma + Minimum Floor Behaviour
|
|
280
|
+
- [ ] FIELD TEST: At low combined brightness (e.g. brightness 17% + color 1%),
|
|
281
|
+
scaleToDmx() rounds to 0 before the DMX min floor guard fires.
|
|
282
|
+
Current guard checks `linear > 0` but `linear` has already been rounded to 0.
|
|
283
|
+
Fix ready: change guard to `colorValue > 0 && brightness > 0` instead.
|
|
284
|
+
Needs visual confirmation in the field — does the user WANT DMX=1 or DMX=0
|
|
285
|
+
when both sliders are above zero but the combined value is < 0.5?
|
|
286
|
+
Lighting designer answer vs UX answer may differ.
|
|
287
|
+
Code fix is one line in scaleToDmx() in dmx_node.js.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## CONTROLLER FIRMWARE (Future — Post NR/HA Completion)
|
|
292
|
+
> Do not mix firmware and UI software development — complete the NR/HA node
|
|
293
|
+
> layer first, then revisit controller firmware as a separate body of work.
|
|
294
|
+
|
|
295
|
+
### Button Controller Firmware
|
|
296
|
+
- [ ] Update topic structure: flat "buttons" → "MW3D/{zone}/{panelId}/buttons"
|
|
297
|
+
(one line change in config.h — topicString variable)
|
|
298
|
+
Deploy to one test controller first, translation layer covers the rest
|
|
299
|
+
- [ ] Investigate adding long press detection:
|
|
300
|
+
Measure time between GPIO press and release in firmware
|
|
301
|
+
If > threshold (e.g. 800ms) publish "{panelId}-{GPIOpin}-L" payload
|
|
302
|
+
NR Button Node filters "-L" suffix → separate binary_sensor entity in HA
|
|
303
|
+
- [ ] Investigate double-tap detection:
|
|
304
|
+
Count press events within a short window (~400ms) in firmware
|
|
305
|
+
If 2 presses detected publish "{panelId}-{GPIOpin}-D" payload
|
|
306
|
+
- [ ] Agree on timing thresholds for long press and double tap
|
|
307
|
+
(needs real-world tuning per installation — wall button feel varies)
|
|
308
|
+
- [ ] Update Button Node to support "-L" and "-D" payload suffixes if firmware updated
|
|
309
|
+
- [ ] Review I2C stability (shared concern with relay controller)
|
|
310
|
+
- [ ] Document controller firmware versions
|
|
311
|
+
|
|
312
|
+
### PIR Controller Firmware
|
|
313
|
+
- [ ] Update topic structure: "MW3D/Master/PIR_Sensors" → "MW3D/{zone}/{panelId}/pir"
|
|
314
|
+
(one line change in config.h — motionTopic variable, note: needs String not const char*)
|
|
315
|
+
Deploy to one test controller first, translation layer covers the rest
|
|
316
|
+
- [ ] Review startup delay behaviour — firmware already ignores first trigger on boot,
|
|
317
|
+
confirm this still works correctly with new topic structure
|
|
318
|
+
- [ ] Confirm 48 GPIO pins (not 64 as previously assumed — Mega has 54 digital pins)
|
|
319
|
+
- [ ] Document OLED display usage and any planned improvements
|
|
320
|
+
|
|
321
|
+
### 230V Relay Controller Firmware
|
|
322
|
+
- [ ] Review I2C stability improvements
|
|
323
|
+
(rapid relay switching caused lockup — 1pF cap on reset pin was the fix,
|
|
324
|
+
firmware hardening still worth exploring to prevent recurrence)
|
|
325
|
+
- [ ] Review DMX controller firmware version compatibility with new node payloads
|
|
326
|
+
- [ ] Document controller firmware versions alongside NR node versions
|
|
327
|
+
- [ ] Consider firmware OTA update process documentation
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Session 4 — World Testing Complete
|
|
332
|
+
|
|
333
|
+
### Bugs fixed this session
|
|
334
|
+
- [x] msg.device string vs object — all nodes handle both formats
|
|
335
|
+
- [x] Zone env var mismatch fixed across DMX Node and Group Node
|
|
336
|
+
- [x] device.identifiers now includes postfix — L-992-A and L-992-B are separate HA devices
|
|
337
|
+
- [x] Serial number and device name missing postfix — fixed all nodes
|
|
338
|
+
- [x] Button/PIR MQTT In datatype json → auto-detect (plain string payloads)
|
|
339
|
+
- [x] Button/PIR postfix options now include dash (-A, -B) matching DMX convention
|
|
340
|
+
- [x] GROUP_name now used as HA entity friendly name
|
|
341
|
+
- [x] DMX Group Node forwards device:add/remove via AUX to child DMX Nodes
|
|
342
|
+
- [x] transitionsEnabled missing from CFG — fixed
|
|
343
|
+
- [x] defaultOn values undefined — added fallbacks (full brightness)
|
|
344
|
+
- [x] buildDmxPayload null guard — skips undefined channels
|
|
345
|
+
- [x] Status node — replaced tostatus debug with proper status node in all subflows
|
|
346
|
+
- [x] Subflow layout restored from canonical uploaded files
|
|
347
|
+
- [x] NR 4.1.6 — definition + instance cannot import in same JSON (documented)
|
|
348
|
+
|
|
349
|
+
### Confirmed working
|
|
350
|
+
- [x] DMX Group Node → AUX → DMX Node fan-out (colour palette syncs all children)
|
|
351
|
+
- [x] DMX Node direct (no group parent)
|
|
352
|
+
- [x] Button physical press simulation via inject
|
|
353
|
+
- [x] Button UI press via HA dashboard
|
|
354
|
+
- [x] Button hold time (off_delay)
|
|
355
|
+
- [x] PIR trigger simulation via inject
|
|
356
|
+
- [x] Relay ON/OFF and state recovery
|
|
357
|
+
|
|
358
|
+
### Pending field testing
|
|
359
|
+
- [ ] Gamma floor at low combined brightness (fix ready, needs visual confirmation)
|
|
360
|
+
- [ ] Button with real hardware controller
|
|
361
|
+
- [ ] PIR with real hardware controller
|
|
362
|
+
- [ ] Full multi-fixture deployment stress test
|
|
363
|
+
- [ ] Firmware topic structure updates (one line each in config.h)
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## Node Packaging — node-red-contrib-dmx-for-ha
|
|
368
|
+
|
|
369
|
+
### Completed
|
|
370
|
+
- [x] Package name: `node-red-contrib-dmx-for-ha`
|
|
371
|
+
- [x] Palette category: `DMX for HA`
|
|
372
|
+
- [x] Display names: DMX, DMX Group, Relay, Button, PIR
|
|
373
|
+
- [x] Internal types: ha-mqtt-dmx, ha-mqtt-dmx-group, ha-mqtt-relay, ha-mqtt-button, ha-mqtt-pir
|
|
374
|
+
- [x] Config node: `ha-mqtt-config` — one per zone, holds broker + site-wide settings
|
|
375
|
+
- [x] Cascade output label: `Link` (DMX Group only)
|
|
376
|
+
- [x] Zero outputs on DMX, Relay, Button, PIR
|
|
377
|
+
- [x] MQTT handled internally — no external MQTT In/Out nodes needed
|
|
378
|
+
- [x] Shared utility: inline for v1
|
|
379
|
+
- [x] All passthrough references removed from code
|
|
380
|
+
- [x] Areas and sub-areas lists finalised (38 areas, 21 sub-areas)
|
|
381
|
+
- [x] ha-mqtt-config.html + .js written
|
|
382
|
+
- [x] ha-mqtt-dmx.html + .js written
|
|
383
|
+
- [x] ha-mqtt-dmx-group.html + .js written
|
|
384
|
+
- [x] ha-mqtt-relay.html + .js written
|
|
385
|
+
- [x] ha-mqtt-button.html + .js written
|
|
386
|
+
- [x] ha-mqtt-pir.html + .js written
|
|
387
|
+
- [x] package.json written
|
|
388
|
+
- [x] Package folder structure created: node-red-contrib-dmx-for-ha/nodes/
|
|
389
|
+
- [x] Logic review — 2 real bugs fixed:
|
|
390
|
+
- groupSync was blocking ALL group commands (should only block effect sync)
|
|
391
|
+
- DMX Group was forwarding device:add via Link (children get it from SYSTEM node)
|
|
392
|
+
|
|
393
|
+
### Pending — Before First Install Test
|
|
394
|
+
- [ ] settings.js — document disk context store requirement:
|
|
395
|
+
contextStorage: { default: {module:"memory"}, disk: {module:"localfilesystem"} }
|
|
396
|
+
- [ ] README.md — package overview, setup guide, SYSTEM node wiring diagram
|
|
397
|
+
- [ ] Test local install: npm install /path/to/node-red-contrib-dmx-for-ha
|
|
398
|
+
- [ ] Verify nodes appear in NR palette under "DMX for HA"
|
|
399
|
+
- [ ] Verify config node picker works on each node
|
|
400
|
+
- [ ] Verify ha-mqtt-dmx discovery reaches HA
|
|
401
|
+
- [ ] Verify ha-mqtt-dmx-group Link output fans out correctly
|
|
402
|
+
- [ ] Verify ha-mqtt-relay publishes integer to relay controller topic
|
|
403
|
+
- [ ] Verify ha-mqtt-button dual entity (binary_sensor + button) in HA
|
|
404
|
+
- [ ] Verify ha-mqtt-pir warm-up sequence and availability topic
|
|
405
|
+
|
|
406
|
+
### Pending — Before Publishing
|
|
407
|
+
- [ ] Git repository setup (node-red-contrib-dmx-for-ha)
|
|
408
|
+
- [ ] Branch structure: main / beta / _dev
|
|
409
|
+
- [ ] README.md — complete
|
|
410
|
+
- [ ] CHANGELOG.md
|
|
411
|
+
- [ ] LICENSE file (Apache-2.0)
|
|
412
|
+
- [ ] npm publish (or flows.nodered.org submission)
|
|
413
|
+
- [ ] Version bump to 1.0.0 for first public release
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## General / Cross-Node
|
|
418
|
+
- [ ] Decide on consistent output label naming convention before node packaging
|
|
419
|
+
- [ ] Rename "AUX output" on DMX Group Node and Relay Node to a clearer end-user label
|
|
420
|
+
(discussion deferred — agreed "AUX" is somewhat obscure but no replacement agreed yet)
|
|
421
|
+
- [ ] Review all `node.warn` messages for consistency and helpfulness
|
|
422
|
+
- [ ] Audit all env variable names across nodes for naming consistency
|
|
423
|
+
- [ ] Master env variable reference document — expand `dmx_node_env_reference.md` to cover all nodes
|
|
424
|
+
- [ ] Add Button Node, PIR Node, and Relay Node env vars to `dmx_node_env_reference.md`
|
|
425
|
+
- [ ] "Hit by a bus" documentation — HOW-TO 101 / onboarding guide for new developers
|
|
426
|
+
- [ ] SYSTEM node review — startup injection timing, daily sun-event add, heartbeat consideration
|
|
427
|
+
Current timing: T+15s first add, T+25s first ON, T+75s second add, T+85s second ON, T+120s PIR online
|
|
428
|
+
Consider replacing daily sun-event inject with HA-side heartbeat + NR timeout node
|