node-red-contrib-knx-ultimate 3.2.9 → 3.2.11

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/KNXUltimateDebugLog.txt +49 -0
  3. package/nodes/commonFunctions.js +18 -1
  4. package/nodes/hue-config.html +10 -0
  5. package/nodes/hue-config.js +3 -4
  6. package/nodes/knxUltimate-config copy.html +10 -0
  7. package/nodes/knxUltimate-config.html +28 -13
  8. package/nodes/knxUltimate-config.js +55 -63
  9. package/nodes/knxUltimate.html +15 -0
  10. package/nodes/knxUltimate.js +22 -28
  11. package/nodes/knxUltimateAlerter.html +10 -0
  12. package/nodes/knxUltimateAutoResponder.html +15 -0
  13. package/nodes/knxUltimateAutoResponder.js +4 -9
  14. package/nodes/knxUltimateGarageDoorBarrierOpener.html +15 -0
  15. package/nodes/knxUltimateGlobalContext.html +15 -0
  16. package/nodes/knxUltimateHATranslator.html +10 -0
  17. package/nodes/knxUltimateHueBattery.html +15 -0
  18. package/nodes/knxUltimateHueButton.html +15 -0
  19. package/nodes/knxUltimateHueContactSensor.html +15 -0
  20. package/nodes/knxUltimateHueLight.html +19 -0
  21. package/nodes/knxUltimateHueLightSensor.html +15 -0
  22. package/nodes/knxUltimateHueMotion.html +15 -0
  23. package/nodes/knxUltimateHueScene.html +15 -0
  24. package/nodes/knxUltimateHueScene.js +4 -11
  25. package/nodes/knxUltimateHueTapDial.html +15 -0
  26. package/nodes/knxUltimateHueTemperatureSensor.html +15 -0
  27. package/nodes/knxUltimateHueZigbeeConnectivity.html +15 -0
  28. package/nodes/knxUltimateHuedevice_software_update.html +15 -0
  29. package/nodes/knxUltimateLoadControl.html +10 -0
  30. package/nodes/knxUltimateLoadControl.js +4 -8
  31. package/nodes/knxUltimateLogger.html +10 -0
  32. package/nodes/knxUltimateSceneController.html +10 -0
  33. package/nodes/knxUltimateSceneController.js +5 -8
  34. package/nodes/knxUltimateViewer.html +15 -0
  35. package/nodes/knxUltimateWatchDog.html +10 -0
  36. package/nodes/utils/hueEngine.js +11 -22
  37. package/nodes/utils/sysLogger.js +101 -18
  38. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
+ **Version 3.2.11** - October 2024<br/>
10
+ - Fixed help texts in various nodes.<br/>
11
+ - When you open a node, the node red's site bar goest into the help panel. Then, it goes into the info panel once closed.<br/>
12
+ - Gather debug infos + log to be pasted into a new gitHub Issue. See the "Utility" TAB of the KNX Gateway config node. See DISCUSSIONS on gitHub.<br/>
13
+
14
+ **Version 3.2.10** - October 2024<br/>
15
+ - Fixed a race condition happening whenever FULL DEPLOY is pressed in the node-red interface, preventing the HUE bridge node to gracefully disconnect from the HUE Bridge.<br/>
16
+
9
17
  **Version 3.2.9** - October 2024<br/>
10
18
  - Maintenance release: added some log to better identify problems.<br/>
11
19
 
