node-red-contrib-knx-ultimate 2.3.4 → 2.3.5
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,9 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
**Version 2.3.5** - Jan 2024<br/>
|
|
10
|
+
- HUE Light: fixed multi HUE Bridge GUI issue.<br/>
|
|
11
|
+
|
|
9
12
|
**Version 2.3.4** - Jan 2024<br/>
|
|
10
13
|
- HUE Light: fixex tab "DIM/Brightness" inaccessible, when "KNX Brightness Status" was set to use the default knx behaviour.<br/>
|
|
11
14
|
|
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
<input type="text" id="node-input-nameshort_release" style="width:200px;margin-left: 5px; text-align: left;">
|
|
362
362
|
</div>
|
|
363
363
|
<div class="form-row">
|
|
364
|
-
<label style="width:100px;"><i class="fa fa-
|
|
364
|
+
<label style="width:100px;"><i class="fa fa-question-circle"></i> Switch Status</label>
|
|
365
365
|
|
|
366
366
|
<label for="node-input-GAshort_releaseStatus" style="width:20px;">GA</label>
|
|
367
367
|
<input type="text" id="node-input-GAshort_releaseStatus" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
@@ -141,14 +141,14 @@
|
|
|
141
141
|
getDPT("232.600", "#node-input-dptLightColorState");
|
|
142
142
|
getGroupAddress("#node-input-GALightColorState", "#node-input-nameLightColorState", "#node-input-dptLightColorState", " 232.600");
|
|
143
143
|
|
|
144
|
-
getDPT("3.007", "#node-input-
|
|
145
|
-
getGroupAddress("#node-input-
|
|
144
|
+
getDPT("3.007", "#node-input-dptLightKelvinDIM");
|
|
145
|
+
getGroupAddress("#node-input-GALightKelvinDIM", "#node-input-nameLightKelvinDIM", "#node-input-dptLightKelvinDIM", " 3.007");
|
|
146
146
|
|
|
147
|
-
getDPT("5.001", "#node-input-
|
|
148
|
-
getGroupAddress("#node-input-
|
|
147
|
+
getDPT("5.001", "#node-input-dptLightKelvinPercentage");
|
|
148
|
+
getGroupAddress("#node-input-GALightKelvinPercentage", "#node-input-nameLightKelvinPercentage", "#node-input-dptLightKelvinPercentage", " 5.001");
|
|
149
149
|
|
|
150
|
-
getDPT("5.001", "#node-input-
|
|
151
|
-
getGroupAddress("#node-input-
|
|
150
|
+
getDPT("5.001", "#node-input-dptLightKelvinPercentageState");
|
|
151
|
+
getGroupAddress("#node-input-GALightKelvinPercentageState", "#node-input-nameLightKelvinPercentageState", "#node-input-dptLightKelvinPercentageState", " 5.001");
|
|
152
152
|
|
|
153
153
|
getDPT("1.", "#node-input-dptLightBlink");
|
|
154
154
|
getGroupAddress("#node-input-GALightBlink", "#node-input-nameLightBlink", "#node-input-dptLightBlink", " 1.");
|
|
@@ -173,15 +173,13 @@
|
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
// Get the HUE capabilities to enable/disable UI parts
|
|
176
|
+
var getJsonPromise;
|
|
176
177
|
if ($("#node-input-hueDevice").val() === '') {
|
|
177
178
|
$("#tabs").hide();
|
|
178
179
|
} else {
|
|
179
|
-
|
|
180
|
+
if (getJsonPromise !== undefined) getJsonPromise.abort();
|
|
181
|
+
getJsonPromise = $.getJSON("knxUltimateGetLightObject?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&" + { _: new Date().getTime() }, (data) => {
|
|
180
182
|
let oLight = data;
|
|
181
|
-
if (JSON.stringify(data) === "{}") {
|
|
182
|
-
$("#mainWindow").hide();
|
|
183
|
-
RED.notify("Please close and reload this window in few seconds. Still querying the HUE Bridge.", { type: "warning", timeout: 8000 });
|
|
184
|
-
}
|
|
185
183
|
// Check if grouped, to hide/show the "Get current" buttons
|
|
186
184
|
if (oLight.type === "grouped_light") {
|
|
187
185
|
$("#tabs").tabs("enable", "#tabs-4");
|
|
@@ -310,6 +308,7 @@
|
|
|
310
308
|
$("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
|
|
311
309
|
$("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
|
|
312
310
|
});
|
|
311
|
+
setTimeout(function () { if (getJsonPromise !== undefined) getJsonPromise.abort(); }, 10000);
|
|
313
312
|
}
|
|
314
313
|
// Show/Hide the div of the color at swich on
|
|
315
314
|
if (node.specifySwitchOnBrightness === "yes") {
|
|
@@ -560,7 +559,7 @@
|
|
|
560
559
|
$("#node-input-hueDevice").val(ui.item.hueDevice + "#light");
|
|
561
560
|
}
|
|
562
561
|
onEditPrepare(node);
|
|
563
|
-
|
|
562
|
+
//$("#tabs").show();
|
|
564
563
|
},
|
|
565
564
|
});
|
|
566
565
|
}
|
|
@@ -594,17 +593,25 @@
|
|
|
594
593
|
GALightColorState: { value: "" },
|
|
595
594
|
dptLightColorState: { value: "" },
|
|
596
595
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
596
|
+
nameLightKelvinDIM: { value: "" },
|
|
597
|
+
GALightKelvinDIM: { value: "" },
|
|
598
|
+
dptLightKelvinDIM: { value: "" },
|
|
599
|
+
|
|
600
|
+
nameLightKelvinPercentage: { value: "" },
|
|
601
|
+
GALightKelvinPercentage: { value: "" },
|
|
602
|
+
dptLightKelvinPercentage: { value: "" },
|
|
600
603
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
+
nameLightKelvinPercentageState: { value: "" },
|
|
605
|
+
GALightKelvinPercentageState: { value: "" },
|
|
606
|
+
dptLightKelvinPercentageState: { value: "" },
|
|
604
607
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
+
nameLightKelvin: { value: "" },
|
|
609
|
+
GALightKelvin: { value: "" },
|
|
610
|
+
dptLightKelvin: { value: "" },
|
|
611
|
+
|
|
612
|
+
nameLightKelvinState: { value: "" },
|
|
613
|
+
GALightKelvinState: { value: "" },
|
|
614
|
+
dptLightKelvinState: { value: "" },
|
|
608
615
|
|
|
609
616
|
nameLightBrightness: { value: "" },
|
|
610
617
|
GALightBrightness: { value: "" },
|
|
@@ -626,14 +633,6 @@
|
|
|
626
633
|
GADaylightSensor: { value: "" },
|
|
627
634
|
dptDaylightSensor: { value: "" },
|
|
628
635
|
|
|
629
|
-
nameLightKelvin: { value: "" },
|
|
630
|
-
GALightKelvin: { value: "" },
|
|
631
|
-
dptLightKelvin: { value: "" },
|
|
632
|
-
|
|
633
|
-
nameLightKelvinState: { value: "" },
|
|
634
|
-
GALightKelvinState: { value: "" },
|
|
635
|
-
dptLightKelvinState: { value: "" },
|
|
636
|
-
|
|
637
636
|
specifySwitchOnBrightness: { value: "temperature" },
|
|
638
637
|
colorAtSwitchOnDayTime: { value: '{"kelvin":3000, "brightness":100 }' },
|
|
639
638
|
|
|
@@ -781,12 +780,12 @@
|
|
|
781
780
|
|
|
782
781
|
//#region color_temperature_mode
|
|
783
782
|
// ----------------------------
|
|
784
|
-
if ($("#node-input-
|
|
783
|
+
if ($("#node-input-GALightKelvinPercentage").val !== '') {
|
|
785
784
|
|
|
786
785
|
// color_temperature_mode: relative
|
|
787
786
|
sYaml += ' color_temperature_mode: relative' + '\n';
|
|
788
|
-
sYaml += ' color_temperature_address: "' + $("#node-input-
|
|
789
|
-
sYaml += $("#node-input-
|
|
787
|
+
sYaml += ' color_temperature_address: "' + $("#node-input-GALightKelvinPercentage").val() + '"\n';
|
|
788
|
+
sYaml += $("#node-input-GALightKelvinPercentageState").val() != '' ? ' color_temperature_state_address: "' + $("#node-input-GALightKelvinPercentageState").val() + '"' + "\n" : '';
|
|
790
789
|
sYaml += ' min_kelvin: 2200' + '\n';
|
|
791
790
|
sYaml += ' max_kelvin: 6500' + '\n';
|
|
792
791
|
|
|
@@ -899,7 +898,7 @@
|
|
|
899
898
|
<input type="text" id="node-input-nameLightSwitch" style="width:190px;margin-left: 5px; text-align: left;">
|
|
900
899
|
</div>
|
|
901
900
|
<div class="form-row">
|
|
902
|
-
<label for="node-input-nameLightState" style="width:110px;"><i class="fa fa-
|
|
901
|
+
<label for="node-input-nameLightState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
903
902
|
|
|
904
903
|
<label for="node-input-GALightState" style="width:20px;">GA</label>
|
|
905
904
|
<input type="text" id="node-input-GALightState" placeholder="Ex: 1/1/1"
|
|
@@ -947,8 +946,7 @@
|
|
|
947
946
|
</div>
|
|
948
947
|
|
|
949
948
|
<div class="form-row">
|
|
950
|
-
<label for="node-input-nameLightBrightnessState" style="width:110px;"><i class="fa fa-
|
|
951
|
-
Status</label>
|
|
949
|
+
<label for="node-input-nameLightBrightnessState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
952
950
|
|
|
953
951
|
<label for="node-input-GALightBrightnessState" style="width:20px;"><span
|
|
954
952
|
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
@@ -989,32 +987,32 @@
|
|
|
989
987
|
<div id="tabs-3">
|
|
990
988
|
<p>
|
|
991
989
|
<div class="form-row">
|
|
992
|
-
<label for="node-input-
|
|
990
|
+
<label for="node-input-nameLightKelvinDIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control dim</label>
|
|
993
991
|
|
|
994
|
-
<label for="node-input-
|
|
995
|
-
<input type="text" id="node-input-
|
|
992
|
+
<label for="node-input-GALightKelvinDIM" style="width:20px;">GA</label>
|
|
993
|
+
<input type="text" id="node-input-GALightKelvinDIM" placeholder="Ex: 1/1/1"
|
|
996
994
|
style="width:70px;margin-left: 5px; text-align: left;">
|
|
997
995
|
|
|
998
|
-
<label for="node-input-
|
|
999
|
-
<select id="node-input-
|
|
996
|
+
<label for="node-input-dptLightKelvinDIM" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
997
|
+
<select id="node-input-dptLightKelvinDIM" style="width:140px;"></select>
|
|
1000
998
|
|
|
1001
|
-
<label for="node-input-
|
|
1002
|
-
<input type="text" id="node-input-
|
|
999
|
+
<label for="node-input-nameLightKelvinDIM" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
1000
|
+
<input type="text" id="node-input-nameLightKelvinDIM" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1003
1001
|
</div>
|
|
1004
1002
|
<div class="form-row">
|
|
1005
|
-
<label for="node-input-
|
|
1003
|
+
<label for="node-input-nameLightKelvinPercentage" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control
|
|
1006
1004
|
%</label>
|
|
1007
1005
|
|
|
1008
|
-
<label for="node-input-
|
|
1009
|
-
<input type="text" id="node-input-
|
|
1006
|
+
<label for="node-input-GALightKelvinPercentage" style="width:20px;">GA</label>
|
|
1007
|
+
<input type="text" id="node-input-GALightKelvinPercentage" placeholder="Ex: 1/1/1"
|
|
1010
1008
|
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1011
1009
|
|
|
1012
|
-
<label for="node-input-
|
|
1013
|
-
<select id="node-input-
|
|
1010
|
+
<label for="node-input-dptLightKelvinPercentage" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1011
|
+
<select id="node-input-dptLightKelvinPercentage" style="width:140px;"></select>
|
|
1014
1012
|
|
|
1015
|
-
<label for="node-input-
|
|
1013
|
+
<label for="node-input-nameLightKelvinPercentage"
|
|
1016
1014
|
style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
1017
|
-
<input type="text" id="node-input-
|
|
1015
|
+
<input type="text" id="node-input-nameLightKelvinPercentage" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1018
1016
|
</div>
|
|
1019
1017
|
<div class="form-row">
|
|
1020
1018
|
<label for="node-input-nameLightKelvin" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control
|
|
@@ -1031,21 +1029,21 @@
|
|
|
1031
1029
|
<input type="text" id="node-input-nameLightKelvin" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1032
1030
|
</div>
|
|
1033
1031
|
<div class="form-row">
|
|
1034
|
-
<label for="node-input-
|
|
1032
|
+
<label for="node-input-nameLightKelvinPercentageState" style="width:110px;"><i class="fa fa-question-circle"></i> Status
|
|
1035
1033
|
%</label>
|
|
1036
1034
|
|
|
1037
|
-
<label for="node-input-
|
|
1038
|
-
<input type="text" id="node-input-
|
|
1035
|
+
<label for="node-input-GALightKelvinPercentageState" style="width:20px;">GA</label>
|
|
1036
|
+
<input type="text" id="node-input-GALightKelvinPercentageState" placeholder="Ex: 1/1/1"
|
|
1039
1037
|
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1040
1038
|
|
|
1041
|
-
<label for="node-input-
|
|
1042
|
-
<select id="node-input-
|
|
1039
|
+
<label for="node-input-dptLightKelvinPercentageState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1040
|
+
<select id="node-input-dptLightKelvinPercentageState" style="width:140px;"></select>
|
|
1043
1041
|
|
|
1044
|
-
<label for="node-input-
|
|
1045
|
-
<input type="text" id="node-input-
|
|
1042
|
+
<label for="node-input-nameLightKelvinPercentageState" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
1043
|
+
<input type="text" id="node-input-nameLightKelvinPercentageState" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1046
1044
|
</div>
|
|
1047
1045
|
<div class="form-row">
|
|
1048
|
-
<label for="node-input-nameLightKelvinState" style="width:110px;"><i class="fa fa-
|
|
1046
|
+
<label for="node-input-nameLightKelvinState" style="width:110px;"><i class="fa fa-question-circle"></i> Status
|
|
1049
1047
|
Kelvin</label>
|
|
1050
1048
|
|
|
1051
1049
|
<label for="node-input-GALightKelvinState" style="width:20px;">GA</label>
|
|
@@ -1085,8 +1083,7 @@
|
|
|
1085
1083
|
<input type="text" id="node-input-nameLightColor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1086
1084
|
</div>
|
|
1087
1085
|
<div class="form-row">
|
|
1088
|
-
<label for="node-input-nameLightColorState" style="width:110px;"><i class="fa fa-
|
|
1089
|
-
Status</label>
|
|
1086
|
+
<label for="node-input-nameLightColorState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
1090
1087
|
|
|
1091
1088
|
<label for="node-input-GALightColorState" style="width:20px;"><span
|
|
1092
1089
|
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
@@ -1142,7 +1139,7 @@
|
|
|
1142
1139
|
<div id="tabs-6">
|
|
1143
1140
|
<p>
|
|
1144
1141
|
<div class="form-row">
|
|
1145
|
-
<label style="width:260px;" for="node-input-readStatusAtStartup"><i class="fa fa-
|
|
1142
|
+
<label style="width:260px;" for="node-input-readStatusAtStartup"><i class="fa fa-question-circle"></i> Read status at
|
|
1146
1143
|
startup</label>
|
|
1147
1144
|
<select id="node-input-readStatusAtStartup">
|
|
1148
1145
|
<option value="no">No</option>
|
|
@@ -13,6 +13,22 @@ module.exports = function (RED) {
|
|
|
13
13
|
const node = this;
|
|
14
14
|
node.server = RED.nodes.getNode(config.server);
|
|
15
15
|
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
16
|
+
|
|
17
|
+
// Convert for backward compatibility
|
|
18
|
+
if (config.nameLightKelvinDIM === undefined) {
|
|
19
|
+
config.nameLightKelvinDIM = config.nameLightHSV;
|
|
20
|
+
config.GALightKelvinDIM = config.GALightHSV;
|
|
21
|
+
config.dptLightKelvinDIM = config.dptLightHSV;
|
|
22
|
+
|
|
23
|
+
config.nameLightKelvinPercentage = config.nameLightHSVPercentage;
|
|
24
|
+
config.GALightKelvinPercentage = config.GALightHSVPercentage;
|
|
25
|
+
config.dptLightKelvinPercentage = config.dptLightHSVPercentage;
|
|
26
|
+
|
|
27
|
+
config.nameLightKelvinPercentageState = config.nameLightHSVState;
|
|
28
|
+
config.GALightKelvinPercentageState = config.GALightHSVState;
|
|
29
|
+
config.dptLightKelvinPercentageState = config.dptLightHSVState;
|
|
30
|
+
}
|
|
31
|
+
|
|
16
32
|
node.topic = node.name;
|
|
17
33
|
node.name = config.name === undefined ? "Hue" : config.name;
|
|
18
34
|
node.outputtopic = node.name;
|
|
@@ -283,22 +299,22 @@ module.exports = function (RED) {
|
|
|
283
299
|
});
|
|
284
300
|
|
|
285
301
|
break;
|
|
286
|
-
case config.
|
|
287
|
-
if (config.
|
|
302
|
+
case config.GALightKelvinDIM:
|
|
303
|
+
if (config.dptLightKelvinDIM === "3.007") {
|
|
288
304
|
// MDT smartbutton will dim the color temperature
|
|
289
305
|
// { decr_incr: 1, data: 1 } : Start increasing until { decr_incr: 0, data: 0 } is received.
|
|
290
306
|
// { decr_incr: 0, data: 1 } : Start decreasing until { decr_incr: 0, data: 0 } is received.
|
|
291
|
-
msg.payload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.
|
|
307
|
+
msg.payload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptLightKelvinDIM));
|
|
292
308
|
node.hueDimmingTunableWhite(msg.payload.decr_incr, msg.payload.data, 5000);
|
|
293
309
|
node.setNodeStatusHue({
|
|
294
310
|
fill: "green", shape: "dot", text: "KNX->HUE", payload: JSON.stringify(msg.payload),
|
|
295
311
|
});
|
|
296
312
|
}
|
|
297
313
|
break;
|
|
298
|
-
case config.
|
|
299
|
-
if (config.
|
|
314
|
+
case config.GALightKelvinPercentage:
|
|
315
|
+
if (config.dptLightKelvinPercentage === "5.001") {
|
|
300
316
|
// 0-100% tunable white
|
|
301
|
-
msg.payload = 100 - dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.
|
|
317
|
+
msg.payload = 100 - dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptLightKelvinPercentage));
|
|
302
318
|
// msg.payload = msg.payload <= 0 ? 1 : msg.payload
|
|
303
319
|
const retMirek = hueColorConverter.ColorConverter.scale(msg.payload, [0, 100], [153, 500]);
|
|
304
320
|
msg.payload = retMirek;
|
|
@@ -456,9 +472,9 @@ module.exports = function (RED) {
|
|
|
456
472
|
ret = node.currentHUEDevice.color.xy;
|
|
457
473
|
if (ret !== undefined) node.updateKNXLightColorState(node.currentHUEDevice.color, "response");
|
|
458
474
|
break;
|
|
459
|
-
case config.
|
|
475
|
+
case config.GALightKelvinPercentageState:
|
|
460
476
|
ret = node.currentHUEDevice.color_temperature.mirek;
|
|
461
|
-
if (ret !== undefined) node.
|
|
477
|
+
if (ret !== undefined) node.updateKNXLightKelvinPercentageState(ret, "response");
|
|
462
478
|
break;
|
|
463
479
|
case config.GALightBrightnessState:
|
|
464
480
|
ret = node.currentHUEDevice.dimming.brightness;
|
|
@@ -591,7 +607,7 @@ module.exports = function (RED) {
|
|
|
591
607
|
// DIM UP
|
|
592
608
|
if (node.timerStepDimTunableWhite !== undefined) clearInterval(node.timerStepDimTunableWhite);
|
|
593
609
|
node.timerStepDimTunableWhite = setInterval(() => {
|
|
594
|
-
node.
|
|
610
|
+
node.updateKNXLightKelvinPercentageState(node.brightnessStepTunableWhite); // Unnecessary, but necessary to set the KNX Status in real time.
|
|
595
611
|
node.brightnessStepTunableWhite += numStepTunableWhite; // *2 to speed up the things
|
|
596
612
|
if (node.brightnessStepTunableWhite > maxDimLevelLightTunableWhite) node.brightnessStepTunableWhite = maxDimLevelLightTunableWhite;
|
|
597
613
|
const hueTelegram = { color_temperature: { mirek: node.brightnessStepTunableWhite }, dynamics: { duration: _dimSpeedInMillisecsTunableWhite } };
|
|
@@ -608,7 +624,7 @@ module.exports = function (RED) {
|
|
|
608
624
|
// DIM DOWN
|
|
609
625
|
if (node.timerStepDimTunableWhite !== undefined) clearInterval(node.timerStepDimTunableWhite);
|
|
610
626
|
node.timerStepDimTunableWhite = setInterval(() => {
|
|
611
|
-
node.
|
|
627
|
+
node.updateKNXLightKelvinPercentageState(node.brightnessStepTunableWhite); // Unnecessary, but necessary to set the KNX Status in real time.
|
|
612
628
|
node.brightnessStepTunableWhite -= numStepTunableWhite; // *2 to speed up the things
|
|
613
629
|
if (node.brightnessStepTunableWhite < minDimLevelLightTunableWhite) node.brightnessStepTunableWhite = minDimLevelLightTunableWhite;
|
|
614
630
|
const hueTelegram = { color_temperature: { mirek: node.brightnessStepTunableWhite }, dynamics: { duration: _dimSpeedInMillisecsTunableWhite } };
|
|
@@ -705,7 +721,7 @@ module.exports = function (RED) {
|
|
|
705
721
|
}
|
|
706
722
|
}
|
|
707
723
|
if (deviceByRef.color_temperature !== undefined && deviceByRef.color_temperature.mirek !== undefined) {
|
|
708
|
-
node.
|
|
724
|
+
node.updateKNXLightKelvinPercentageState(deviceByRef.color_temperature.mirek);
|
|
709
725
|
node.updateKNXLightKelvinState(deviceByRef.color_temperature.mirek);
|
|
710
726
|
node.currentHUEDevice.color_temperature.mirek = deviceByRef.color_temperature.mirek;
|
|
711
727
|
}
|
|
@@ -781,12 +797,12 @@ module.exports = function (RED) {
|
|
|
781
797
|
}
|
|
782
798
|
};
|
|
783
799
|
|
|
784
|
-
node.
|
|
785
|
-
if (config.
|
|
800
|
+
node.updateKNXLightKelvinPercentageState = function updateKNXLightKelvinPercentageState(_value, _outputtype = "write") {
|
|
801
|
+
if (config.GALightKelvinPercentageState !== undefined && config.GALightKelvinPercentageState !== "") {
|
|
786
802
|
const knxMsgPayload = {};
|
|
787
|
-
knxMsgPayload.topic = config.
|
|
788
|
-
knxMsgPayload.dpt = config.
|
|
789
|
-
if (config.
|
|
803
|
+
knxMsgPayload.topic = config.GALightKelvinPercentageState;
|
|
804
|
+
knxMsgPayload.dpt = config.dptLightKelvinPercentageState;
|
|
805
|
+
if (config.dptLightKelvinPercentageState === "5.001") {
|
|
790
806
|
const retPercent = hueColorConverter.ColorConverter.scale(_value, [153, 500], [0, 100]);
|
|
791
807
|
knxMsgPayload.payload = 100 - retPercent;
|
|
792
808
|
}
|
|
@@ -805,7 +821,7 @@ module.exports = function (RED) {
|
|
|
805
821
|
node.setNodeStatusHue({
|
|
806
822
|
fill: "blue",
|
|
807
823
|
shape: "ring",
|
|
808
|
-
text: "HUE->KNX
|
|
824
|
+
text: "HUE->KNX Tunable White",
|
|
809
825
|
payload: knxMsgPayload.payload,
|
|
810
826
|
});
|
|
811
827
|
}
|
|
@@ -508,7 +508,7 @@
|
|
|
508
508
|
<select id="node-input-valscene" style="width:180px;margin-left: 5px; text-align: left;"></select>
|
|
509
509
|
</div>
|
|
510
510
|
<div class="form-row">
|
|
511
|
-
<label for="node-input-namesceneStatus" style="width:100px;"><i class="fa fa-
|
|
511
|
+
<label for="node-input-namesceneStatus" style="width:100px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
512
512
|
|
|
513
513
|
<label for="node-input-GAsceneStatus" style="width:20px;">GA</label>
|
|
514
514
|
<input type="text" id="node-input-GAsceneStatus" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=16.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.3.
|
|
6
|
+
"version": "2.3.5",
|
|
7
7
|
"description": "Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer. Easy to use and highly configurable.",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"binary-parser": "2.2.1",
|