node-red-contrib-knx-ultimate 4.1.32 → 4.1.33

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/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
+ **Version 4.1.33** - March 2026<br/>
10
+
11
+ - FIX: **KNX Hue Light** grouped light handling: when a `grouped_light` is OFF, writes for dimming, color temperature, color/xy and related dynamic updates are now fanned out to the member `light` resources when needed, instead of relying only on the grouped resource.<br/>
12
+ - CHANGE: **KNX Hue Light** advanced option **Update local cached Hue state from KNX bus writes** is now enabled by default for new nodes.<br/>
13
+ - UI/help/wiki/docs: clarified the tradeoff of the local Hue cache synchronization option in the editor, node help and documentation pages across supported languages.<br/>
14
+
9
15
  **Version 4.1.32** - March 2026<br/>
10
16
 
11
17
  - KNX Engine bumped to 5.2.11.<br/>
@@ -130,7 +130,7 @@
130
130
  hueDeviceObject: { value: {} },
131
131
 
132
132
  restoreDayMode: { value: "no" }, // Starting from v 4.1.31
133
- updateLocalStateFromKNXWrite: { value: false } // Starting from v 4.1.31
133
+ updateLocalStateFromKNXWrite: { value: true } // Starting from v 4.1.31
134
134
  },
135
135
  inputs: 0,
136
136
  outputs: 0,
@@ -1263,9 +1263,9 @@
1263
1263
  }
1264
1264
  // Check temperature (if the light supports temperature, it support dimming as well)