@@ -0,0 +1,49 @@
1
+ START LOG FILE --------------------------------------------
2
+ -> 10/5/2024, 12:14:53 PM [knxUltimate <08b25df88e6668d3>] [info] Close: node id 08b25df88e6668d3 with topic 5/6/7 has been removed from the server.
3
+ -> 10/5/2024, 12:14:53 PM [knxUltimate <Universal KNX>] [info] Close: node id 94644e7ae5ca6002 with topic has been removed from the server.
4
+ -> 10/5/2024, 12:14:53 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Disconnect: already not connected:disconnected, node.autoReconnect:true
5
+ -> 10/5/2024, 12:14:53 PM [knxUltimate-config <KNX Gateway senza csv>] [info] KNXClient socket closed.
6
+ -> 10/5/2024, 12:16:37 PM [knxUltimate-config <KNX Gateway senza csv>] NEW LOG SESSION --------------------------------------------
7
+ -> 10/5/2024, 12:16:37 PM [knxUltimate-config <KNX Gateway senza csv>] [info] payload cache set to /Users/massimosaccani/.node-red/knxultimatestorage/knxpersistvalues
8
+ -> 10/5/2024, 12:16:37 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Autoconnection: yes Node KNX Gateway senza csv
9
+ -> 10/5/2024, 12:16:37 PM [knxUltimate <08b25df88e6668d3>] NEW LOG SESSION --------------------------------------------
10
+ -> 10/5/2024, 12:16:37 PM [knxUltimate <Universal KNX>] NEW LOG SESSION --------------------------------------------
11
+ -> 10/5/2024, 12:16:40 PM [knxUltimate <08b25df88e6668d3>] [info] Close: node id 08b25df88e6668d3 with topic 5/6/7 has been removed from the server.
12
+ -> 10/5/2024, 12:16:40 PM [knxUltimate <Universal KNX>] [info] Close: node id 94644e7ae5ca6002 with topic has been removed from the server.
13
+ -> 10/5/2024, 12:16:40 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Disconnect: already not connected:disconnected, node.autoReconnect:true
14
+ -> 10/5/2024, 12:16:40 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Disconnect: already not connected:disconnected, node.autoReconnect:true
15
+ -> 10/5/2024, 12:16:44 PM [knxUltimate-config <KNX Gateway senza csv>] NEW LOG SESSION --------------------------------------------
16
+ -> 10/5/2024, 12:16:44 PM [knxUltimate-config <KNX Gateway senza csv>] [info] payload cache set to /Users/massimosaccani/.node-red/knxultimatestorage/knxpersistvalues
17
+ -> 10/5/2024, 12:16:44 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Autoconnection: yes Node KNX Gateway senza csv
18
+ -> 10/5/2024, 12:16:44 PM [knxUltimate <08b25df88e6668d3>] NEW LOG SESSION --------------------------------------------
19
+ -> 10/5/2024, 12:16:44 PM [knxUltimate <Universal KNX>] NEW LOG SESSION --------------------------------------------
20
+ -> 10/5/2024, 12:16:48 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Auto Reconect by timerKNXUltimateCheckState in progress. node.LinkStatus: disconnected, node.autoReconnect:true
21
+ -> 10/5/2024, 12:16:48 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Bind KNX Bus to interface (Auto). Node KNX Gateway senza csv
22
+ -> 10/5/2024, 12:16:48 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Disconnect: already not connected:disconnected, node.autoReconnect:true
23
+ -> 10/5/2024, 12:16:48 PM [knxUltimate-config <KNX Gateway senza csv>] [info] perform websocket connection on KNX Gateway senza csv
24
+ -> 10/5/2024, 12:16:48 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Connecting... KNX Gateway senza csv
25
+ -> 10/5/2024, 12:16:48 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Connecting to224.0.23.12
26
+ -> 10/5/2024, 12:16:48 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Connected to %o {"physAddr":"15.15.22","connectionKeepAliveTimeout":60,"ipAddr":"224.0.23.12","ipPort":3671,"hostProtocol":"Multicast","isSecureKNXEnabled":false,"suppress_ack_ldatareq":false,"loglevel":"info","localEchoInTunneling":true,"localIPAddress":"192.168.1.198","interface":"","jKNXSecureKeyring":null,"KNXQueueSendIntervalMilliseconds":25}
27
+ -> 10/5/2024, 12:16:49 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Loaded saved GA values 142
28
+ -> 10/5/2024, 12:16:49 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Do DoInitialReadFromKNXBusOrFile
29
+ -> 10/5/2024, 12:16:53 PM [knxUltimate <08b25df88e6668d3>] [info] Close: node id 08b25df88e6668d3 with topic 5/6/7 has been removed from the server.
30
+ -> 10/5/2024, 12:16:53 PM [knxUltimate <Universal KNX>] [info] Close: node id 94644e7ae5ca6002 with topic has been removed from the server.
31
+ -> 10/5/2024, 12:16:53 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Disconnect: already not connected:disconnected, node.autoReconnect:true
32
+ -> 10/5/2024, 12:16:54 PM [knxUltimate-config <KNX Gateway senza csv>] NEW LOG SESSION --------------------------------------------
33
+ -> 10/5/2024, 12:16:54 PM [knxUltimate-config <KNX Gateway senza csv>] [info] payload cache set to /Users/massimosaccani/.node-red/knxultimatestorage/knxpersistvalues
34
+ -> 10/5/2024, 12:16:54 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Autoconnection: yes Node KNX Gateway senza csv
35
+ -> 10/5/2024, 12:16:54 PM [knxUltimate <08b25df88e6668d3>] NEW LOG SESSION --------------------------------------------
36
+ -> 10/5/2024, 12:16:54 PM [knxUltimate <Universal KNX>] NEW LOG SESSION --------------------------------------------
37
+ -> 10/5/2024, 12:16:58 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Auto Reconect by timerKNXUltimateCheckState in progress. node.LinkStatus: disconnected, node.autoReconnect:true
38
+ -> 10/5/2024, 12:16:58 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Bind KNX Bus to interface (Auto). Node KNX Gateway senza csv
39
+ -> 10/5/2024, 12:16:58 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Disconnect: already not connected:disconnected, node.autoReconnect:true
40
+ -> 10/5/2024, 12:16:58 PM [knxUltimate-config <KNX Gateway senza csv>] [info] perform websocket connection on KNX Gateway senza csv
41
+ -> 10/5/2024, 12:16:58 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Connecting... KNX Gateway senza csv
42
+ -> 10/5/2024, 12:16:58 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Connecting to224.0.23.12
43
+ -> 10/5/2024, 12:16:58 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Connected to %o {"physAddr":"15.15.22","connectionKeepAliveTimeout":60,"ipAddr":"224.0.23.12","ipPort":3671,"hostProtocol":"Multicast","isSecureKNXEnabled":false,"suppress_ack_ldatareq":false,"loglevel":"info","localEchoInTunneling":true,"localIPAddress":"192.168.1.198","interface":"","jKNXSecureKeyring":null,"KNXQueueSendIntervalMilliseconds":25}
44
+ -> 10/5/2024, 12:16:59 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Loaded saved GA values 142
45
+ -> 10/5/2024, 12:16:59 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Do DoInitialReadFromKNXBusOrFile
46
+ -> 10/5/2024, 12:22:23 PM [knxUltimate <08b25df88e6668d3>] [info] Close: node id 08b25df88e6668d3 with topic 5/6/7 has been removed from the server.
47
+ -> 10/5/2024, 12:22:23 PM [knxUltimate <Universal KNX>] [info] Close: node id 94644e7ae5ca6002 with topic has been removed from the server.
48
+ -> 10/5/2024, 12:22:23 PM [knxUltimate-config <KNX Gateway senza csv>] [info] Disconnect: already not connected:disconnected, node.autoReconnect:true
49
+ -> 10/5/2024, 12:22:23 PM [knxUltimate-config <KNX Gateway senza csv>] [info] KNXClient socket closed.
@@ -66,11 +66,16 @@ module.exports = (RED) => {
66
66
  try {
67
67
  const serverId = RED.nodes.getNode(req.query.serverId); // Retrieve node.id of the config node.
68
68
  if (serverId.hueAllResources === null || serverId.hueAllResources === undefined) {
69
- res.json({ ready: false });
69
+ (async function main() {
70
+ await serverId.loadResourcesFromHUEBridge();
71
+ res.json({ ready: false });
72
+ }()).catch();
70
73
  } else {
71
74
  res.json({ ready: true });
72
75
  }
73
76
  } catch (error) {
77
+ RED.log.error(`Errore RED.httpAdmin.get('/knxultimateCheckHueConnected' ${error.message}`);
78
+
74
79
  res.json({ ready: false });
75
80
  }
76
81
  });
