node-red-contrib-knx-ultimate 2.2.32 → 2.2.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 +5 -1
- package/nodes/knxUltimateHueLight.js +11 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
**Version 2.2.33** - December 2023<br/>
|
|
10
|
+
- Quickfix: HUE Light: fixed an issue in the conversion of tunable white from Datapint 7.600 to mired and vice versa.<br/>
|
|
11
|
+
- WARNING: the new HUE Scene node is to be considered **BETA (= in testing with user feedback)**.<br/>
|
|
12
|
+
|
|
9
13
|
**Version 2.2.32** - December 2023<br/>
|
|
10
|
-
- Quickfix: HUE Light: fixed an issue in the conversion of tunable white from 9.002 to mired and vice versa.<br/>
|
|
14
|
+
- Quickfix: HUE Light: fixed an issue in the conversion of tunable white from Datapoint 9.002 to mired and vice versa.<br/>
|
|
11
15
|
- WARNING: the new HUE Scene node is to be considered **BETA (= in testing with user feedback)**.<br/>
|
|
12
16
|
|
|
13
17
|
**Version 2.2.31** - December 2023<br/>
|
|
@@ -175,11 +175,15 @@ module.exports = function (RED) {
|
|
|
175
175
|
break;
|
|
176
176
|
case config.GALightKelvin:
|
|
177
177
|
let retMirek;
|
|
178
|
+
let kelvinValue = 0;
|
|
178
179
|
msg.payload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptLightKelvin));
|
|
179
180
|
if (config.dptLightKelvin === "7.600") {
|
|
180
181
|
if (msg.payload > 65535) msg.payload = 65535;
|
|
181
182
|
if (msg.payload < 0) msg.payload = 0;
|
|
182
|
-
|
|
183
|
+
// kelvinValue = hueColorConverter.ColorConverter.mirekToKelvin(_value);
|
|
184
|
+
// knxMsgPayload.payload = hueColorConverter.ColorConverter.scale(kelvinValue, [2000, 6535], [0, 65535]);
|
|
185
|
+
kelvinValue = hueColorConverter.ColorConverter.scale(msg.payload, [0, 65535], [2000, 6535]);
|
|
186
|
+
retMirek = hueColorConverter.ColorConverter.kelvinToMirek(kelvinValue);
|
|
183
187
|
} else if (config.dptLightKelvin === "9.002") {
|
|
184
188
|
// Relative temperature in Kelvin. Use HUE scale.
|
|
185
189
|
if (msg.payload > 6535) msg.payload = 6535;
|
|
@@ -192,7 +196,7 @@ module.exports = function (RED) {
|
|
|
192
196
|
fill: "green",
|
|
193
197
|
shape: "dot",
|
|
194
198
|
text: "KNX->HUE",
|
|
195
|
-
payload:
|
|
199
|
+
payload: kelvinValue,
|
|
196
200
|
});
|
|
197
201
|
break;
|
|
198
202
|
case config.GADaylightSensor:
|
|
@@ -526,7 +530,7 @@ module.exports = function (RED) {
|
|
|
526
530
|
// Output the msg to the flow
|
|
527
531
|
node.send(_event);
|
|
528
532
|
|
|
529
|
-
// // DEBUG
|
|
533
|
+
// // DEBUG testing enable/disable HTML UI Tabs
|
|
530
534
|
//delete _event.dimming;
|
|
531
535
|
//delete _event.color;
|
|
532
536
|
//delete _event.color_temperature;
|
|
@@ -734,12 +738,13 @@ module.exports = function (RED) {
|
|
|
734
738
|
node.updateKNXLightKelvinState = function updateKNXLightKelvinState(_value, _outputtype = "write") {
|
|
735
739
|
if (config.GALightKelvinState !== undefined && config.GALightKelvinState !== "") {
|
|
736
740
|
const knxMsgPayload = {};
|
|
741
|
+
let kelvinValue = 0;
|
|
737
742
|
knxMsgPayload.topic = config.GALightKelvinState;
|
|
738
743
|
knxMsgPayload.dpt = config.dptLightKelvinState;
|
|
739
744
|
if (config.dptLightKelvinState === "7.600") {
|
|
740
|
-
|
|
745
|
+
kelvinValue = hueColorConverter.ColorConverter.mirekToKelvin(_value);
|
|
746
|
+
knxMsgPayload.payload = hueColorConverter.ColorConverter.scale(kelvinValue, [2000, 6535], [0, 65535]);
|
|
741
747
|
} else if (config.dptLightKelvinState === "9.002") {
|
|
742
|
-
//knxMsgPayload.payload = hueColorConverter.ColorConverter.scale(_value, [153, 500], [6535, 2000]);
|
|
743
748
|
knxMsgPayload.payload = hueColorConverter.ColorConverter.mirekToKelvin(_value);
|
|
744
749
|
}
|
|
745
750
|
// Send to KNX bus
|
|
@@ -758,7 +763,7 @@ module.exports = function (RED) {
|
|
|
758
763
|
fill: "blue",
|
|
759
764
|
shape: "ring",
|
|
760
765
|
text: "HUE->KNX Kelvin",
|
|
761
|
-
payload:
|
|
766
|
+
payload: kelvinValue,
|
|
762
767
|
});
|
|
763
768
|
}
|
|
764
769
|
}
|
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.33",
|
|
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",
|