node-red-contrib-knx-ultimate 2.2.37 → 2.2.39
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 +4 -0
- package/KNXEngine/CHANGELOG.md +4 -0
- package/KNXEngine/package.json +1 -1
- package/KNXEngine/src/dptlib/dpt9.js +1 -0
- package/nodes/knxUltimateHueLight.html +101 -100
- package/nodes/knxUltimateHueLight.js +14 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
**Version 2.2.39** - Jan 2024<br/>
|
|
10
|
+
- Fixed DPT 9.001 issue when sending numbers having > 2 decimals.<br/>
|
|
11
|
+
- HUE Light node: fixed an issue in dimming, when the minimum dim level is set to the minimum level defined by the HUE bridge.<br/>
|
|
12
|
+
|
|
9
13
|
**Version 2.2.37** - December 2023<br/>
|
|
10
14
|
- HUE Light Node: you can now set the DIM direction for tunable white lights. Fixed some issues as well.<br/>
|
|
11
15
|
|
package/KNXEngine/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
<p>
|
|
10
|
+
<b>Version 1.0.43</b> - December 2023<br/>
|
|
11
|
+
- Fixed DPT 9.001 issue when sending numberso having > 2 decimals.<br/>
|
|
12
|
+
</p>
|
|
9
13
|
<p>
|
|
10
14
|
<b>Version 1.0.43</b> - October 2023<br/>
|
|
11
15
|
- Added help description for DPT 3.001 DIMMING stop telegram.<br/>
|
package/KNXEngine/package.json
CHANGED
|
@@ -38,6 +38,7 @@ exports.formatAPDU = function (value) {
|
|
|
38
38
|
if (!isFinite(value)) {
|
|
39
39
|
knxLog.get().warn('DPT9: cannot write non-numeric or undefined value')
|
|
40
40
|
} else {
|
|
41
|
+
value = value.toFixed(2); // Fix issue with float having too many decimals.
|
|
41
42
|
const arr = frexp(value)
|
|
42
43
|
const mantissa = arr[0]; const exponent = arr[1]
|
|
43
44
|
// find the minimum exponent that will upsize the normalized mantissa (0,5 to 1 range)
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
<!-- <script type="application/javascript;charset=utf-8" src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
|
|
2
|
-
<script type="application/javascript;charset=utf-8" src="https://cdn.jsdelivr.net/npm/@jaames/iro@5"></script> -->
|
|
3
|
-
|
|
4
1
|
'use strict'
|
|
5
2
|
<script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
|
|
6
3
|
|
|
@@ -33,10 +30,8 @@
|
|
|
33
30
|
}
|
|
34
31
|
// ################################################################
|
|
35
32
|
|
|
36
|
-
|
|
37
33
|
$("#tabs").tabs(); // Tabs gestione KNX
|
|
38
34
|
|
|
39
|
-
|
|
40
35
|
// 19/02/2020 Used to get the server sooner als deploy.
|
|
41
36
|
$("#node-input-server").change(function () {
|
|
42
37
|
try {
|
|
@@ -230,6 +225,7 @@
|
|
|
230
225
|
.text("No")
|
|
231
226
|
);
|
|
232
227
|
}
|
|
228
|
+
|
|
233
229
|
$("#tabs").tabs("disable", "#tabs-4");
|
|
234
230
|
$("#tabs").tabs("disable", "#tabs-3");
|
|
235
231
|
$("#tabs").tabs("disable", "#tabs-2");
|
|
@@ -239,11 +235,15 @@
|
|
|
239
235
|
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
240
236
|
$("#divColorCycle").hide();
|
|
241
237
|
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").hide();
|
|
242
|
-
$("#
|
|
238
|
+
$("#divBehaviourBrightness").hide();
|
|
243
239
|
$("#comboTemperatureAtSwitchOn").hide();
|
|
244
240
|
$("#comboTemperatureAtSwitchOnNightTime").hide();
|
|
245
241
|
|
|
246
242
|
// Enable options/tabs one by one
|
|
243
|
+
if (oLight.dimming !== undefined) {
|
|
244
|
+
$("#tabs").tabs("enable", "#tabs-2");
|
|
245
|
+
$("#divBehaviourBrightness").show();
|
|
246
|
+
}
|
|
247
247
|
if (oLight.color !== undefined) {
|
|
248
248
|
$("#tabs").tabs("enable", "#tabs-4");
|
|
249
249
|
$("#divColorsAtSwitchOn").show();
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
// Check temperature (if the light supports temperature, it support dimming as well)
|
|
264
264
|
if (oLight.color_temperature !== undefined) {
|
|
265
265
|
$("#tabs").tabs("enable", "#tabs-3");
|
|
266
|
-
|
|
266
|
+
//$("#tabs").tabs("enable", "#tabs-2");
|
|
267
267
|
$("#node-input-specifySwitchOnBrightness").append(
|
|
268
268
|
$("<option>")
|
|
269
269
|
.val("temperature")
|
|
@@ -277,11 +277,11 @@
|
|
|
277
277
|
$("#divTemperatureAtSwitchOn").show();
|
|
278
278
|
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
279
279
|
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
|
|
280
|
-
$("#
|
|
280
|
+
$("#divBehaviourBrightness").show();
|
|
281
281
|
$("#comboTemperatureAtSwitchOn").show();
|
|
282
282
|
$("#comboTemperatureAtSwitchOnNightTime").show();
|
|
283
283
|
} else {
|
|
284
|
-
|
|
284
|
+
//$("#tabs").tabs("enable", "#tabs-2");
|
|
285
285
|
$("#node-input-specifySwitchOnBrightness").append(
|
|
286
286
|
$("<option>")
|
|
287
287
|
.val("temperature")
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
$("#divTemperatureAtSwitchOn").show();
|
|
298
298
|
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
299
299
|
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
|
|
300
|
-
|
|
300
|
+
//$("#divBehaviourBrightness").show();
|
|
301
301
|
}
|
|
302
302
|
$("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
|
|
303
303
|
$("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
|
|
@@ -821,6 +821,8 @@
|
|
|
821
821
|
|
|
822
822
|
</script>
|
|
823
823
|
|
|
824
|
+
|
|
825
|
+
|
|
824
826
|
<script type="text/html" data-template-name="knxUltimateHueLight">
|
|
825
827
|
|
|
826
828
|
<div class="form-row">
|
|
@@ -863,8 +865,7 @@
|
|
|
863
865
|
|
|
864
866
|
<br />
|
|
865
867
|
|
|
866
|
-
|
|
867
|
-
<div id="tabs" hidden>
|
|
868
|
+
<div id="tabs" hidden">
|
|
868
869
|
<ul>
|
|
869
870
|
<li><a href="#tabs-1"><i class="fa-solid fa-toggle-on fa-beat"></i> Switching</a></li>
|
|
870
871
|
<li><a href="#tabs-2"><i class="fa-solid fa-arrow-up-wide-short fa-beat"></i> Dim/Brightness</a></li>
|
|
@@ -954,7 +955,27 @@
|
|
|
954
955
|
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
955
956
|
<input type="text" id="node-input-nameLightBrightnessState"
|
|
956
957
|
style="width:190px;margin-left: 5px; text-align: left;">
|
|
958
|
+
</div>
|
|
959
|
+
<div class="form-row">
|
|
960
|
+
<label for="node-input-dimSpeed" style="width:260px">
|
|
961
|
+
<i class="fa fa-bolt"></i> Dim Speed (ms)
|
|
962
|
+
</label>
|
|
963
|
+
<input type="text" id="node-input-dimSpeed" placeholder='Default is 5000' style="width:210px">
|
|
957
964
|
</div>
|
|
965
|
+
<div class="form-row">
|
|
966
|
+
<label for="node-input-minDimLevelLight" style="width:260px;">
|
|
967
|
+
<i class="fa fa-clone"></i> Min Dim Brightness
|
|
968
|
+
</label>
|
|
969
|
+
<select id="node-input-minDimLevelLight">
|
|
970
|
+
<option value="useHueLightLevel">Use minimum brightness specified in the HUE light</option>
|
|
971
|
+
</select>
|
|
972
|
+
</div>
|
|
973
|
+
<div class="form-row">
|
|
974
|
+
<label for="node-input-maxDimLevelLight" style="width:260px;">
|
|
975
|
+
<i class="fa fa-clone"></i> Max Dim Brightness
|
|
976
|
+
</label>
|
|
977
|
+
<select id="node-input-maxDimLevelLight"></select>
|
|
978
|
+
</div>
|
|
958
979
|
</p>
|
|
959
980
|
</div>
|
|
960
981
|
<div id="tabs-3">
|
|
@@ -1129,102 +1150,82 @@
|
|
|
1129
1150
|
<option value="no">Leave as is (default HUE behaviour)</option>
|
|
1130
1151
|
</select>
|
|
1131
1152
|
</div>
|
|
1132
|
-
<div
|
|
1133
|
-
<label for="node-input-specifySwitchOnBrightness" style="width:260px;">
|
|
1134
|
-
<i class="fa fa-tag"></i> Switch on behaviour
|
|
1135
|
-
</label>
|
|
1136
|
-
<select id="node-input-specifySwitchOnBrightness">
|
|
1137
|
-
<option value="no">None</option>
|
|
1138
|
-
<!-- <option value="temperature">Select temperature and brightness</option>
|
|
1139
|
-
<option value="yes">Select color</option> -->
|
|
1140
|
-
</select>
|
|
1141
|
-
</div>
|
|
1142
|
-
|
|
1143
|
-
<div class="form-row" id="divColorsAtSwitchOn">
|
|
1144
|
-
<label for="node-input-colorAtSwitchOnDayTime" style="width:260px">
|
|
1145
|
-
</label>
|
|
1146
|
-
<input type="hidden" id="node-input-colorAtSwitchOnDayTime">
|
|
1147
|
-
<input type="color" id="colorPickerDay" style="width:260px">
|
|
1148
|
-
<button id="getColorAtSwitchOnDayTimeButton" type="button" class="red-ui-button">Get current</button>
|
|
1149
|
-
</div>
|
|
1150
|
-
<div class="form-row" id="divTemperatureAtSwitchOn" hidden>
|
|
1151
|
-
<label for="node-input-colorAtSwitchOnDayTime" style="width:260px">
|
|
1152
|
-
</label>
|
|
1153
|
-
<select style="width:12%;" id="comboTemperatureAtSwitchOn"></select>
|
|
1154
|
-
<select style="width:25%;" id="comboBrightnessAtSwitchOn"></select>
|
|
1155
|
-
</div>
|
|
1156
|
-
|
|
1157
|
-
<div id="divCCSBoxAtNightLighting">
|
|
1153
|
+
<div id ="divBehaviourBrightness">
|
|
1158
1154
|
<div class="form-row">
|
|
1159
|
-
<label for="node-input-
|
|
1160
|
-
<i class="fa fa-
|
|
1155
|
+
<label for="node-input-specifySwitchOnBrightness" style="width:260px;">
|
|
1156
|
+
<i class="fa fa-tag"></i> Switch on behaviour
|
|
1161
1157
|
</label>
|
|
1162
|
-
<select id="node-input-
|
|
1163
|
-
<option value="no">
|
|
1158
|
+
<select id="node-input-specifySwitchOnBrightness">
|
|
1159
|
+
<option value="no">None</option>
|
|
1164
1160
|
<!-- <option value="temperature">Select temperature and brightness</option>
|
|
1165
1161
|
<option value="yes">Select color</option> -->
|
|
1166
1162
|
</select>
|
|
1167
1163
|
</div>
|
|
1168
1164
|
|
|
1169
|
-
<div id="
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
<
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1165
|
+
<div class="form-row" id="divColorsAtSwitchOn">
|
|
1166
|
+
<label for="node-input-colorAtSwitchOnDayTime" style="width:260px">
|
|
1167
|
+
</label>
|
|
1168
|
+
<input type="hidden" id="node-input-colorAtSwitchOnDayTime">
|
|
1169
|
+
<input type="color" id="colorPickerDay" style="width:260px">
|
|
1170
|
+
<button id="getColorAtSwitchOnDayTimeButton" type="button" class="red-ui-button">Get current</button>
|
|
1171
|
+
</div>
|
|
1172
|
+
<div class="form-row" id="divTemperatureAtSwitchOn" hidden>
|
|
1173
|
+
<label for="node-input-colorAtSwitchOnDayTime" style="width:260px">
|
|
1174
|
+
</label>
|
|
1175
|
+
<select style="width:12%;" id="comboTemperatureAtSwitchOn"></select>
|
|
1176
|
+
<select style="width:25%;" id="comboBrightnessAtSwitchOn"></select>
|
|
1177
|
+
</div>
|
|
1182
1178
|
|
|
1179
|
+
<div id="divCCSBoxAtNightLighting">
|
|
1183
1180
|
<div class="form-row">
|
|
1184
|
-
<label for="node-input-
|
|
1185
|
-
|
|
1186
|
-
<label for="node-input-GADaylightSensor" style="width:20px;">GA</label>
|
|
1187
|
-
<input type="text" id="node-input-GADaylightSensor" placeholder="Ex: 1/1/1"
|
|
1188
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1189
|
-
|
|
1190
|
-
<label for="node-input-dptDaylightSensor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1191
|
-
<select id="node-input-dptDaylightSensor" style="width:140px;"></select>
|
|
1192
|
-
|
|
1193
|
-
<label for="node-input-nameDaylightSensor" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1194
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1195
|
-
<input type="text" id="node-input-nameDaylightSensor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1196
|
-
</div>
|
|
1197
|
-
<div class="form-row">
|
|
1198
|
-
<label style="width:170px" for="node-input-invertDayNight">
|
|
1199
|
-
<i class="fa fa-shuffle"></i> Invert day/night values
|
|
1181
|
+
<label for="node-input-enableDayNightLighting" style="width:260px;">
|
|
1182
|
+
<i class="fa fa-clone"></i> Night Lighting
|
|
1200
1183
|
</label>
|
|
1201
|
-
<
|
|
1202
|
-
|
|
1184
|
+
<select id="node-input-enableDayNightLighting">
|
|
1185
|
+
<option value="no">No night lighting</option>
|
|
1186
|
+
<!-- <option value="temperature">Select temperature and brightness</option>
|
|
1187
|
+
<option value="yes">Select color</option> -->
|
|
1188
|
+
</select>
|
|
1189
|
+
</div>
|
|
1190
|
+
|
|
1191
|
+
<div id="divEnableDayNightLighting">
|
|
1192
|
+
|
|
1193
|
+
<div class="form-row" id="divColorsAtSwitchOnNightTime">
|
|
1194
|
+
<label for="node-input-colorAtSwitchOnNightTime" style="width:260px"></label>
|
|
1195
|
+
<input type="hidden" id="node-input-colorAtSwitchOnNightTime">
|
|
1196
|
+
<input type="color" id="colorPickerNight" style="width:260px">
|
|
1197
|
+
<button id="getColorAtSwitchOnNightTimeButton" type="button" class="red-ui-button">Get current</button>
|
|
1198
|
+
</div>
|
|
1199
|
+
<div class="form-row" id="divTemperatureAtSwitchOnNightTime" hidden>
|
|
1200
|
+
<label for="node-input-colorAtSwitchOnNightTime" style="width:260px"></label>
|
|
1201
|
+
<select style="width:25%;" id="comboTemperatureAtSwitchOnNightTime"></select>
|
|
1202
|
+
<select style="width:25%;" id="comboBrightnessAtSwitchOnNightTime"></select>
|
|
1203
|
+
</div>
|
|
1204
|
+
|
|
1205
|
+
<div class="form-row">
|
|
1206
|
+
<label for="node-input-nameDaylightSensor" style="width:110px;"><i class="fa fa-clock-o"></i>
|
|
1207
|
+
Day/Night</label>
|
|
1208
|
+
<label for="node-input-GADaylightSensor" style="width:20px;">GA</label>
|
|
1209
|
+
<input type="text" id="node-input-GADaylightSensor" placeholder="Ex: 1/1/1"
|
|
1210
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1211
|
+
|
|
1212
|
+
<label for="node-input-dptDaylightSensor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1213
|
+
<select id="node-input-dptDaylightSensor" style="width:140px;"></select>
|
|
1214
|
+
|
|
1215
|
+
<label for="node-input-nameDaylightSensor" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1216
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1217
|
+
<input type="text" id="node-input-nameDaylightSensor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1218
|
+
</div>
|
|
1219
|
+
<div class="form-row">
|
|
1220
|
+
<label style="width:170px" for="node-input-invertDayNight">
|
|
1221
|
+
<i class="fa fa-shuffle"></i> Invert day/night values
|
|
1222
|
+
</label>
|
|
1223
|
+
<input type="checkbox" id="node-input-invertDayNight"
|
|
1224
|
+
style="display:inline-block; width:auto; vertical-align:top;" />
|
|
1225
|
+
</div>
|
|
1203
1226
|
</div>
|
|
1204
1227
|
</div>
|
|
1205
|
-
|
|
1206
|
-
<br />
|
|
1207
|
-
<div class="form-row">
|
|
1208
|
-
<label for="node-input-dimSpeed" style="width:260px">
|
|
1209
|
-
<i class="fa fa-bolt"></i> Dim Speed (ms)
|
|
1210
|
-
</label>
|
|
1211
|
-
<input type="text" id="node-input-dimSpeed" placeholder='Default is 5000' style="width:260px">
|
|
1212
|
-
</div>
|
|
1213
|
-
<div id ="divMinMaxBrightness">
|
|
1214
|
-
<div class="form-row">
|
|
1215
|
-
<label for="node-input-minDimLevelLight" style="width:260px;">
|
|
1216
|
-
<i class="fa fa-clone"></i> Min Dim Brightness
|
|
1217
|
-
</label>
|
|
1218
|
-
<select id="node-input-minDimLevelLight">
|
|
1219
|
-
<option value="useHueLightLevel">Use minimum brightness specified in the HUE light</option>
|
|
1220
|
-
</select>
|
|
1221
|
-
</div>
|
|
1222
|
-
<div class="form-row">
|
|
1223
|
-
<label for="node-input-maxDimLevelLight" style="width:260px;">
|
|
1224
|
-
<i class="fa fa-clone"></i> Max Dim Brightness
|
|
1225
|
-
</label>
|
|
1226
|
-
<select id="node-input-maxDimLevelLight"></select>
|
|
1227
|
-
</div>
|
|
1228
|
+
<br/>
|
|
1228
1229
|
</div>
|
|
1229
1230
|
<div class="form-row">
|
|
1230
1231
|
<label for="node-input-enableNodePINS" style="width:260px;">
|
|
@@ -1279,7 +1280,10 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
1279
1280
|
|--|--|
|
|
1280
1281
|
| Control | Relative DIM the HUE light. You can set the dimming speed in the **_Behaviour_** tab. |
|
|
1281
1282
|
| Control % | Changes the absolute HUE light's brightness (0-100%)|
|
|
1282
|
-
| Status| Link this to the light's brightness status group address |
|
|
1283
|
+
| Status| Link this to the light's brightness status KNX group address |
|
|
1284
|
+
| Dim Speed (ms) | The dimming speed, in Milliseconds. This applies to the **light** and also to the **tunable white** dimming datapoints. It' calculated from 0% to 100%. |
|
|
1285
|
+
| Min Dim brightness | Tha Minimum brightness that the lamp can reach. For example, if you are dimming the light down, the light will stop dimming at the specified brightness %. |
|
|
1286
|
+
| Max Dim brightness | Tha Maximum brightness that the lamp can reach. For example, if you are dimming the light up, the light will stop dimming at the specified brightness %. |
|
|
1283
1287
|
|
|
1284
1288
|
<br/>
|
|
1285
1289
|
|
|
@@ -1319,9 +1323,6 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
1319
1323
|
| 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.|
|
|
1320
1324
|
| Day/Night | Select the group address used to set the day/night behaviour. The group address value is _true_ if daytime, _false_ if nighttime. |
|
|
1321
1325
|
| Invert day/night values | Invert the values of _Day/Night_ group address. Default value is **unchecked**. |
|
|
1322
|
-
| Dim Speed (ms) | The dimming speed, in Milliseconds. This applies to the **light** and also to the **tunable white** dimming datapoints. It' calculated from 0% to 100%. |
|
|
1323
|
-
| Min Dim brightness | Tha Minimum brightness that the lamp can reach. For example, if you are dimming the light down, the light will stop dimming at the specified brightness %. |
|
|
1324
|
-
| Max Dim brightness | Tha Maximum brightness that the lamp can reach. For example, if you are dimming the light up, the light will stop dimming at the specified brightness %. |
|
|
1325
1326
|
| Read status at startup | Read the status at startup and emit the event to the KNX bus at startup/reconnection. (Default "no")|
|
|
1326
1327
|
| Node Input/Output PINs | Hide or show the input/output PINs. Input/output PINS allow the node to accept msg input from the flow and send msg output to the flow. Input msg must follow the HUE API v.2 Standards. This is an example msg, that turns on the light: <code>msg.on = {"on":true}</code>. Please refer to the [official HUE Api page](https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_light__id__put) |
|
|
1327
1328
|
### Note
|
|
@@ -115,7 +115,7 @@ module.exports = function (RED) {
|
|
|
115
115
|
if (node.isGrouped_light === false && node.HUEDeviceWhileDaytime !== null) {
|
|
116
116
|
// The DayNight has switched into day, so restore the previous light status
|
|
117
117
|
state = { on: { on: true }, dimming: node.HUEDeviceWhileDaytime.dimming, color: node.HUEDeviceWhileDaytime.color, color_temperature: node.HUEDeviceWhileDaytime.color_temperature };
|
|
118
|
-
if (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
|
|
118
|
+
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
|
|
119
119
|
node.serverHue.hueManager.writeHueQueueAdd(node.hueDevice, state, node.isGrouped_light === false ? "setLight" : "setGroupedLight");
|
|
120
120
|
node.setNodeStatusHue({
|
|
121
121
|
fill: "green",
|
|
@@ -142,7 +142,7 @@ module.exports = function (RED) {
|
|
|
142
142
|
// Failsafe all on
|
|
143
143
|
state = { on: { on: true }, dimming: element.dimming, color: element.color, color_temperature: element.color_temperature };
|
|
144
144
|
}
|
|
145
|
-
if (element.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
|
|
145
|
+
if (element.color_temperature !== undefined && element.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
|
|
146
146
|
node.serverHue.hueManager.writeHueQueueAdd(element.id, state, "setLight");
|
|
147
147
|
}
|
|
148
148
|
node.setNodeStatusHue({
|
|
@@ -502,15 +502,21 @@ module.exports = function (RED) {
|
|
|
502
502
|
if (node.brightnessStep === null || node.brightnessStep === undefined) node.brightnessStep = node.currentHUEDevice.dimming.brightness || 50;
|
|
503
503
|
node.brightnessStep = Math.ceil(Number(node.brightnessStep));
|
|
504
504
|
|
|
505
|
-
// Set the speed
|
|
506
|
-
_dimSpeedInMillisecs /= numStep;
|
|
507
|
-
numStep = Math.round((config.maxDimLevelLight - config.minDimLevelLight) / numStep, 0);
|
|
508
|
-
|
|
509
505
|
// We have also minDimLevelLight and maxDimLevelLight to take care of.
|
|
510
|
-
let minDimLevelLight
|
|
511
|
-
if (config.minDimLevelLight ===
|
|
506
|
+
let minDimLevelLight;
|
|
507
|
+
if (config.minDimLevelLight === undefined) {
|
|
508
|
+
minDimLevelLight = 10;
|
|
509
|
+
} else if (config.minDimLevelLight === "useHueLightLevel") {
|
|
510
|
+
minDimLevelLight = node.currentHUEDevice.dimming.min_dim_level === undefined ? 10 : node.currentHUEDevice.dimming.min_dim_level;
|
|
511
|
+
} else {
|
|
512
|
+
minDimLevelLight = Number(config.minDimLevelLight);
|
|
513
|
+
}
|
|
512
514
|
const maxDimLevelLight = config.maxDimLevelLight === undefined ? 100 : Number(config.maxDimLevelLight);
|
|
513
515
|
|
|
516
|
+
// Set the speed
|
|
517
|
+
_dimSpeedInMillisecs /= numStep;
|
|
518
|
+
numStep = Math.round((maxDimLevelLight - minDimLevelLight) / numStep, 0);
|
|
519
|
+
|
|
514
520
|
if (_KNXbrightness_Direction > 0 && _KNXaction === 1) {
|
|
515
521
|
// DIM UP
|
|
516
522
|
if (node.timerStepDim !== undefined) clearInterval(node.timerStepDim);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=16.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.2.
|
|
6
|
+
"version": "2.2.39",
|
|
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",
|