@@ -302,6 +307,18 @@ module.exports = (RED) => {
302
307
  res.json(jListInterfaces);
303
308
  });
304
309
 
310
+ // 14/08/2019 Endpoint for retrieving the ethernet interfaces
311
+ RED.httpAdmin.get("/KNUltimateGetLogFile", (req, res) => {
312
+ try {
313
+ const log = fs.readFileSync('./KNXUltimateDebugLog.txt')
314
+ res.json(log.toString());
315
+ } catch (error) {
316
+ res.json(error.message);
317
+ }
318
+
319
+ });
320
+
321
+
305
322
  // 12/08/2021 Endpoint for deleting the GA persistent file for the current gateway
306
323
  RED.httpAdmin.get("/deletePersistGAFile", RED.auth.needsPermission("knxUltimate-config.read"), (req, res) => {
307
324
  try {
@@ -14,6 +14,11 @@
14
14
  clientkey: { type: "password" }
15
15
  },
16
16
  oneditprepare: function () {
17
+ // Go to the help panel
18
+ try {
19
+ RED.sidebar.show("help");
20
+ } catch (error) { }
21
+
17
22
 
18
23
  var node = this;
19
24
 
@@ -144,6 +149,11 @@
144
149
  })
145
150
  },
146
151
  oneditsave: function () {
152
+ // Return to the info tab
153
+ try {
154
+ RED.sidebar.show("info");
155
+ } catch (error) { }
156
+
147
157
 
148
158
  },
