node-red-contrib-knx-ultimate 2.2.22 → 2.2.24
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,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
-
**Version 2.2.
|
|
9
|
+
**Version 2.2.24** - November 2023<br/>
|
|
10
10
|
- HUE Light: added DPT 9.002 for direct kelvin selection, with HUE range (2000K-6535K). There is another DPT 7.600 with the KNX scale (0K-6553K) avaiable.<br/>
|
|
11
11
|
- NEW: HUE Light: now you can choose the "switch on" behaviour between color and temperature (in Kelvin) + brightness.<br/>
|
|
12
12
|
- The fontawesome JS is now locally referenced.<br/>
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
GALightKelvinState: { value: "" },
|
|
74
74
|
dptLightKelvinState: { value: "" },
|
|
75
75
|
|
|
76
|
-
specifySwitchOnBrightness: { value: "
|
|
77
|
-
colorAtSwitchOnDayTime: { value: '{"
|
|
76
|
+
specifySwitchOnBrightness: { value: "temperature" },
|
|
77
|
+
colorAtSwitchOnDayTime: { value: '{"kelvin":3000, "brightness":100 }' },
|
|
78
78
|
|
|
79
79
|
enableDayNightLighting: { value: "no" },
|
|
80
|
-
colorAtSwitchOnNightTime: { value: '{"
|
|
80
|
+
colorAtSwitchOnNightTime: { value: '{ "kelvin":2700, "brightness":20 }' },
|
|
81
81
|
|
|
82
82
|
invertDayNight: { value: false },
|
|
83
83
|
|
|
@@ -454,6 +454,8 @@
|
|
|
454
454
|
|
|
455
455
|
// Calculate kelvin/color
|
|
456
456
|
let json;
|
|
457
|
+
this.colorAtSwitchOnDayTime = this.colorAtSwitchOnDayTime.replace("geen", "green"); // Old bug in "geen" property
|
|
458
|
+
this.colorAtSwitchOnNightTime = this.colorAtSwitchOnNightTime.replace("geen", "green"); // Old bug in "geen" property
|
|
457
459
|
try {
|
|
458
460
|
json = JSON.parse(this.colorAtSwitchOnDayTime);
|
|
459
461
|
} catch (error) { }
|
|
@@ -461,13 +463,19 @@
|
|
|
461
463
|
// Kelvin
|
|
462
464
|
$("#comboTemperatureAtSwitchOn").val(json.kelvin);
|
|
463
465
|
$("#comboBrightnessAtSwitchOn").val(json.brightness);
|
|
466
|
+
if (this.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('temperature'); // Adjust in case of mismatch (from old geen bug)
|
|
464
467
|
} else if (json !== undefined && json.red !== undefined) {
|
|
465
468
|
// Must transform RGB into HTML HEX color
|
|
466
|
-
|
|
469
|
+
try {
|
|
470
|
+
$("#node-input-colorAtSwitchOnDayTime").val("#" + rgbHex(json.red, json.green, json.blue));
|
|
471
|
+
} catch (error) {
|
|
472
|
+
}
|
|
467
473
|
$("#colorPickerDay").val($("#node-input-colorAtSwitchOnDayTime").val());
|
|
474
|
+
if (this.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
468
475
|
} else {
|
|
469
476
|
// It's already an HEX color
|
|
470
477
|
$("#colorPickerDay").val(this.colorAtSwitchOnDayTime);
|
|
478
|
+
if (this.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
471
479
|
}
|
|
472
480
|
//Night
|
|
473
481
|
json = undefined;
|
|
@@ -478,15 +486,22 @@
|
|
|
478
486
|
// Kelvin
|
|
479
487
|
$("#comboTemperatureAtSwitchOnNightTime").val(json.kelvin);
|
|
480
488
|
$("#comboBrightnessAtSwitchOnNightTime").val(json.brightness);
|
|
489
|
+
if (this.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('temperature'); // Adjust in case of mismatch (from old geen bug)
|
|
481
490
|
} else if (json !== undefined && json.red !== undefined) {
|
|
482
491
|
// Must transform RGB into HTML HEX color
|
|
483
|
-
|
|
492
|
+
try {
|
|
493
|
+
$("#node-input-colorAtSwitchOnNightTime").val("#" + rgbHex(json.red, json.green, json.blue));
|
|
494
|
+
} catch (error) {
|
|
495
|
+
}
|
|
484
496
|
$("#colorPickerNight").val($("#node-input-colorAtSwitchOnNightTime").val());
|
|
497
|
+
if (this.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
485
498
|
} else {
|
|
486
499
|
// It's already an HEX color
|
|
487
500
|
$("#colorPickerNight").val(this.colorAtSwitchOnNightTime);
|
|
501
|
+
if (this.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
488
502
|
}
|
|
489
503
|
|
|
504
|
+
|
|
490
505
|
$("#comboTemperatureAtSwitchOn, #comboBrightnessAtSwitchOn").on("change", function () {
|
|
491
506
|
$("#node-input-colorAtSwitchOnDayTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOn").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOn").val() + ' }');
|
|
492
507
|
});
|
|
@@ -35,10 +35,12 @@ module.exports = function (RED) {
|
|
|
35
35
|
node.isGrouped_light = config.hueDevice.split("#")[1] === "grouped_light";
|
|
36
36
|
node.hueDevice = config.hueDevice.split("#")[0];
|
|
37
37
|
node.initializingAtStart = (config.readStatusAtStartup === undefined || config.readStatusAtStartup === "yes");
|
|
38
|
-
config.specifySwitchOnBrightness === undefined ? "
|
|
38
|
+
config.specifySwitchOnBrightness = (config.specifySwitchOnBrightness === undefined || config.specifySwitchOnBrightness === '') ? "temperature" : config.specifySwitchOnBrightness;
|
|
39
|
+
config.specifySwitchOnBrightnessNightTime = (config.specifySwitchOnBrightnessNightTime === undefined || config.specifySwitchOnBrightnessNightTime === '') ? "no" : config.specifySwitchOnBrightnessNightTime;
|
|
39
40
|
config.colorAtSwitchOnDayTime = (config.colorAtSwitchOnDayTime === '' || config.colorAtSwitchOnDayTime === undefined) ? '{ "kelvin":3000, "brightness":100 }' : config.colorAtSwitchOnDayTime;
|
|
40
41
|
config.colorAtSwitchOnNightTime = (config.colorAtSwitchOnNightTime === '' || config.colorAtSwitchOnNightTime === undefined) ? '{ "kelvin":2700, "brightness":20 }' : config.colorAtSwitchOnNightTime;
|
|
41
|
-
|
|
42
|
+
config.colorAtSwitchOnDayTime = config.colorAtSwitchOnDayTime.replace("geen", "green");
|
|
43
|
+
config.colorAtSwitchOnNightTime = config.colorAtSwitchOnNightTime.replace("geen", "green");
|
|
42
44
|
// Transform HEX in RGB and stringified json in json oblects.
|
|
43
45
|
if (config.colorAtSwitchOnDayTime.indexOf("#") !== -1) {
|
|
44
46
|
// Transform to rgb.
|
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.24",
|
|
7
7
|
"description": "Control your KNX intallation via Node-Red! Single Node KNX IN/OUT with optional ETS group address importer. Easy to use and highly configurable. With integrated Philips HUE devices control.",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"binary-parser": "2.2.1",
|