node-red-contrib-knx-ultimate 2.2.6 → 2.2.10
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 +15 -0
- package/nodes/hue-config.js +21 -20
- package/nodes/knxUltimate-config.html +3 -3
- package/nodes/knxUltimate-config.js +1 -1
- package/nodes/knxUltimateHueBattery.html +1 -1
- package/nodes/knxUltimateHueButton.html +1 -10
- package/nodes/knxUltimateHueButton.js +1 -1
- package/nodes/knxUltimateHueLight.html +548 -483
- package/nodes/knxUltimateHueLight.js +75 -35
- package/nodes/knxUltimateHueLightSensor.html +1 -1
- package/nodes/knxUltimateHueMotion.html +1 -11
- package/nodes/knxUltimateHueMotion.js +1 -1
- package/nodes/knxUltimateHueScene.html +32 -9
- package/nodes/knxUltimateHueScene.js +28 -22
- package/nodes/knxUltimateHueTapDial.html +1 -13
- package/nodes/knxUltimateHueTapDial.js +1 -1
- package/nodes/knxUltimateHueTemperatureSensor.html +11 -11
- package/nodes/knxUltimateSceneController.js +4 -5
- package/nodes/utils/hueColorConverter.js +2 -0
- package/package.json +1 -1
- package/resources/11f26b4500.js +2 -0
- package/resources/iro@5 +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,14 +6,29 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
<b>Version 2.2.10</b> - November 2023<br/>
|
|
10
|
+
<p>
|
|
11
|
+
- NEW: Hue Light: you can now enable the input/output PINs and send/receive commands to/from the light, via the msg flow, like msg.on={"on":true}. The option is "Node Input/Output PINs".<br/>
|
|
12
|
+
- NEW: Hue Scene: you can now enable the input/output PINs and send/receive commands to/from the light, via the msg flow. The option is "Node Input/Output PINs".<br/>
|
|
13
|
+
</p>
|
|
14
|
+
<b>Version 2.2.9</b> - November 2023<br/>
|
|
15
|
+
<p>
|
|
16
|
+
- Fixed errors in Iobroker.<br/>
|
|
17
|
+
- HUE Light: NEW: color selection show now the temperature in kelvin.<br/>
|
|
18
|
+
- HUE Light: NEW: Tunable White: added control and status in kelvin (DPT 7.600). This is in BETA testing.<br/>
|
|
19
|
+
- Removed some options in button and scene nodes, because they are unnecessary.<br/>
|
|
20
|
+
</p>
|
|
9
21
|
<b>Version 2.2.6</b> - October 2023<br/>
|
|
22
|
+
<p>
|
|
10
23
|
- Fix: fixed HUE button sending a KNX telegram at startup. Fixed also other nodes.<br/>
|
|
11
24
|
- HUE Nodes: added the option to inizialize at startup or not.<br/>
|
|
12
25
|
</p>
|
|
26
|
+
<p>
|
|
13
27
|
<b>Version 2.2.5</b> - October 2023<br/>
|
|
14
28
|
- Fix: fixed some HUE nodes not able to register to the event notification service.<br/>
|
|
15
29
|
- Restyle GUI of KNX Device node.<br/>
|
|
16
30
|
</p>
|
|
31
|
+
<p>
|
|
17
32
|
<b>Version 2.2.4</b> - October 2023<br/>
|
|
18
33
|
- HUE Light: fixed some status hiccups and better handling of async hue bridge functions.<br/>
|
|
19
34
|
</p>
|
package/nodes/hue-config.js
CHANGED
|
@@ -91,14 +91,15 @@ module.exports = (RED) => {
|
|
|
91
91
|
});
|
|
92
92
|
// Connected
|
|
93
93
|
node.hueManager.on("connected", () => {
|
|
94
|
-
(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
(async () => {
|
|
96
|
+
try {
|
|
97
|
+
await node.loadResourcesFromHUEBridge(); // Then, you can use node.getResources, that works locally and doesn't query the HUE Bridge.
|
|
98
|
+
} catch (error) {
|
|
99
|
+
if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error("hue-Config node.hueManager.on('connected' " + error.message);
|
|
100
|
+
}
|
|
101
|
+
})();
|
|
102
|
+
}, 10000);
|
|
102
103
|
});
|
|
103
104
|
};
|
|
104
105
|
|
|
@@ -113,24 +114,24 @@ module.exports = (RED) => {
|
|
|
113
114
|
if (node.nodeClientsAwaitingInit !== undefined) {
|
|
114
115
|
// Because the whole process is async, if the function await node.hueManager.hueApiV2.get("/resource") has not jet been called or is late,
|
|
115
116
|
// the node/nodes belonging to this server, has been previously added to the nodeClientsAwaitingInit list.
|
|
116
|
-
node.nodeClientsAwaitingInit.forEach((
|
|
117
|
-
node.nodeClients.push(
|
|
117
|
+
node.nodeClientsAwaitingInit.forEach((_node) => {
|
|
118
|
+
node.nodeClients.push(_node);
|
|
118
119
|
});
|
|
119
120
|
node.nodeClientsAwaitingInit = [];
|
|
120
121
|
}
|
|
121
|
-
node.nodeClients.forEach((
|
|
122
|
-
if (
|
|
123
|
-
const oHUEDevice = node.hueAllResources.filter((a) => a.id ===
|
|
122
|
+
node.nodeClients.forEach((_node) => {
|
|
123
|
+
if (_node.hueDevice !== undefined && node.hueAllResources !== undefined) {
|
|
124
|
+
const oHUEDevice = node.hueAllResources.filter((a) => a.id === _node.hueDevice)[0];
|
|
124
125
|
if (oHUEDevice !== undefined) {
|
|
125
126
|
// Add _Node to the clients array
|
|
126
|
-
|
|
127
|
+
_node.setNodeStatusHue({
|
|
127
128
|
fill: "green",
|
|
128
129
|
shape: "ring",
|
|
129
|
-
text: "Ready :-)",
|
|
130
|
+
text: "Ready from awaiting list :-)",
|
|
130
131
|
});
|
|
131
|
-
nodeClient.currentHUEDevice = oHUEDevice;
|
|
132
132
|
oHUEDevice.initializingAtStart = true; // Signalling first connection after restart.
|
|
133
|
-
|
|
133
|
+
_node.currentHUEDevice = oHUEDevice;
|
|
134
|
+
_node.handleSendHUE(oHUEDevice);
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
});
|
|
@@ -274,11 +275,11 @@ module.exports = (RED) => {
|
|
|
274
275
|
|
|
275
276
|
node.addClient = (_Node) => {
|
|
276
277
|
// Update the node hue device, as soon as a node register itself to hue-config nodeClients
|
|
277
|
-
if (node.hueAllResources !== null) {
|
|
278
|
+
if (node.hueAllResources !== undefined && node.hueAllResources !== null) {
|
|
278
279
|
if (node.nodeClients.filter((x) => x.id === _Node.id).length === 0) { // At first start, due to the async method for retrieving hueAllResources, hueAllResources is still null. The first start is handled in node.hueManager.on("connected")
|
|
279
280
|
const oHUEDevice = node.hueAllResources.filter((a) => a.id === _Node.hueDevice)[0];
|
|
280
|
-
_Node.currentHUEDevice = oHUEDevice;
|
|
281
281
|
oHUEDevice.initializingAtStart = true; // Signalling first connection after restart.
|
|
282
|
+
_Node.currentHUEDevice = oHUEDevice;
|
|
282
283
|
_Node.handleSendHUE(oHUEDevice);
|
|
283
284
|
node.nodeClients.push(_Node);
|
|
284
285
|
// Add _Node to the clients array
|
|
@@ -295,7 +296,7 @@ module.exports = (RED) => {
|
|
|
295
296
|
_Node.setNodeStatusHue({
|
|
296
297
|
fill: "grey",
|
|
297
298
|
shape: "dot",
|
|
298
|
-
text: "
|
|
299
|
+
text: "I'm gointo to init awaiting list.",
|
|
299
300
|
});
|
|
300
301
|
}
|
|
301
302
|
}
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
// 14/08/2021 Elimino il file delle persistenze di questo nodo
|
|
114
|
-
$.getJSON("deletePersistGAFile?nodeID=" + node.id, (data) => {});
|
|
114
|
+
$.getJSON("deletePersistGAFile?nodeID=" + node.id, (data) => { });
|
|
115
115
|
|
|
116
116
|
// 06/07/2023 Tabs
|
|
117
117
|
// *****************************
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.ui-tabs .ui-tabs-nav .ui-state-active {
|
|
181
|
-
background: transparent
|
|
181
|
+
background: transparent no-repeat bottom center;
|
|
182
182
|
border: none;
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
<i class="fa fa-tag"></i>
|
|
202
202
|
<span data-i18n="knxUltimate-config.properties.node-config-input-name"></span>
|
|
203
203
|
</label>
|
|
204
|
-
<input type="text" id="node-config-input-name"
|
|
204
|
+
<input type="text" id="node-config-input-name" >Name
|
|
205
205
|
</div>
|
|
206
206
|
|
|
207
207
|
<div class="form-row">
|
|
@@ -2110,7 +2110,7 @@ return msg;`,
|
|
|
2110
2110
|
node.allowLauch_initKNXConnection = true; // Next cycle, launch initKNXConnection, so it pauses more and leave more time
|
|
2111
2111
|
const t = setTimeout(() => {
|
|
2112
2112
|
// 21/03/2022 fixed possible memory leak. Previously was setTimeout without "let t = ".
|
|
2113
|
-
node.setAllClientsStatus("
|
|
2113
|
+
node.setAllClientsStatus("Retry connection", "grey", "");
|
|
2114
2114
|
}, 1000);
|
|
2115
2115
|
if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.debug(
|
|
2116
2116
|
"knxUltimate-config: Waiting next cycle to reconect. node.LinkStatus: " + node.linkStatus + ", node.autoReconnect:" + node.autoReconnect,
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
|
|
228
228
|
|
|
229
229
|
</script>
|
|
230
|
-
<script src="
|
|
230
|
+
<script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
|
|
231
231
|
|
|
232
232
|
<script type="text/markdown" data-help-name="knxUltimateHueBattery">
|
|
233
233
|
This node lets you get the battery level from your HUE device. Here you can get the HUE battery level events, that represents a percentage 0-100% value, evetytime the
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
nameshort_releaseStatus: { value: "" },
|
|
20
20
|
GAshort_releaseStatus: { value: "" },
|
|
21
21
|
dptshort_releaseStatus: { value: "1.001" },
|
|
22
|
-
readStatusAtStartup: { value: "no" },
|
|
23
22
|
|
|
24
23
|
toggleValues: { value: true },
|
|
25
24
|
hueDevice: { value: "" }
|
|
@@ -397,13 +396,6 @@
|
|
|
397
396
|
Toggle values
|
|
398
397
|
</label>
|
|
399
398
|
</div>
|
|
400
|
-
<div class="form-row">
|
|
401
|
-
<label style="width:180px" for="node-input-readStatusAtStartup"><i class="fa fa-play-circle"></i> Read status at startup</label>
|
|
402
|
-
<select id="node-input-readStatusAtStartup">
|
|
403
|
-
<option value="no">No</option>
|
|
404
|
-
<option value="yes">Yes, and emit KNX telegrams.</option>
|
|
405
|
-
</select>
|
|
406
|
-
</div>
|
|
407
399
|
|
|
408
400
|
|
|
409
401
|
<br/>
|
|
@@ -412,7 +404,7 @@
|
|
|
412
404
|
|
|
413
405
|
|
|
414
406
|
</script>
|
|
415
|
-
<script src="
|
|
407
|
+
<script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
|
|
416
408
|
|
|
417
409
|
<script type="text/markdown" data-help-name="knxUltimateHueButton">
|
|
418
410
|
This node lets you get the events from your HUE button.
|
|
@@ -439,7 +431,6 @@ This allows the internal logic to be aware of external devices, like wall switch
|
|
|
439
431
|
| Switch Status | To allow internal logic to take care of the external KNX devices, for example an external wall switch, you should set this group address |
|
|
440
432
|
| Dim | This event is used either to send DIM (increase/decrease) or true/false commands to the KNX group address |
|
|
441
433
|
| Toggle values | Enable or disable toggling values. If enabled, all values toggles, otherwise, all values are sent as *true* or *increase dim*, to the selected KNX group address |
|
|
442
|
-
| Read status at startup | Read the status at startup and emit the event to the KNX bus at startup/reconnection. (Default "no") |
|
|
443
434
|
|
|
444
435
|
### Outputs
|
|
445
436
|
|
|
@@ -78,7 +78,7 @@ module.exports = function (RED) {
|
|
|
78
78
|
if (_event.id === config.hueDevice) {
|
|
79
79
|
|
|
80
80
|
// IMPORTANT: exit if no button last_event present.
|
|
81
|
-
if (_event.initializingAtStart === true
|
|
81
|
+
if (_event.initializingAtStart === true) return;
|
|
82
82
|
if (!_event.hasOwnProperty("button") || _event.button.last_event === undefined) return;
|
|
83
83
|
|
|
84
84
|
const knxMsgPayload = {};
|