149
159
  label: function () {
@@ -477,18 +477,17 @@ module.exports = (RED) => {
477
477
  node.on("close", (done) => {
478
478
  try {
479
479
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger = null;
480
- loggerEngine.destroy();
481
480
  node.nodeClients = [];
482
- node.hueManager.removeAllListeners();
481
+ if (node.hueManager !== undefined && node.hueManager !== null) node.hueManager.removeAllListeners();
483
482
  (async () => {
484
483
  try {
485
484
  await node.hueManager.close();
486
485
  node.hueManager = null;
487
486
  delete node.hueManager;
487
+ done();
488
488
  } catch (error) {
489
- /* empty */
489
+ done();
490
490
  }
491
- done();
492
491
  })();
493
492
  } catch (error) {
494
493
  done();
@@ -29,6 +29,11 @@
29
29
  keyringFilePassword: { type: "password" }
30
30
  },
31
31
  oneditprepare: function () {
32
+ // Go to the help panel
33
+ try {
34
+ RED.sidebar.show("help");
35
+ } catch (error) { }
36
+
32
37
  var node = this;
33
38
 
34
39
  // 22/07/2021 Main tab
@@ -113,6 +118,11 @@
113
118
 
114
119
  },
115
120
  oneditsave: function () {
121
+ // Return to the info tab
122
+ try {
123
+ RED.sidebar.show("info");
124
+ } catch (error) { }
125
+
116
126
  var node = this;
117
127
  // Check if the csv file contains errors
118
128
  if (($("#node-config-input-csv").val() != 'undefined' && $("#node-config-input-csv").val() != "") || ($("#node-config-input-keyring").val() != 'undefined' && $("#node-config-input-keyring").val() != "")) {
@@ -28,6 +28,11 @@
28
28
  keyringFilePassword: { type: "password" }
29
29
  },
30
30
  oneditprepare: function () {
31
+ // Go to the help panel
32
+ try {
33
+ RED.sidebar.show("help");
34
+ } catch (error) { }
35
+
31
36
  var node = this;
32
37
 
33
38
  // 22/07/2021 Main tab
@@ -91,8 +96,13 @@
91
96
  for (const [key, value] of Object.entries(node)) {
92
97
  sRetDebugText += (`-> ${key}: ${value}\r`);
93
98
  }
94
- sRetDebugText = 'Open a new github issue and paste this text into it. https://github.com/Supergiovane/node-red-contrib-knx-ultimate/issues/new?assignees=Supergiovane&labels=&template=bug_report.md&title=KNXDebugText\r\r' + sRetDebugText;
95
- $("#debugText").val(sRetDebugText); // Store the config-node);
99
+ // Add log file
100
+ $.getJSON("KNUltimateGetLogFile", (data) => {
101
+ sRetDebugText += "\r\r" + data;
102
+ sRetDebugText = 'INSTRUCTIONS: COPY THE LINK BELOW AND PASTE IT INTO THE ADDRESS BAR OF YOUR BROWSER.\rhttps://github.com/Supergiovane/node-red-contrib-knx-ultimate/issues/new?assignees=Supergiovane&labels=&template=bug_report.md&title=KNXDebugText\r\r THEN PASTE THIS TEXT INTO THE ISSUE\'S BODY, USING THE <> BRACKETS.\r\r' + sRetDebugText;
103
+ $("#debugText").val(sRetDebugText); // Store the config-node);
104
+ });
105
+
96
106
  });
97
107
  $("#getallgaused").click(function () {
98
108
  sRetDebugText = "";
@@ -112,6 +122,11 @@
112
122
 
113
123
  },
114
124
  oneditsave: function () {
125
+ // Return to the info tab
126
+ try {
127
+ RED.sidebar.show("info");
128
+ } catch (error) { }
129
+
115
130
  var node = this;
116
131
  // Check if the csv file contains errors
117
132
  if (($("#node-config-input-csv").val() != 'undefined' && $("#node-config-input-csv").val() != "") || ($("#node-config-input-keyring").val() != 'undefined' && $("#node-config-input-keyring").val() != "")) {
@@ -380,7 +395,7 @@
380
395
  <div id="tabs-4">
381
396
  <p>
382
397
  <div class="form-row">
383
- <label style="width:300px"><i class="fa fa-sign-in"></i> Gather debug info for troubleshoot</label>
398
+ <label style="width:300px"><i class="fa fa-sign-in"></i> Gather debug and log for troubleshoot</label>
384
399
  <input type="button" id="getinfocam" class="ui-button ui-corner-all ui-widget"
385
400
  style="background-color:#AEE1FF;width:150px" value="Read">
386
401
  </div>
@@ -411,22 +426,22 @@
411
426
  **Configuration**
412
427
  |Property|Description|
413
428
  |--|--|
414
- | IP Port | The port. |
415
- | IP Protocol | *Tunnel UDP* is for KNX/IP interfaces, *Multicast UDP* is for KNX/IP Routers. Leave **Auto** for auto detect. |
416
- | Bind to local interface | The Node will use this local interface for communications. Leave "Auto" for automatic selection. If you have more than one lan connection, for example Ethernet and Wifi, it's strongly recommended to manually select the interface, otherwise not all UDP telegram will reach your computer, thus the Node may not work as expected. |
417
- | Automatically connect to KNX BUS at start | Auto connect to the bus at start. You want to leave it enabled. |
418
- | KNX Physical Address | The physical KNX address, example 1.1.200 |
429
+ | IP Port | The port. Default is 3671. |
430
+ | IP Protocol | *Tunnel UDP* is for KNX/IP interfaces, *Multicast UDP* is for KNX/IP Routers. Leave **Auto** for auto detect. Default is "Auto". |
431
+ | KNX Physical Address | The physical KNX address, example 1.1.200. Default is "15.15.22".|
432
+ | Bind to local interface | The Node will use this local interface for communications. Leave "Auto" for automatic selection. If you have more than one lan connection, for example Ethernet and Wifi, it's strongly recommended to manually select the interface, otherwise not all UDP telegram will reach your computer, thus the Node may not work as expected. Default is "Auto". |
433
+ | Automatically connect to KNX BUS at start | Auto connect to the bus at start. Default is "Yes". |
419
434
 
420
435
  <br/>
421
436
 
422
437
  **Advanced**
423
438
  |Property|Description|
424
439
  |--|--|
425
- | Suppress repeated (R-Flag) telegrams fom BUS | Ignore repeated KNX telegrams coming from the bus. |
426
- | Suppress ACK request in tunneling mode | Enable it if you have a very old KNX/IP gateway. You want to leave it disabled. |
427
- | Delay between each telegram (in milliseconds) | Leave it 50ms, unless you're connecting to a remote KNX Gateway via a slow internet connection. |
428
- | and further multiply delay only between -read- telegrams | Multiply the delay for read requests to the KNX bus. Again, for slow KNX Gateways. |
429
- | Loglevel | Log level, in case you need to debug something with the dev. |
440
+ | Echo sent message to all node with same Group Address | Send the msg input coming from the flow, to all nodes having the same group address. The nodes will receive the new msg as if it's coming from the KNX bus. This is useful in case of using the KNX emulation and in case the connection to the KNX bus is not established. **This option will be deprecated in the next version and defaulted to checked.** Default is checked. |
441
+ | Suppress repeated (R-Flag) telegrams fom BUS | Ignore repeated KNX telegrams coming from the bus. Default is unchecked. |
442
+ | Suppress ACK request in tunneling mode | Enable it if you have a very old KNX/IP gateway. It ignores the ACK procedure and accepts all telegrams. Default is unchecked.|
443
+ | Delay between each telegram (in milliseconds) | KNX specs states, that the maximum telegram sending speed is 50 telegrams per second. A speed between 25 and 50ms should be fine, unless you're connecting to a remote KNX Gateway via a slow internet connection (in this case, you should increase the value by, for example, 200 to 500ms or more). |
444
+ | Loglevel | Log level, in case you need to debug something with the dev. Default is "Error", |
430
445
 
431
446
  <br/>
432
447