1265
1265
  if (oLight.color_temperature !== undefined) {
1266
- $("#tabs").tabs("enable", "#tabs-3");
1267
- //$("#tabs").tabs("enable", "#tabs-2");
1268
- $("#node-input-specifySwitchOnBrightness").append(
1266
+ $("#tabs").tabs("enable", "#tabs-3");
1267
+ //$("#tabs").tabs("enable", "#tabs-2");
1268
+ $("#node-input-specifySwitchOnBrightness").append(
1269
1269
  $("<option>")
1270
1270
  .val("temperature")
1271
1271
  .text(node._("knxUltimateHueLight.select_temperature_brightness"))
@@ -2265,6 +2265,7 @@
2265
2265
  </label>
2266
2266
  <input type="checkbox" id="node-input-updateLocalStateFromKNXWrite" style="display:inline-block; width:auto; vertical-align:top;" />
2267
2267
  </div>
2268
+ <div class="form-tips" style="margin-left:260px;" data-i18n="knxUltimateHueLight.update_local_state_from_knx_write_hint"></div><br/>
2268
2269
  <div id ="divBehaviourBrightness">
2269
2270
  <div class="form-row">
2270
2271
  <label for="node-input-specifySwitchOnBrightness" style="width:260px;">
@@ -2365,4 +2366,4 @@
2365
2366
  </div>
2366
2367
  </div>
2367
2368
  </div>
2368
- <br />
2369
+ <br />
@@ -156,6 +156,81 @@ module.exports = function (RED) {
156
156
  } catch (error) { }
157
157
  };
158
158
 
159
+ node.writeHueState = function writeHueState(_state) {
160
+ const defaultOperation = node.isGrouped_light === false ? "setLight" : "setGroupedLight";
161
+ const isGroupedLightOff = node.isGrouped_light === true && node.currentHUEDevice?.on?.on === false;
162
+ const stateKeys = _state && typeof _state === "object" ? Object.keys(_state) : [];
163
+ const actionableKeys = ["dimming", "color", "color_temperature", "gradient"];
164
+ const hasActionablePayload = stateKeys.some((key) => actionableKeys.includes(key));
165
+
166
+ if (!isGroupedLightOff || !hasActionablePayload) {
167
+ node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, _state, defaultOperation);
168
+ return;
169
+ }
170
+
171
+ (async () => {
172
+ try {
173
+ const groupLights = await node.serverHue.getAllLightsBelongingToTheGroup(node.hueDevice, false);
174
+ let hasWrittenAtLeastOneLight = false;
175
+ for (let index = 0; index < groupLights.length; index++) {
176
+ const light = groupLights[index];
177
+ if (!light?.id) continue;
178
+ const lightState = {};
179
+ let hasActionableStateForLight = false;
180
+
181
+ if (_state.on !== undefined) lightState.on = cloneDeep(_state.on);
182
+ if (_state.dynamics !== undefined) lightState.dynamics = cloneDeep(_state.dynamics);
183
+
184
+ if (_state.dimming !== undefined && light.dimming !== undefined) {
185
+ lightState.dimming = cloneDeep(_state.dimming);
186
+ hasActionableStateForLight = true;
187
+ }
188
+ if (_state.color !== undefined && light.color !== undefined) {
189
+ lightState.color = cloneDeep(_state.color);
190
+ hasActionableStateForLight = true;
191
+ }
192
+ if (_state.color_temperature !== undefined && light.color_temperature !== undefined) {
193
+ lightState.color_temperature = cloneDeep(_state.color_temperature);
194
+ hasActionableStateForLight = true;
195
+ }
196
+ if (_state.gradient !== undefined && light.gradient !== undefined) {
197
+ lightState.gradient = cloneDeep(_state.gradient);
198
+ hasActionableStateForLight = true;
199
+ }
200
+
201
+ if (!hasActionableStateForLight) continue;
202
+ node.serverHue.hueManager.writeHueQueueAdd(light.id, lightState, "setLight");
203
+ hasWrittenAtLeastOneLight = true;
204
+ }
205
+
206
+ if (!hasWrittenAtLeastOneLight) {
207
+ node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, _state, defaultOperation);
208
+ }
209
+ } catch (error) {
210
+ RED.log.debug(`knxUltimateHueLight: node.writeHueState fallback to grouped_light write: ${error.message}`);
211
+ node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, _state, defaultOperation);
212
+ }
213
+ })();
214
+ };
215
+
216
+ node.deleteHueStateQueue = function deleteHueStateQueue() {
217
+ node.serverHue.hueManager.deleteHueQueue(node.hueDevice);
218
+ if (node.isGrouped_light !== true) return;
219
+
220
+ (async () => {
221
+ try {
222
+ const groupLights = await node.serverHue.getAllLightsBelongingToTheGroup(node.hueDevice, false);
223
+ for (let index = 0; index < groupLights.length; index++) {
224
+ const light = groupLights[index];
225
+ if (!light?.id) continue;
226
+ node.serverHue.hueManager.deleteHueQueue(light.id);
227
+ }
228
+ } catch (error) {
229
+ RED.log.debug(`knxUltimateHueLight: node.deleteHueStateQueue: ${error.message}`);
230
+ }
231
+ })();
232
+ };
233
+
159
234
  function getRandomIntInclusive(min, max) {
160
235
  min = Math.ceil(min);
161
236
  max = Math.floor(max);
@@ -225,7 +300,7 @@ module.exports = function (RED) {
225
300
  // The DayNight has switched into day, so restore the previous light status
226
301
  state = { on: { on: true }, dimming: node.HUEDeviceWhileDaytime.dimming, color: node.HUEDeviceWhileDaytime.color, color_temperature: node.HUEDeviceWhileDaytime.color_temperature };
227
302
  if (node.HUEDeviceWhileDaytime.color_temperature !== undefined && node.HUEDeviceWhileDaytime.color_temperature.mirek === null) delete state.color_temperature; // Otherwise the lamp will not turn on due to an error. color_temperature.mirek: color temperature in mirek is null when the light color is not in the ct spectrum
228
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
303
+ node.writeHueState(state);
229
304
  node.setNodeStatusHue({
230
305
  fill: "green",
231
306
  shape: "dot",
@@ -330,7 +405,7 @@ module.exports = function (RED) {
330
405
  }
331
406
 
332
407
  node.syncCurrentHUEDeviceFromKNXState(state); // Starting from v 4.1.31
333
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
408
+ node.writeHueState(state);
334
409
  node.setNodeStatusHue({
335
410
  fill: "green",
336
411
  shape: "dot",
@@ -382,7 +457,7 @@ module.exports = function (RED) {
382
457
  }
383
458
  state = { color_temperature: { mirek: retMirek } };
384
459
  node.syncCurrentHUEDeviceFromKNXState(state); // Starting from v 4.1.31
385
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
460
+ node.writeHueState(state);
386
461
  node.setNodeStatusHue({
387
462
  fill: "green",
388
463
  shape: "dot",
@@ -439,7 +514,7 @@ module.exports = function (RED) {
439
514
  msg.payload = retMirek;
440
515
  state = { color_temperature: { mirek: msg.payload } };
441
516
  node.syncCurrentHUEDeviceFromKNXState(state); // Starting from v 4.1.31
442
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
517
+ node.writeHueState(state);
443
518
  node.setNodeStatusHue({
444
519
  fill: "green",
445
520
  shape: "dot",
@@ -460,7 +535,7 @@ module.exports = function (RED) {
460
535
  if (node.currentHUEDevice.on.on === true && msg.payload === 0) state.on = { on: false };
461
536
  }
462
537
  node.syncCurrentHUEDeviceFromKNXState(state); // Starting from v 4.1.31
463
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
538
+ node.writeHueState(state);
464
539
  node.setNodeStatusHue({
465
540
  fill: "green",
466
541
  shape: "dot",
@@ -490,7 +565,7 @@ module.exports = function (RED) {
490
565
  if (node.currentHUEDevice.on.on === true && bright === 0) state = { on: { on: false }, dimming: { brightness: bright } };
491
566
  }
492
567
  node.syncCurrentHUEDeviceFromKNXState(state); // Starting from v 4.1.31
493
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
568
+ node.writeHueState(state);
494
569
  node.setNodeStatusHue({
495
570
  fill: "green",
496
571
  shape: "dot",
@@ -509,15 +584,11 @@ module.exports = function (RED) {
509
584
  state = msg.payload === true
510
585
  ? { on: { on: true }, dimming: { brightness: 100 }, dynamics: { duration: 0 } }
511
586
  : { on: { on: false }, dimming: { brightness: 0 }, dynamics: { duration: 0 } };
512
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
587
+ node.writeHueState(state);
513
588
  }, 1500);
514
589
  } else {
515
590
  if (node.timerBlink !== undefined) clearInterval(node.timerBlink);
516
- node.serverHue.hueManager.writeHueQueueAdd(
517
- node.hueDevice,
518
- { on: { on: false } },
519
- node.isGrouped_light === false ? "setLight" : "setGroupedLight",
520
- );
591
+ node.writeHueState({ on: { on: false } });
521
592
  }
522
593
  node.setNodeStatusHue({
523
594
  fill: "green",
@@ -531,7 +602,7 @@ module.exports = function (RED) {
531
602
  if (node.timerColorCycle !== undefined) clearInterval(node.timerColorCycle);
532
603
  const gaValColorCycle = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptLightColorCycle));
533
604
  if (gaValColorCycle === true) {
534
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, { on: { on: true } }, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
605
+ node.writeHueState({ on: { on: true } });
535
606
  node.timerColorCycle = setInterval(() => {
536
607
  try {
537
608
  const red = getRandomIntInclusive(0, 255);
@@ -548,16 +619,12 @@ module.exports = function (RED) {
548
619
  const retXY = hueColorConverter.ColorConverter.calculateXYFromRGB(red, green, blue, gamut);
549
620
  const bright = hueColorConverter.ColorConverter.getBrightnessFromRGBOrHex(red, green, blue);
550
621
  state = bright > 0 ? { on: { on: true }, dimming: { brightness: bright }, color: { xy: retXY } } : { on: { on: false } };
551
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
622
+ node.writeHueState(state);
552
623
  } catch (error) { }
553
624
  }, 10000);
554
625
  } else {
555
626
  if (node.timerColorCycle !== undefined) clearInterval(node.timerColorCycle);
556
- node.serverHue.hueManager.writeHueQueueAdd(
557
- node.hueDevice,
558
- { on: { on: false } },
559
- node.isGrouped_light === false ? "setLight" : "setGroupedLight",
560
- );
627
+ node.writeHueState({ on: { on: false } });
561
628
  }
562
629
  node.setNodeStatusHue({
563
630
  fill: "green",
@@ -680,7 +747,7 @@ module.exports = function (RED) {
680
747
  // STOP DIM
681
748
  if (node.timerStepDim !== undefined) clearInterval(node.timerStepDim);
682
749
  node.brightnessStep = null;
683
- node.serverHue.hueManager.deleteHueQueue(node.hueDevice); // Clear dimming queue.
750
+ node.deleteHueStateQueue(); // Clear dimming queue.
684
751
  return;
685
752
  }
686
753
 
@@ -729,7 +796,7 @@ module.exports = function (RED) {
729
796
  Object.assign(hueTelegram, extendedConf); // 26/03/2024 add extended conf
730
797
  }
731
798
  //console.log(hueTelegram)
732
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, hueTelegram, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
799
+ node.writeHueState(hueTelegram);
733
800
  if (node.brightnessStep >= maxDimLevelLight) clearInterval(node.timerStepDim);
734
801
  }, _dimSpeedInMillisecs);
735
802
  }
@@ -746,7 +813,7 @@ module.exports = function (RED) {
746
813
  if (node.currentHUEDevice.on !== undefined && node.currentHUEDevice.on.on === true && node.brightnessStep === 0) {
747
814
  hueTelegram.on = { on: false };
748
815
  }
749
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, hueTelegram, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
816
+ node.writeHueState(hueTelegram);
750
817
  if (node.brightnessStep <= minDimLevelLight) clearInterval(node.timerStepDim);
751
818
  }, _dimSpeedInMillisecs);
752
819
  }
@@ -766,7 +833,7 @@ module.exports = function (RED) {
766
833
  // STOP DIM
767
834
  if (node.timerStepDimTunableWhite !== undefined) clearInterval(node.timerStepDimTunableWhite);
768
835
  node.brightnessStepTunableWhite = null;
769
- node.serverHue.hueManager.deleteHueQueue(node.hueDevice); // Clear dimming queue.
836
+ node.deleteHueStateQueue(); // Clear dimming queue.
770
837
  return;
771
838
  }
772
839
 
@@ -800,7 +867,7 @@ module.exports = function (RED) {
800
867
  if (node.currentHUEDevice.on !== undefined && node.currentHUEDevice.on.on === false) {
801
868
  hueTelegram.on = { on: true };
802
869
  }
803
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, hueTelegram, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
870
+ node.writeHueState(hueTelegram);
804
871
  if (node.brightnessStepTunableWhite >= maxDimLevelLightTunableWhite) clearInterval(node.timerStepDimTunableWhite);
805
872
  }, _dimSpeedInMillisecsTunableWhite);
806
873
  }
@@ -817,7 +884,7 @@ module.exports = function (RED) {
817
884
  if (node.currentHUEDevice.on !== undefined && node.currentHUEDevice.on.on === true && node.brightnessStepTunableWhite === 0) {
818
885
  hueTelegram.on = { on: false };
819
886
  }
820
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, hueTelegram, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
887
+ node.writeHueState(hueTelegram);
821
888
  if (node.brightnessStepTunableWhite <= minDimLevelLightTunableWhite) clearInterval(node.timerStepDimTunableWhite);
822
889
  }, _dimSpeedInMillisecsTunableWhite);
823
890
  }
@@ -839,7 +906,7 @@ module.exports = function (RED) {
839
906
  if (_KNXbrightness_DirectionHSV_H === 0 && _KNXaction === 0) {
840
907
  // STOP DIM
841
908
  if (node.timerStepDimHSV_H !== undefined) clearInterval(node.timerStepDimHSV_H);
842
- node.serverHue.hueManager.deleteHueQueue(node.hueDevice); // Clear dimming queue.
909
+ node.deleteHueStateQueue(); // Clear dimming queue.
843
910
  return;
844
911
  }
845
912
 
@@ -867,7 +934,7 @@ module.exports = function (RED) {
867
934
  // DIM UP
868
935
  if (node.timerStepDimHSV_H !== undefined) clearInterval(node.timerStepDimHSV_H);
869
936
  node.timerStepDimHSV_H = setInterval(() => {
870
- node.serverHue.hueManager.deleteHueQueue(node.hueDevice); // Clear dimming queue.
937
+ node.deleteHueStateQueue(); // Clear dimming queue.
871
938
  node.brightnessStepHSV_H += numStepHSV_H;
872
939
  if (node.brightnessStepHSV_H > maxDimLevelLightHSV_H) node.brightnessStepHSV_H = maxDimLevelLightHSV_H;
873
940
  //node.updateKNXLightHSV_H_State(node.brightnessStepHSV_H); // Unnecessary, but necessary to set the KNX Status in real time.
@@ -880,7 +947,7 @@ module.exports = function (RED) {
880
947
  }
881
948
  node.currentHUEDevice.color.xy = hsvToXYBri;// Unnecessary, but necessary to set the KNX Status in real time.
882
949
  node.updateKNXLightColorState(node.currentHUEDevice.color);
883
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, hueTelegram, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
950
+ node.writeHueState(hueTelegram);
884
951
  if (node.brightnessStepHSV_H >= maxDimLevelLightHSV_H) {
885
952
  if (node.timerStepDimHSV_H !== undefined) clearInterval(node.timerStepDimHSV_H);
886
953
  }
@@ -891,7 +958,7 @@ module.exports = function (RED) {
891
958
  // DIM DOWN
892
959
  if (node.timerStepDimHSV_H !== undefined) clearInterval(node.timerStepDimHSV_H);
893
960
  node.timerStepDimHSV_H = setInterval(() => {
894
- node.serverHue.hueManager.deleteHueQueue(node.hueDevice); // Clear dimming queue.
961
+ node.deleteHueStateQueue(); // Clear dimming queue.
895
962
  node.brightnessStepHSV_H -= numStepHSV_H; // *2 to speed up the things
896
963
  if (node.brightnessStepHSV_H < minDimLevelLightHSV_H) node.brightnessStepHSV_H = minDimLevelLightHSV_H;
897
964
  //node.updateKNXLightHSV_H_State(node.brightnessStepHSV_H); // Unnecessary, but necessary to set the KNX Status in real time.
@@ -905,7 +972,7 @@ module.exports = function (RED) {
905
972
  }
906
973
  node.currentHUEDevice.color.xy = hsvToXYBri;// Unnecessary, but necessary to set the KNX Status in real time.
907
974
  node.updateKNXLightColorState(node.currentHUEDevice.color);
908
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, hueTelegram, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
975
+ node.writeHueState(hueTelegram);
909
976
  if (node.brightnessStepHSV_H <= minDimLevelLightHSV_H) {
910
977
  if (node.timerStepDimHSV_H !== undefined) clearInterval(node.timerStepDimHSV_H);
911
978
  }
@@ -927,7 +994,7 @@ module.exports = function (RED) {
927
994
  if (_KNXbrightness_DirectionHSV_S === 0 && _KNXaction === 0) {
928
995
  // STOP DIM
929
996
  if (node.timerStepDimHSV_S !== undefined) clearInterval(node.timerStepDimHSV_S);
930
- node.serverHue.hueManager.deleteHueQueue(node.hueDevice); // Clear dimming queue.
997
+ node.deleteHueStateQueue(); // Clear dimming queue.
931
998
  return;
932
999
  }
933
1000
 
@@ -954,7 +1021,7 @@ module.exports = function (RED) {
954
1021
  // DIM UP
955
1022
  if (node.timerStepDimHSV_S !== undefined) clearInterval(node.timerStepDimHSV_S);
956
1023
  node.timerStepDimHSV_S = setInterval(() => {
957
- node.serverHue.hueManager.deleteHueQueue(node.hueDevice); // Clear dimming queue.
1024
+ node.deleteHueStateQueue(); // Clear dimming queue.
958
1025
  node.brightnessStepHSV_S += numStepHSV_S;
959
1026
  if (node.brightnessStepHSV_S > maxDimLevelLightHSV_S) node.brightnessStepHSV_S = maxDimLevelLightHSV_S;
960
1027
  //node.updateKNXLightHSV_S_State(node.brightnessStepHSV_S); // Unnecessary, but necessary to set the KNX Status in real time.
@@ -967,7 +1034,7 @@ module.exports = function (RED) {
967
1034
  }
968
1035
  node.currentHUEDevice.color.xy = cloneDeep(hsvToXYBri);// Unnecessary, but necessary to set the KNX Status in real time.
969
1036
  node.updateKNXLightColorState(node.currentHUEDevice.color);
970
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, hueTelegram, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
1037
+ node.writeHueState(hueTelegram);
971
1038
  if (node.brightnessStepHSV_S >= maxDimLevelLightHSV_S) {
972
1039
  if (node.timerStepDimHSV_S !== undefined) clearInterval(node.timerStepDimHSV_S);
973
1040
  }
@@ -978,7 +1045,7 @@ module.exports = function (RED) {
978
1045
  // DIM DOWN
979
1046
  if (node.timerStepDimHSV_S !== undefined) clearInterval(node.timerStepDimHSV_S);
980
1047
  node.timerStepDimHSV_S = setInterval(() => {
981
- node.serverHue.hueManager.deleteHueQueue(node.hueDevice); // Clear dimming queue.
1048
+ node.deleteHueStateQueue(); // Clear dimming queue.
982
1049
  node.brightnessStepHSV_S -= numStepHSV_S; // *2 to speed up the things
983
1050
  if (node.brightnessStepHSV_S < minDimLevelLightHSV_S) node.brightnessStepHSV_S = minDimLevelLightHSV_S;
984
1051
  //node.updateKNXLightHSV_S_State(node.brightnessStepHSV_S); // Unnecessary, but necessary to set the KNX Status in real time.
@@ -992,7 +1059,7 @@ module.exports = function (RED) {
992
1059
  }
993
1060
  node.currentHUEDevice.color.xy = cloneDeep(hsvToXYBri);// Unnecessary, but necessary to set the KNX Status in real time.
994
1061
  node.updateKNXLightColorState(node.currentHUEDevice.color);
995
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, hueTelegram, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
1062
+ node.writeHueState(hueTelegram);
996
1063
  if (node.brightnessStepHSV_S <= minDimLevelLightHSV_S) {
997
1064
  if (node.timerStepDimHSV_S !== undefined) clearInterval(node.timerStepDimHSV_S);
998
1065
  }
@@ -1140,11 +1207,7 @@ module.exports = function (RED) {
1140
1207
  node.updateKNXBrightnessState(receivedHUEObject.dimming.brightness);
1141
1208
  // If the brightness reaches zero, the hue lamp "on" property must be set to zero as well
1142
1209
  if (receivedHUEObject.dimming.brightness === 0 && node.currentHUEDevice.on !== undefined && node.currentHUEDevice.on.on === true) {
1143
- node.serverHue.hueManager.writeHueQueueAdd(
1144
- node.hueDevice,
1145
- { on: { on: false } },
1146
- node.isGrouped_light === false ? "setLight" : "setGroupedLight",
1147
- );
1210
+ node.writeHueState({ on: { on: false } });
1148
1211
  node.currentHUEDevice.on.on = false;
1149
1212
  }
1150
1213
  node.currentHUEDevice.dimming.brightness = receivedHUEObject.dimming.brightness;
@@ -1476,7 +1539,7 @@ module.exports = function (RED) {
1476
1539
  node.on('input', (msg, send, done) => {
1477
1540
  try {
1478
1541
  const state = RED.util.cloneMessage(msg);
1479
- node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
1542
+ node.writeHueState(state);
1480
1543
  node.setNodeStatusHue({
1481
1544
  fill: "green",
1482
1545
  shape: "dot",
@@ -99,7 +99,7 @@ Die Tabelle **Hue-native Effekte** ordnet KNX-Werte den vom Bridge gemeldeten Ef
99
99
  |--|--|
100
100
  | Read status at startup | Beim Start/Voll-Deploy Status aus HUE lesen und an KNX ausgeben |
101
101
  | KNX brightness status | Verhalten der Helligkeits-Status-GA bei Ein/Aus (0 % senden und letzten Wert wiederherstellen vs. "as is") |
102
- | Lokalen Hue-Cache durch KNX-Bus-Schreibtelegramme aktualisieren | Erweiterte Option. Wenn aktiviert, aktualisieren Schreibtelegramme vom KNX-Bus sofort auch den lokal gecachten Hue-Zustand des Nodes, ohne auf Feedback/Ereignisse der Hue Bridge zu warten. Nützlich für konsistente KNX-Leseantworten oder einen stimmigen Cache, auch wenn Leuchte oder Gruppe AUS sind. |
102
+ | Lokalen Hue-Cache durch KNX-Bus-Schreibtelegramme aktualisieren | Erweiterte Option, standardmaessig aktiviert. Wenn aktiv, aktualisieren Schreibtelegramme vom KNX-Bus sofort auch den lokal gecachten Hue-Zustand des Nodes, ohne auf Feedback/Ereignisse der Hue Bridge zu warten. Das sorgt fuer schnellere lokale Reaktionen und konsistentere sofortige KNX-Leseantworten, besonders wenn Leuchte oder Gruppe AUS sind. Deaktivieren Sie die Option, wenn der Cache nur echten Rueckmeldungen/Ereignissen der Hue Bridge folgen soll. |
103
103
  | On behaviour | Verhalten beim Einschalten (Farbe wählen / Temperatur+Helligkeit wählen / none) |
104
104
  | Night lighting | Nacht-Profil (Farbe oder Temperatur/Helligkeit) |
105
105
  | Day/Night | GA zur Umschaltung Tag/Nacht (_true_ = Tag, _false_ = Nacht) |
@@ -50,6 +50,7 @@
50
50
  "knx_brightness_onhueoff": "Wenn HUE aus: 0% senden. Wenn HUE an: vorherigen Wert wiederherstellen (Standard KNX Verhalten)",
51
51
  "knx_brightness_no": "Unverändert lassen (Standard HUE Verhalten)",
52
52
  "update_local_state_from_knx_write": "Lokalen Hue-Cache durch KNX-Bus-Schreibtelegramme aktualisieren",
53
+ "update_local_state_from_knx_write_hint": "Aktiviert: schnellere lokale Reaktionen und konsistentere sofortige KNX-Leseantworten. Deaktiviert: Cache nur durch echte Hue-Bridge-Ereignisse aktualisieren.",
53
54
  "use_min_brightness": "Minimale Helligkeit der HUE Lampe verwenden",
54
55
  "k_suffix": "K",
55
56
  "temp_desc_2200": "(Beginn der Philips White Ambiance Reihe)",
@@ -98,7 +98,7 @@ Use the **Hue native effects** table to map your KNX values to the effects suppo
98
98
  | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
99
99
  | Read status at startup | Read the Hue light status at node-red's startup or node-red's full deploy, and send that status to the KNX BUS |
100
100
  | KNX Brightness Status | Updates the KNX brightness group address status, whenever the Hue lamp is switched ON/OFF. The options are **When Hue light is Off send 0%. When Hue On, restore previous value (Default KNX behaviour) ** and**Leave as is (default Hue behaviour) ** . If you have KNX dimmer with brightness status, like MDT, the suggested option is _**When Hue light is Off send 0%. When Hue On, restore previous value (Default KNX behaviour)** _ |
101
- | Update local cached Hue state from KNX bus writes | Advanced option. When enabled, writes arriving from the KNX bus also update the node's local cached Hue state immediately, without waiting for feedback/events from the Hue bridge. Useful when you need consistent KNX read responses or cached state even while the light or grouped light is OFF. |
101
+ | Update local cached Hue state from KNX bus writes | Advanced option, enabled by default. When enabled, writes arriving from the KNX bus also update the node's local cached Hue state immediately, without waiting for feedback/events from the Hue bridge. This gives faster local reactions and more consistent immediate KNX read responses, especially while the light or grouped light is OFF. Disable it if you prefer the cache to follow only real feedback/events from the Hue bridge. |
102
102
  | Switch on behaviour | It sets the behaviour of your lights when switched on. You can choose from differents behaviours.<br/> **Select color: ** the light will be switched on with the color of your choice. To change color, just CLICK on the color selector (under the _Select color_ control).<br/>**Select temperature and brightness: ** the light will be switched on with the temperature (Kelvin) and brightness (0-100) of your choice.<br/>**None:** the light will retain its last status. In case you've enable the night lighting, after the night time ends, the lamp will resume the color/temperature/brightness state set at day time. |
103
103
  | Night Lighting | It allows to set a particular light color/brightness at nighttime. The options are the same as the daytime. You could select either a temperature/brightness or color. A cozy temperature of 2700 Kelvin, with a brightness of 10% or 20%, is a good choice for bathroom's night light.|
104
104
  | Day/Night | Select the group address used to set the day/night behaviour. The group address value is _true_ if daytime, _false_ if nighttime. |
@@ -50,6 +50,7 @@
50
50
  "knx_brightness_onhueoff": "When Hue light is Off send 0%. When Hue On, restore previous value (Default KNX behaviour)",
51
51
  "knx_brightness_no": "Leave as is (default Hue behaviour)",
52
52
  "update_local_state_from_knx_write": "Update local cached Hue state from KNX bus writes",
53
+ "update_local_state_from_knx_write_hint": "Enabled: faster local reactions and consistent immediate KNX read responses. Disabled: keep the cache aligned only with real Hue bridge events.",
53
54
  "use_min_brightness": "Use minimum brightness specified in the Hue light",
54
55
  "k_suffix": "K",
55
56
  "temp_desc_2200": "(start of Philips White Ambiance lights range)",
@@ -98,7 +98,7 @@ Use la tabla **Hue Native Effects** para asignar sus valores de KNX a los efecto
98
98
  | ----------------------------------------- | --------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- |
99
99
  | Leer el estado al inicio | Lea el estado de la luz del tono en la inicio de nodo-rojo o el despliegue completo de Node-Red, y envíe ese estado al bus KNX |
100
100
  | Estado de brillo KNX | Actualiza el estado de la dirección del grupo de brillo KNX, siempre que la lámpara de tono se encienda/apague. Las opciones son **cuando la luz del tono está apagada, envíe 0%. Cuando se enciende, restaure el valor anterior (comportamiento de KNX predeterminado) ** y**dejar como es (comportamiento de tono predeterminado) ** . Si tiene KNX Dimmer con estado de brillo, como MDT, la opción sugerida es _**cuando la luz del tono está apagada, envíe 0%. Cuando se enciende, restaure el valor anterior (comportamiento predeterminado KNX)** _ |
101
- | Actualizar el estado local en caché de Hue a partir de escrituras del bus KNX | Opción avanzada. Si está activada, las escrituras que llegan desde el bus KNX también actualizan inmediatamente el estado local en caché de Hue del nodo, sin esperar al feedback/evento del bridge Hue. Útil cuando necesita respuestas de lectura KNX coherentes o un estado en caché alineado incluso mientras la luz o el grupo están apagados. |
101
+ | Actualizar el estado local en caché de Hue a partir de escrituras del bus KNX | Opcion avanzada, activada por defecto. Si esta activa, las escrituras que llegan desde el bus KNX tambien actualizan inmediatamente el estado local en cache de Hue del nodo, sin esperar al feedback/evento del bridge Hue. Esto da reacciones locales mas rapidas y respuestas inmediatas de lectura KNX mas coherentes, especialmente cuando la luz o el grupo estan apagados. Desactivela si prefiere que la cache siga solo el feedback/evento real del bridge Hue. |
102
102
  | Encender el comportamiento | Establece el comportamiento de sus luces cuando se enciende. Puede elegir entre diferentes comportamientos. <br/> **Seleccione Color: ** La luz se encenderá con el color de su elección. Para cambiar el color, simplemente haga clic en el selector de color (debajo del control de color_select). <br/>**Seleccione la temperatura y el brillo: ** La luz se encenderá con la temperatura (Kelvin) y el brillo (0-100) de su elección. <br/>**Ninguna:** La luz retendrá su último estado. En caso de que haya habilitado la iluminación nocturna, después de finalizar la noche, la lámpara reanudará el estado de color/temperatura/brillo establecido durante el día. |
103
103
  | Iluminación nocturna | Permite establecer un color/brillo de luz particular por la noche. Las opciones son las mismas que el día. Puede seleccionar una temperatura/brillo o color. Una temperatura acogedora de 2700 Kelvin, con un brillo del 10% o 20%, es una buena opción para la luz nocturna del baño. |
104
104
  | Día/noche | Seleccione la dirección de grupo utilizada para establecer el comportamiento diurno/nocturno. El valor de la dirección de grupo es _true_ if Daytime, _false_ si nocturno. |
@@ -50,6 +50,7 @@
50
50
  "knx_brightness_onhueoff": "Cuando la luz del tono está apagada, envíe 0%. Cuando se enciende, restaure el valor anterior (comportamiento de KNX predeterminado)",
51
51
  "knx_brightness_no": "Salir como está (comportamiento de tono predeterminado)",
52
52
  "update_local_state_from_knx_write": "Actualizar el estado local en caché de Hue a partir de escrituras del bus KNX",
53
+ "update_local_state_from_knx_write_hint": "Activado: reacciones locales mas rapidas y respuestas inmediatas de lectura KNX mas coherentes. Desactivado: la cache se actualiza solo con eventos reales del bridge Hue.",
53
54
  "use_min_brightness": "Use brillo mínimo especificado en la luz del tono",
54
55
  "k_suffix": "K",
55
56
  "temp_desc_2200": "(Inicio de Philips White Ambiance Lights Range)",
@@ -98,7 +98,7 @@ Utilisez le tableau des effets natifs **Hue** pour cartographier vos valeurs KNX
98
98
  | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
99
99
  | Lire l'état au démarrage | Lisez l'état de la lumière de Hue au démarrage de Node-Red ou le déploiement complet de Node-Red, et envoyez ce statut au bus KNX |
100
100
  | Statut de luminosité KNX | Met à jour l'état de l'adresse du groupe de luminosité KNX, chaque fois que la lampe à teinte est allumée / désactivée. Les options sont **lorsque Hue Light est éteint Envoyer 0%. Lorsque Hue On, restaurez la valeur précédente (comportement KNX par défaut) ** et**Laissez tel quel (comportement de teinte par défaut) ** . Si vous avez un gradateur KNX avec un statut de luminosité, comme le MDT, l'option suggérée est _**lorsque la lumière de Hue est éteinte envoyez 0%. Lorsque Hue on, restaurez la valeur précédente (comportement KNX par défaut)** _ |
101
- | Mettre à jour l'état Hue local en cache à partir des écritures du bus KNX | Option avancée. Si elle est activée, les écritures reçues depuis le bus KNX mettent aussi à jour immédiatement l'état Hue local en cache du nœud, sans attendre les retours/événements du pont Hue. Utile si vous avez besoin de réponses de lecture KNX cohérentes ou d'un cache aligné même lorsque la lumière ou le groupe est éteint. |
101
+ | Mettre à jour l'état Hue local en cache à partir des écritures du bus KNX | Option avancee, activee par defaut. Lorsqu'elle est activee, les ecritures recues depuis le bus KNX mettent aussi a jour immediatement l'etat Hue local en cache du noeud, sans attendre les retours/evenements du pont Hue. Cela apporte des reactions locales plus rapides et des reponses immediates de lecture KNX plus coherentes, surtout lorsque la lumiere ou le groupe est eteint. Desactivez-la si vous preferez que le cache suive uniquement les retours/evenements reels du pont Hue. |
102
102
  | Affoncher le comportement | Il définit le comportement de vos lumières lorsqu'il est allumé. Vous pouvez choisir parmi les différents comportements. <br/> **Sélectionner la couleur: ** La lumière sera allumée avec la couleur de votre choix. Pour modifier la couleur, cliquez simplement sur le sélecteur de couleurs (sous le contrôle de couleur _Select). <br/>**Sélectionnez la température et la luminosité: ** La lumière sera allumée avec la température (Kelvin) et la luminosité (0-100) de votre choix. <br/>**Aucun:** La lumière conservera son dernier statut. Dans le cas où vous permettez l'éclairage nocturne, après la fin de la nuit, la lampe reprendra l'état de couleur / température / luminosité réglé pendant le jour. |
103
103
  | Éclairage nocturne | Il permet de définir une couleur / luminosité claire particulière la nuit. Les options sont les mêmes que la journée. Vous pouvez sélectionner une température / une luminosité ou une couleur. Une température confortable de 2700 Kelvin, avec une luminosité de 10% ou 20%, est un bon choix pour la veilleuse de la salle de bain. |
104
104
  | Jour / nuit | Sélectionnez l'adresse de groupe utilisée pour définir le comportement de jour / nuit. La valeur d'adresse du groupe est _true_ si le jour, _false_ si nocturne. |
@@ -42,6 +42,7 @@
42
42
  "knx_brightness_onhueoff": "Lorsque Hue Light est éteint, envoyez 0%. Lorsque Hue On, restaurez la valeur précédente (comportement KNX par défaut)",
43
43
  "knx_brightness_no": "Laisser tel quel (comportement de teinte par défaut)",
44
44
  "update_local_state_from_knx_write": "Mettre à jour l'état Hue local en cache à partir des écritures du bus KNX",
45
+ "update_local_state_from_knx_write_hint": "Active: reactions locales plus rapides et reponses immediates de lecture KNX plus coherentes. Desactive: le cache ne suit que les evenements reels du bridge Hue.",
45
46
  "use_min_brightness": "Utilisez une luminosité minimale spécifiée dans la lumière des teintes",
46
47
  "k_suffix": "K",
47
48
  "temp_desc_2200": "(Début de la gamme Philips White Ambiance Lights)",
@@ -98,7 +98,7 @@ La tabella **Effetti nativi HUE** consente di associare valori KNX agli effetti
98
98
  |------------------------------------------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
99
99
  |Leggi lo stato all'avvio |Leggi lo stato della luce HUE all'avvio del nodo-rosso o al rosso nodo-rosso del nodo e invia quello stato al bus KNX |
100
100
  |Stato di luminosità KNX |Aggiorna lo stato dell'indirizzo del gruppo di luminosità KNX, ogni volta che la lampada Hue viene accesa/disattivata.Le opzioni sono \*\* quando Hue Light è spento, inviare lo 0%.Quando accesa, ripristinare il valore precedente (comportamento KNX predefinito) \*\* e \*\* lasciano come (comportamento di tonalità predefinito) \*\*.Se si dispone di Dimmer KNX con stato di luminosità, come MDT, l'opzione suggerita è \*\*\*quando la luce della tonalità è disattivata, inviare lo 0%.Quando accesa, ripristinare il valore precedente (comportamento KNX predefinito) \*\*\* |
101
- |Aggiorna lo stato HUE locale in cache dai write KNX |Opzione avanzata. Se abilitata, i write che arrivano dal bus KNX aggiornano subito anche lo stato HUE locale in cache del nodo, senza attendere feedback/eventi dalla Hue Bridge. Utile quando servono risposte KNX in lettura coerenti o uno stato in cache allineato anche mentre la luce o il gruppo sono spenti. |
101
+ |Aggiorna lo stato HUE locale in cache dai write KNX |Opzione avanzata, abilitata di default. Se attiva, i write che arrivano dal bus KNX aggiornano subito anche lo stato HUE locale in cache del nodo, senza attendere feedback/eventi dal bridge Hue. Questo rende le reazioni locali piu rapide e le risposte immediate ai read KNX piu coerenti, soprattutto quando la luce o il grouped_light sono spenti. Disattivala se preferisci che la cache segua solo il feedback/evento reale del bridge Hue. |
102
102
  |Accendi comportamento |Imposta il comportamento delle luci quando acceso.Puoi scegliere tra comportamenti diversi. <br/> \*\* Seleziona colore: \*\* La luce verrà accesa con il colore di tua scelta.Per cambiare il colore, fai clic sul selettore dei colori (sotto il controll&#x6F;_&#x53;eleziona colore_). <br/> \*\* Seleziona temperatura e luminosità: \*\* La luce verrà accesa con la temperatura (kelvin) e la luminosità (0-100) di tua scelta. <br/> \*\* Nessuna: \*\* La luce manterrà il suo ultimo stato.Nel caso in cui tu abbia abilitato l'illuminazione notturna, dopo la fine della notte, la lampada riprenderà lo stato del colore/temperatura/luminosità fissata al giorno.|
103
103
  |Illuminazione notturna |Permette di impostare un particolare colore/luminosità della luce di notte.Le opzioni sono le stesse del giorno.È possibile selezionare una temperatura/luminosità o colore.Una temperatura accogliente di 2700 Kelvin, con una luminosità del 10% o 20%, è una buona scelta per la luce notturna del bagno |
104
104
  |Giorno/notte |Seleziona l'indirizzo di gruppo utilizzato per impostare il comportamento giorno/notte.Il valore dell'indirizzo di gruppo è _true_ se giorno, _false_ se notturno.|
@@ -50,6 +50,7 @@
50
50
  "knx_brightness_onhueoff": "Se la luce HUE è spenta invia 0%. Se è accesa, ripristina il valore precedente (Comportamento KNX predefinito)",
51
51
  "knx_brightness_no": "Lascia invariato (comportamento HUE predefinito)",
52
52
  "update_local_state_from_knx_write": "Aggiorna lo stato HUE locale in cache dai write provenienti dal bus KNX",
53
+ "update_local_state_from_knx_write_hint": "Abilitato: reazioni locali piu rapide e risposte immediate ai read KNX piu coerenti. Disabilitato: la cache si aggiorna solo dagli eventi reali del bridge Hue.",
53
54
  "use_min_brightness": "Usa la luminosità minima specificata nella luce HUE",
54
55
  "k_suffix": "K",
55
56
  "temp_desc_2200": "(inizio della gamma Philips White Ambiance)",
@@ -98,7 +98,7 @@ _Hue 原生效果_
98
98
  |----------------------------------------------------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
99
99
  |在启动时阅读状态|在Node-Red的启动或Node-Red的完整部署中阅读色相灯状态,然后将该状态发送到KNX总线|
100
100
  |KNX亮度状态|每当打开/关闭色调灯时,都会更新KNX亮度组地址状态。选项是 **当色相关闭时发送0%。当色相打开时,还原以前的值(默认的KNX行为) ** 和**如IS(默认色调行为)** 。如果您具有具有亮度状态的KNX调光器,例如MDT,则建议的选项为\*\*\*,当Hue Light关闭时,请发送0%。色调打开时,还原以前的值(默认的KNX行为)\*\*\* |
101
- |根据 KNX 总线写入更新本地缓存的 Hue 状态|高级选项。启用后,来自 KNX 总线的写入也会立即更新节点本地缓存的 Hue 状态,而无需等待 Hue Bridge 的反馈或事件。当你需要一致的 KNX 读响应,或者希望在灯或分组灯关闭时缓存状态也保持同步时,这个选项会很有用。 |
101
+ |根据 KNX 总线写入更新本地缓存的 Hue 状态|高级选项,默认启用。启用后,来自 KNX 总线的写入会立即更新节点本地缓存的 Hue 状态,无需等待 Hue Bridge 的反馈或事件。这样本地响应会更快,KNX 的即时读回也会更一致,尤其是在灯或分组灯关闭时。如果你希望缓存只跟随 Hue Bridge 的真实反馈/事件,请关闭此选项。 |
102
102
  |打开行为|打开时,它设置了灯的行为。您可以从不同的行为中进行选择。<br/> \*\*选择颜色:\*\*将使用您选择的颜色打开灯。要更改颜色,只需单击颜色选择器(&#x5728;_&#x9009;择颜&#x8272;_&#x63A7;制下)。<br/> \*\*选择温度和亮度: **您选择的温度(kelvin)和亮度(0-100)将打开灯。<br/> none:** 无:如果您启用夜间照明,夜间结束后,灯将恢复白天设置的颜色/温度/亮度状态。|
103
103
  |夜照明|它允许在夜间设置特定的浅色/亮度。选项与白天相同。您可以选择温度/亮度或颜色。舒适的温度为2700开Kelvin,亮度为10%或20%,是浴室夜灯的不错选择。 |
104
104
  |白天/夜|选择用于设置白天/夜行为的组地址。组地址值为\_true\_如果白天,\_false\_如果夜间。|
@@ -42,6 +42,7 @@
42
42
  "knx_brightness_onhueoff": "当 HUE 灯关闭时发送 0%。当 HUE 打开时恢复先前值(默认 KNX 行为)",
43
43
  "knx_brightness_no": "保持不变(默认 HUE 行为)",
44
44
  "update_local_state_from_knx_write": "根据 KNX 总线写入更新本地缓存的 Hue 状态",
45
+ "update_local_state_from_knx_write_hint": "启用:本地响应更快,KNX 即时读回更一致。禁用:缓存只根据 Hue 网关的真实事件更新。",
45
46
  "use_min_brightness": "使用 HUE 灯中设置的最小亮度",
46
47
  "k_suffix": "K",
47
48
  "temp_desc_2200": "(飞利浦 White Ambiance 系列起始)",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=20.18.1"
5
5
  },
6
- "version": "4.1.32",
6
+ "version": "4.1.33",
7
7
  "description": "Control your KNX and KNX Secure intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control, ETS group address importer, and KNX routing between interfaces. Easy to use and highly configurable.",
8
8
  "files": [
9
9
  "nodes/",
@@ -104,4 +104,4 @@
104
104
  "mocha": "^10.4.0",
105
105
  "marked": "^14.1.0"
106
106
  }
107
- }
107
+ }