node-red-contrib-dmx-for-ha 0.6.1 → 0.6.3

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.
@@ -212,12 +212,12 @@
212
212
  </div>
213
213
  <div class="form-row">
214
214
  <label for="node-config-input-dmxFloor">
215
- <i class="fa fa-arrow-down"></i> DMX Floor
215
+ <i class="fa fa-arrow-up"></i> DMX Floor
216
216
  </label>
217
217
  <input type="number" id="node-config-input-dmxFloor"
218
- min="0" max="20" step="1" style="width:70px" />
218
+ min="0" max="50" step="1" style="width:70px" />
219
219
  <span style="margin-left:8px; color:#999; font-size:0.85em;">
220
- Min DMX value sent below this snaps up (0=OFF always OFF). Default: 3
220
+ Minimum DMX value sent when light is ON. Values below floor snap up to floor. 0 = disabled. Default: 3
221
221
  </span>
222
222
  </div>
223
223
  </script>
@@ -169,7 +169,6 @@
169
169
  defaultState: { value: 'OFF' },
170
170
  // Advanced
171
171
  dmxLimiter: { value: '255' },
172
- minOutput: { value: '1' },
173
172
  brightBump: { value: '50' },
174
173
  ticksPerSec: { value: '31' },
175
174
  debugMode: { value: false },
@@ -543,16 +542,6 @@
543
542
  min="0" max="255" style="width:70px" />
544
543
  <span style="margin-left:8px; color:#999; font-size:0.85em;">Caps all DMX channel values (0–255)</span>
545
544
  </div>
546
-
547
- <div class="form-row">
548
- <label for="node-input-minOutput">
549
- <i class="fa fa-sort-numeric-asc"></i> Min output when ON
550
- </label>
551
- <input type="number" id="node-input-minOutput"
552
- min="0" max="255" style="width:70px" />
553
- <span style="margin-left:8px; color:#999; font-size:0.85em;">0 = pure gamma</span>
554
- </div>
555
-
556
545
  <div class="form-row">
557
546
  <label for="node-input-brightBump">
558
547
  <i class="fa fa-sort-numeric-asc"></i> Brightness bump
@@ -132,7 +132,7 @@ module.exports = function (RED) {
132
132
  groupSync: config.groupSync === true,
133
133
  defaultState: config.defaultState || 'OFF',
134
134
  dmxLimiter: parseInt(config.dmxLimiter) || 255,
135
- minOutput: parseInt(config.minOutput) || 1,
135
+ // minOutput removed v0.6.2 — use dmxFloor instead
136
136
  brightBump: parseInt(config.brightBump) || 50,
137
137
  ticksPerSec: parseInt(config.ticksPerSec) || 31,
138
138
  debugMode: config.debugMode === true,
@@ -205,13 +205,11 @@ module.exports = function (RED) {
205
205
  brightness = brightness !== undefined ? brightness : 255;
206
206
  const limited = Math.round((colorValue / 255) * (brightness / 255) * S.dmxLimiter);
207
207
  const gamma = GAMMA_TABLE[Math.max(0, Math.min(255, limited))];
208
- // Min output floor — only apply when both inputs are non-zero (intentionally on)
209
- if (gamma === 0 && colorValue > 0 && brightness > 0 && S.minOutput > 0) {
210
- return S.minOutput;
211
- }
212
- // DMX floor snap up if above 0 but below hardware stable threshold
213
- if (gamma > 0 && gamma < S.dmxFloor) return S.dmxFloor;
214
- // Note: ceiling is handled by S.dmxLimiter in scaleToDmx above
208
+ // DMX floor — if source is ON but output is below floor, snap up
209
+ // Prevents flickering at low DMX values that decoders can't handle cleanly
210
+ // Both colorValue AND brightness must be > 0 (light intentionally on)
211
+ // Exception: brightness = 0 means light is OFF — always allow 0
212
+ if (colorValue > 0 && brightness > 0 && gamma < S.dmxFloor) return S.dmxFloor;
215
213
  return gamma;
216
214
  }
217
215
 
@@ -397,7 +395,11 @@ module.exports = function (RED) {
397
395
  const progress = Math.min(1, tick / totalTicks);
398
396
  const channels = fromChannels.map(function ([ch, from], i) {
399
397
  const to = toChannels[i] ? toChannels[i][1] : 0;
400
- return [ch, Math.round(from + (to - from) * progress)];
398
+ const raw = Math.round(from + (to - from) * progress);
399
+ // Apply floor during transition — never send flicker values
400
+ // Exception: if target is 0, allow 0 (light intentionally off)
401
+ const floored = (raw > 0 && raw < S.dmxFloor) ? S.dmxFloor : raw;
402
+ return [ch, floored];
401
403
  });
402
404
  sendDmxChannels(channels);
403
405
  if (tick >= totalTicks) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-dmx-for-ha",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "DMX lighting control for Home Assistant via Node-RED and MQTT. Place a node, fill in the settings, deploy. Full HA device registry integration with RGBW/RGBWW/CCT/brightness colour modes, transitions, effects, and group control.",
5
5
  "keywords": [
6
6
  "node-red",