node-red-contrib-knx-ultimate 2.2.40 → 2.3.0
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 +3 -0
- package/nodes/hue-config.js +3 -2
- package/nodes/knxUltimateHueLight.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
**Version 2.3.0** - Jan 2024<br/>
|
|
10
|
+
- HUE Light: partially rewrote code to cloneDeep(oHUEDevice) not to duplicate the brightness status of a single ligh, at node-red restart. https://github.com/Supergiovane/node-red-contrib-knx-ultimate/issues/312#issue-2064480332 <br/>
|
|
11
|
+
|
|
9
12
|
**Version 2.2.40** - Jan 2024<br/>
|
|
10
13
|
- HUE Light: fixed an issue with initial status read from HUE Bridge (on/off status was incorrectly set).<br/>
|
|
11
14
|
|
package/nodes/hue-config.js
CHANGED
|
@@ -7,6 +7,7 @@ const dptlib = require("../KNXEngine/src/dptlib");
|
|
|
7
7
|
const HueClass = require("./utils/hueEngine").classHUE;
|
|
8
8
|
const loggerEngine = require("./utils/sysLogger");
|
|
9
9
|
const hueColorConverter = require("./utils/hueColorConverter");
|
|
10
|
+
const cloneDeep = require("lodash/cloneDeep");
|
|
10
11
|
|
|
11
12
|
function getRandomIntInclusive(min, max) {
|
|
12
13
|
min = Math.ceil(min);
|
|
@@ -206,7 +207,7 @@ module.exports = (RED) => {
|
|
|
206
207
|
shape: "ring",
|
|
207
208
|
text: "Ready :-)",
|
|
208
209
|
});
|
|
209
|
-
_node.currentHUEDevice = oHUEDevice;
|
|
210
|
+
_node.currentHUEDevice = cloneDeep(oHUEDevice);
|
|
210
211
|
if (_node.initializingAtStart === true) _node.handleSendHUE(oHUEDevice);
|
|
211
212
|
}
|
|
212
213
|
}
|
|
@@ -417,7 +418,7 @@ module.exports = (RED) => {
|
|
|
417
418
|
if (node.hueAllResources !== undefined && node.hueAllResources !== null && _Node.initializingAtStart === true) {
|
|
418
419
|
const oHUEDevice = node.hueAllResources.filter((a) => a.id === _Node.hueDevice)[0];
|
|
419
420
|
if (oHUEDevice !== undefined) {
|
|
420
|
-
_Node.currentHUEDevice = oHUEDevice;
|
|
421
|
+
_Node.currentHUEDevice = cloneDeep(oHUEDevice);
|
|
421
422
|
_Node.handleSendHUE(oHUEDevice);
|
|
422
423
|
// Add _Node to the clients array
|
|
423
424
|
_Node.setNodeStatusHue({
|
|
@@ -667,7 +667,7 @@ module.exports = function (RED) {
|
|
|
667
667
|
// In case of switch off, set the dim to zero
|
|
668
668
|
if (_event.on.on === false && (config.updateKNXBrightnessStatusOnHUEOnOff === undefined || config.updateKNXBrightnessStatusOnHUEOnOff === "onhueoff")) {
|
|
669
669
|
node.updateKNXBrightnessState(0);
|
|
670
|
-
|
|
670
|
+
if (_event.dimming !== undefined) delete _event.dimming; // Remove event.dimming, because has beem handled by this function and i don't want the function below to take care of it.
|
|
671
671
|
} else if (_event.on.on === true && node.currentHUEDevice.on.on === false) {
|
|
672
672
|
// Turn on always update the dimming KNX Status value as well.
|
|
673
673
|
let brightVal = 50;
|
|
@@ -715,7 +715,7 @@ module.exports = function (RED) {
|
|
|
715
715
|
shape: "dot",
|
|
716
716
|
text: `HUE->KNX error ${node.id} ${error.message}. Seee Log`,
|
|
717
717
|
});
|
|
718
|
-
RED.log.error(`knxUltimateHueLight: node.handleSendHUE = (_event): ${error.
|
|
718
|
+
RED.log.error(`knxUltimateHueLight: node.handleSendHUE = (_event): ${error.stack}`);
|
|
719
719
|
}
|
|
720
720
|
};
|
|
721
721
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=16.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.3.0",
|
|
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",
|