node-red-contrib-knx-ultimate 1.3.35 → 1.3.38
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/KNXEngine/KNXClient.js +3 -3
- package/README.md +13 -9
- package/img/wiki/circularreferenceprotection.png +0 -0
- package/img/wiki/floodprotection.png +0 -0
- package/nodes/knxUltimate-config.js +84 -35
- package/package.json +6 -12
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,21 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
<p>
|
|
10
|
+
<b>Version 1.3.38</b> - April 2022<br/>
|
|
11
|
+
- Memory footprint decreased.<br/>
|
|
12
|
+
- Better handling of KNX nodes objects array, for flows with more than 250 nodes.<br/>
|
|
13
|
+
</p>
|
|
14
|
+
<p>
|
|
15
|
+
<b>Version 1.3.37</b> - April 2022<br/>
|
|
16
|
+
- Changed: the KNX Gateway don't care anymore for ROUTING_LOST_MESSAGE and ROUTING_BUSY. Previously, it was disconnecting. Now it only advises in LOG.<br/>
|
|
17
|
+
- Updated and beautifullyfied the WIKI.<br/>
|
|
18
|
+
- Totally rewrote the CIRCULAR REFERENCE PROTECTION and FLOOD PROTECTION wiki page, in all languages.<br/>
|
|
19
|
+
</p>
|
|
20
|
+
<p>
|
|
21
|
+
<b>Version 1.3.36</b> - February 2022<br/>
|
|
22
|
+
- Purged unused requires and bumped dependencies versions.<br/>
|
|
23
|
+
</p>
|
|
9
24
|
<p>
|
|
10
25
|
<b>Version 1.3.35</b> - March 2022<br/>
|
|
11
26
|
- Reset handlers by removing/adding every time the connection is set by "new" directive.<br/>
|
package/KNXEngine/KNXClient.js
CHANGED
|
@@ -745,7 +745,7 @@ class KNXClient extends EventEmitter {
|
|
|
745
745
|
|
|
746
746
|
}
|
|
747
747
|
_processInboundMessage(msg, rinfo) {
|
|
748
|
-
|
|
748
|
+
|
|
749
749
|
try {
|
|
750
750
|
// Composing debug string
|
|
751
751
|
try {
|
|
@@ -768,13 +768,13 @@ class KNXClient extends EventEmitter {
|
|
|
768
768
|
if (knxHeader.service_type === KNXConstants.KNX_CONSTANTS.ROUTING_LOST_MESSAGE) {
|
|
769
769
|
try {
|
|
770
770
|
this.emit(KNXClientEvents.error, new Error('ROUTING_LOST_MESSAGE'));
|
|
771
|
-
this._setDisconnected("Routing Lost Message");
|
|
771
|
+
//this._setDisconnected("Routing Lost Message"); // 31/03/2022 Commented, because it doesn't matter. Non need to disconnect.
|
|
772
772
|
return;
|
|
773
773
|
} catch (error) { }
|
|
774
774
|
} else if (knxHeader.service_type === KNXConstants.KNX_CONSTANTS.ROUTING_BUSY) {
|
|
775
775
|
try {
|
|
776
776
|
this.emit(KNXClientEvents.error, new Error('ROUTING_BUSY'));
|
|
777
|
-
this._setDisconnected("Routing Busy");
|
|
777
|
+
//this._setDisconnected("Routing Busy"); // 31/03/2022 Commented, because it doesn't matter. Non need to disconnect.
|
|
778
778
|
return;
|
|
779
779
|
} catch (error) { }
|
|
780
780
|
}
|
package/README.md
CHANGED
|
@@ -17,8 +17,8 @@ Control your KNX intallation via Node-Red!
|
|
|
17
17
|
|
|
18
18
|
**You can use it immediately!**
|
|
19
19
|
```javascript
|
|
20
|
-
payload = true // Turn light on
|
|
21
|
-
payload = {red:255, green:200, blue:30} // Put some colors in our life
|
|
20
|
+
msg.payload = true // Turn light on
|
|
21
|
+
msg.payload = {red:255, green:200, blue:30} // Put some colors in our life
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
|
|
@@ -46,17 +46,11 @@ payload = {red:255, green:200, blue:30} // Put some colors in our life
|
|
|
46
46
|
## VOLUNTEER NEEDED FOR KNX SECURE
|
|
47
47
|
|
|
48
48
|
**************************************************
|
|
49
|
-
**************************************************
|
|
50
|
-
|
|
51
49
|
KNX-Secure is under development and **should** be ready by mid 2022.<br/>
|
|
52
|
-
Many users requested me to "extract" the baseline KNX API and make it accessible via npmjs. Here is it.<br/>
|
|
53
|
-
The API is named **KNXUltimate**. In the README page is well documented and there are also samples for unsecure and secure KNX connections.
|
|
54
|
-
* <a href="https://github.com/Supergiovane/KNXUltimate#readme">KNXUltimate API</a>
|
|
55
|
-
|
|
56
50
|
I need volunteer helping in development of KNX Secure.<br/>
|
|
57
51
|
High knowledge of cryptography and KNX is needed.
|
|
58
52
|
**************************************************
|
|
59
|
-
|
|
53
|
+
|
|
60
54
|
<br>
|
|
61
55
|
<br>
|
|
62
56
|
|
|
@@ -322,6 +316,16 @@ List of commercial companies, which have given us permission to be mentioned on
|
|
|
322
316
|
<br/>
|
|
323
317
|
<br/>
|
|
324
318
|
|
|
319
|
+
|
|
320
|
+
## ARE YOU A NODEJS DEV? DO YOU KNOW THERE IS AN API FOR NODEJS?
|
|
321
|
+
Many users requested me to "extract" the baseline KNX API and make it accessible via npmjs. Here is it.<br/>
|
|
322
|
+
The API is named **KNXUltimate**. In the README page is well documented and there are also samples for unsecure and secure KNX connections.
|
|
323
|
+
* <a href="https://github.com/Supergiovane/KNXUltimate#readme">KNXUltimate API</a>
|
|
324
|
+
|
|
325
|
+
<br/>
|
|
326
|
+
<br/>
|
|
327
|
+
|
|
328
|
+
|
|
325
329
|

|
|
326
330
|
|
|
327
331
|
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
|
|
Binary file
|
|
Binary file
|
|
@@ -10,6 +10,7 @@ const net = require("net");
|
|
|
10
10
|
const _ = require("lodash");
|
|
11
11
|
const path = require("path");
|
|
12
12
|
var fs = require('fs');
|
|
13
|
+
const { Server } = require("http");
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
//Helpers
|
|
@@ -188,8 +189,10 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
188
189
|
|
|
189
190
|
|
|
190
191
|
node.setAllClientsStatus = (_status, _color, _text) => {
|
|
191
|
-
function nextStatus(
|
|
192
|
-
oClient
|
|
192
|
+
function nextStatus(_oClient) {
|
|
193
|
+
let oClient = RED.nodes.getNode(_oClient.id);
|
|
194
|
+
oClient.setNodeStatus({ fill: _color, shape: "dot", text: _status + " " + _text, payload: "", GA: oClient.topic, dpt: "", devicename: "" });
|
|
195
|
+
oClient = null;
|
|
193
196
|
}
|
|
194
197
|
node.nodeClients.map(nextStatus);
|
|
195
198
|
}
|
|
@@ -305,11 +308,11 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
305
308
|
Object.keys(oiFaces).forEach(ifname => {
|
|
306
309
|
// Interface with single IP
|
|
307
310
|
if (Object.keys(oiFaces[ifname]).length === 1) {
|
|
308
|
-
if (Object.keys(oiFaces[ifname])[0].internal
|
|
311
|
+
if (Object.keys(oiFaces[ifname])[0].internal === false) jListInterfaces.push({ name: ifname, address: Object.keys(oiFaces[ifname])[0].address });
|
|
309
312
|
} else {
|
|
310
313
|
var sAddresses = "";
|
|
311
314
|
oiFaces[ifname].forEach(function (iface) {
|
|
312
|
-
if (iface.internal
|
|
315
|
+
if (iface.internal === false) sAddresses += "+" + iface.address;
|
|
313
316
|
});
|
|
314
317
|
if (sAddresses !== "") jListInterfaces.push({ name: ifname, address: sAddresses });
|
|
315
318
|
}
|
|
@@ -346,11 +349,12 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
346
349
|
return date1.localeCompare(date2);
|
|
347
350
|
} else { return -1; }
|
|
348
351
|
})
|
|
349
|
-
.forEach(
|
|
352
|
+
.forEach(_input => {
|
|
353
|
+
let input = RED.nodes.getNode(_input.id);
|
|
350
354
|
sNodeID = "\"" + input.id + "\"";
|
|
351
355
|
sName = "\"" + (input.name !== undefined ? input.name : "") + "\"";
|
|
352
356
|
sOptions = "\"" + "\"";
|
|
353
|
-
if (input.listenallga
|
|
357
|
+
if (input.listenallga === true) {
|
|
354
358
|
if (input.hasOwnProperty("isSceneController")) {
|
|
355
359
|
// Is a Scene Controller
|
|
356
360
|
sGA = "\"Scene Controller\"";
|
|
@@ -430,8 +434,9 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
430
434
|
var readHistory = [];
|
|
431
435
|
let delay = 0;
|
|
432
436
|
node.nodeClients
|
|
433
|
-
.filter(
|
|
434
|
-
.forEach(
|
|
437
|
+
.filter(_oClient => (_oClient.isWatchDog !== undefined && _oClient.isWatchDog === true))
|
|
438
|
+
.forEach(_oClient => {
|
|
439
|
+
let oClient = RED.nodes.getNode(_oClient.id);
|
|
435
440
|
oClient.signalNodeErrorCalledByConfigNode(_oError);
|
|
436
441
|
})
|
|
437
442
|
}
|
|
@@ -449,6 +454,20 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
449
454
|
saveExposedGAs(); // 04/04/2021 save the current values of GA payload
|
|
450
455
|
}
|
|
451
456
|
|
|
457
|
+
// node.addClient = (_Node) => {
|
|
458
|
+
// // Check if node already exists
|
|
459
|
+
// if (node.nodeClients.filter(x => x.id === _Node.id).length === 0) {
|
|
460
|
+
// // Add _Node to the clients array
|
|
461
|
+
// if (node.autoReconnect) {
|
|
462
|
+
// _Node.setNodeStatus({ fill: "grey", shape: "ring", text: "Node initialized.", payload: "", GA: "", dpt: "", devicename: "" });
|
|
463
|
+
// } else {
|
|
464
|
+
// _Node.setNodeStatus({ fill: "red", shape: "ring", text: "Autoconnect disabled. Please manually connect.", payload: "", GA: "", dpt: "", devicename: "" });
|
|
465
|
+
// }
|
|
466
|
+
// node.nodeClients.push(_Node);
|
|
467
|
+
// }
|
|
468
|
+
|
|
469
|
+
// }
|
|
470
|
+
|
|
452
471
|
node.addClient = (_Node) => {
|
|
453
472
|
// Check if node already exists
|
|
454
473
|
if (node.nodeClients.filter(x => x.id === _Node.id).length === 0) {
|
|
@@ -458,18 +477,25 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
458
477
|
} else {
|
|
459
478
|
_Node.setNodeStatus({ fill: "red", shape: "ring", text: "Autoconnect disabled. Please manually connect.", payload: "", GA: "", dpt: "", devicename: "" });
|
|
460
479
|
}
|
|
461
|
-
|
|
480
|
+
// 05/04/2022 create the Json variable and add it to the list
|
|
481
|
+
let jNode = {};
|
|
482
|
+
jNode.id = _Node.id;
|
|
483
|
+
jNode.topic = _Node.topic;
|
|
484
|
+
if (_Node.hasOwnProperty("isWatchDog")) jNode.isWatchDog = _Node.isWatchDog;
|
|
485
|
+
jNode.initialread = _Node.initialread;
|
|
486
|
+
jNode.notifywrite = _Node.notifywrite;
|
|
487
|
+
jNode.notifyresponse = _Node.notifyresponse;
|
|
488
|
+
jNode.notifyreadrequest = _Node.notifyreadrequest;
|
|
489
|
+
node.nodeClients.push(jNode);
|
|
462
490
|
}
|
|
463
491
|
|
|
464
492
|
}
|
|
465
493
|
|
|
466
494
|
node.removeClient = (_Node) => {
|
|
467
495
|
// Remove the client node from the clients array
|
|
468
|
-
//if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info( "BEFORE Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);
|
|
469
496
|
try {
|
|
470
497
|
node.nodeClients = node.nodeClients.filter(x => x.id !== _Node.id)
|
|
471
498
|
} catch (error) { }
|
|
472
|
-
//if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info("AFTER Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);
|
|
473
499
|
|
|
474
500
|
// If no clien nodes, disconnect from bus.
|
|
475
501
|
if (node.nodeClients.length === 0) {
|
|
@@ -496,14 +522,15 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
496
522
|
|
|
497
523
|
// First, read from file. This allow all virtual devices to get their values from file.
|
|
498
524
|
node.nodeClients
|
|
499
|
-
.filter(
|
|
500
|
-
.filter(
|
|
501
|
-
.forEach(
|
|
525
|
+
.filter(_oClient => _oClient.initialread === 2 || _oClient.initialread === 3)
|
|
526
|
+
.filter(_oClient => _oClient.hasOwnProperty("isWatchDog") === false)
|
|
527
|
+
.forEach(_oClient => {
|
|
528
|
+
let oClient = RED.nodes.getNode(_oClient.id); // 05/04/2022 Get the real node
|
|
502
529
|
|
|
503
530
|
if (node.linkStatus !== "connected") return; // 16/08/2021 If not connected, exit
|
|
504
531
|
|
|
505
532
|
// 04/04/2020 selected READ FROM FILE 2 or from file then from bus 3
|
|
506
|
-
if (oClient.listenallga
|
|
533
|
+
if (oClient.listenallga === true) {
|
|
507
534
|
// 13/12/2021 DA FARE
|
|
508
535
|
} else {
|
|
509
536
|
try {
|
|
@@ -548,9 +575,10 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
548
575
|
// Then, after all values have been read from file, read from BUS
|
|
549
576
|
// This allow the virtual devices to get their values before this will be readed from bus
|
|
550
577
|
node.nodeClients
|
|
551
|
-
.filter(
|
|
552
|
-
.filter(
|
|
553
|
-
.forEach(
|
|
578
|
+
.filter(_oClient => _oClient.initialread === 1)
|
|
579
|
+
.filter(_oClient => _oClient.hasOwnProperty("isWatchDog") === false)
|
|
580
|
+
.forEach(_oClient => {
|
|
581
|
+
let oClient = RED.nodes.getNode(_oClient.id); // 05/04/2022 Get the real node
|
|
554
582
|
|
|
555
583
|
if (node.linkStatus !== "connected") return; // 16/08/2021 If not connected, exit
|
|
556
584
|
|
|
@@ -559,7 +587,7 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
559
587
|
oClient.initialReadAllDevicesInRules();
|
|
560
588
|
} else if (oClient.hasOwnProperty("isLoadControlNode") && oClient.isLoadControlNode) {
|
|
561
589
|
oClient.initialReadAllDevicesInRules();
|
|
562
|
-
} else if (oClient.listenallga
|
|
590
|
+
} else if (oClient.listenallga === true) {
|
|
563
591
|
for (let index = 0; index < node.csv.length; index++) {
|
|
564
592
|
const element = node.csv[index];
|
|
565
593
|
if (!readHistory.includes(element.ga)) {
|
|
@@ -758,6 +786,14 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
758
786
|
// ######################################
|
|
759
787
|
node.knxConnection.on(knx.KNXClient.KNXClientEvents.indication, handleBusEvents);
|
|
760
788
|
node.knxConnection.on(knx.KNXClient.KNXClientEvents.error, err => {
|
|
789
|
+
try {
|
|
790
|
+
if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error("knxUltimate-config: received KNXClientEvents.error: " + (err.message === undefined ? err : err.message));
|
|
791
|
+
} catch (error) { }
|
|
792
|
+
// 31/03/2022 Don't care about some errors
|
|
793
|
+
if (err.message !== undefined && err.message === "ROUTING_LOST_MESSAGE") {
|
|
794
|
+
if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.debug("knxUltimate-config: Don't care about KNXClientEvents.error: " + (err.message === undefined ? err : err.message));
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
761
797
|
saveExposedGAs(); // 13/12/2021 save the current values of GA payload
|
|
762
798
|
node.startTimerClearTelegramQueue(); // 21/01/2022 Clear the telegram queue after a while
|
|
763
799
|
node.linkStatus = "disconnected";
|
|
@@ -829,7 +865,7 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
829
865
|
// Handle BUS events
|
|
830
866
|
// ---------------------------------------------------------------------------------------
|
|
831
867
|
function handleBusEvents(_datagram, _echoed) {
|
|
832
|
-
|
|
868
|
+
//console.time('handleBusEvents');
|
|
833
869
|
|
|
834
870
|
let _rawValue = null;
|
|
835
871
|
try {
|
|
@@ -889,9 +925,11 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
889
925
|
}
|
|
890
926
|
switch (_evt) {
|
|
891
927
|
case "GroupValue_Write": {
|
|
928
|
+
// console.time('GroupValue_Write'); // 05/04/2022 Fatto test velocità tra for..loop e forEach. E' risultato sempre comunque più veloce il forEach!
|
|
892
929
|
node.nodeClients
|
|
893
|
-
.filter(
|
|
894
|
-
.forEach(
|
|
930
|
+
.filter(_input => _input.notifywrite === true)
|
|
931
|
+
.forEach(_input => {
|
|
932
|
+
let input = RED.nodes.getNode(_input.id); // 05/04/2022 Get the real node
|
|
895
933
|
|
|
896
934
|
// 19/03/2020 in the middle of coronavirus. Whole italy is red zone, closed down. Scene Controller implementation
|
|
897
935
|
if (input.hasOwnProperty("isSceneController")) {
|
|
@@ -949,7 +987,7 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
949
987
|
//}).then(function () { }).catch(function () { });
|
|
950
988
|
}
|
|
951
989
|
|
|
952
|
-
} else if (input.listenallga
|
|
990
|
+
} else if (input.listenallga === true) {
|
|
953
991
|
|
|
954
992
|
// Get the GA from CVS
|
|
955
993
|
let oGA = undefined;
|
|
@@ -983,13 +1021,15 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
983
1021
|
};
|
|
984
1022
|
};
|
|
985
1023
|
});
|
|
1024
|
+
//console.timeEnd('GroupValue_Write');
|
|
986
1025
|
break;
|
|
987
1026
|
};
|
|
988
1027
|
case "GroupValue_Response": {
|
|
989
1028
|
|
|
990
1029
|
node.nodeClients
|
|
991
|
-
.filter(
|
|
992
|
-
.forEach(
|
|
1030
|
+
.filter(_input => _input.notifyresponse === true)
|
|
1031
|
+
.forEach(_input => {
|
|
1032
|
+
let input = RED.nodes.getNode(_input.id); // 05/04/2022 Get the real node
|
|
993
1033
|
|
|
994
1034
|
if (input.hasOwnProperty("isLogger")) { // 26/03/2020 Coronavirus is slightly decreasing the affected numer of people. Logger Node
|
|
995
1035
|
|
|
@@ -1002,7 +1042,7 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1002
1042
|
//}).then(function () { }).catch(function () { });
|
|
1003
1043
|
}
|
|
1004
1044
|
|
|
1005
|
-
} else if (input.listenallga
|
|
1045
|
+
} else if (input.listenallga === true) {
|
|
1006
1046
|
// Get the DPT
|
|
1007
1047
|
let oGA;
|
|
1008
1048
|
try {
|
|
@@ -1037,8 +1077,9 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1037
1077
|
case "GroupValue_Read": {
|
|
1038
1078
|
|
|
1039
1079
|
node.nodeClients
|
|
1040
|
-
.filter(
|
|
1041
|
-
.forEach(
|
|
1080
|
+
.filter(_input => _input.notifyreadrequest === true)
|
|
1081
|
+
.forEach(_input => {
|
|
1082
|
+
let input = RED.nodes.getNode(_input.id); // 05/04/2022 Get the real node
|
|
1042
1083
|
|
|
1043
1084
|
if (input.hasOwnProperty("isLogger")) { // 26/03/2020 Coronavirus is slightly decreasing the affected numer of people. Logger Node
|
|
1044
1085
|
|
|
@@ -1052,7 +1093,7 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1052
1093
|
//}).then(function () { }).catch(function () { });
|
|
1053
1094
|
}
|
|
1054
1095
|
|
|
1055
|
-
} else if (input.listenallga
|
|
1096
|
+
} else if (input.listenallga === true) {
|
|
1056
1097
|
// Get the DPT
|
|
1057
1098
|
let oGA;
|
|
1058
1099
|
try {
|
|
@@ -1094,6 +1135,7 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1094
1135
|
};
|
|
1095
1136
|
default: return
|
|
1096
1137
|
};
|
|
1138
|
+
//console.timeEnd('handleBusEvents');
|
|
1097
1139
|
};
|
|
1098
1140
|
// END Handle BUS events---------------------------------------------------------------------------------------
|
|
1099
1141
|
|
|
@@ -1162,7 +1204,8 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1162
1204
|
}
|
|
1163
1205
|
} catch (error) {
|
|
1164
1206
|
try {
|
|
1165
|
-
|
|
1207
|
+
let oNode = RED.nodes.getNode(oKNXMessage.nodecallerid); // 05/04/2022 Get the real node
|
|
1208
|
+
oNode.setNodeStatus({ fill: "red", shape: "dot", text: "Send response " + error, payload: oKNXMessage.payload, GA: oKNXMessage.grpaddr, dpt: oKNXMessage.dpt, devicename: "" })
|
|
1166
1209
|
} catch (error) { }
|
|
1167
1210
|
}
|
|
1168
1211
|
} else if (oKNXMessage.outputtype === "read") {
|
|
@@ -1186,7 +1229,9 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1186
1229
|
// }
|
|
1187
1230
|
try {
|
|
1188
1231
|
|
|
1189
|
-
node.nodeClients.forEach(
|
|
1232
|
+
node.nodeClients.forEach(_input => {
|
|
1233
|
+
|
|
1234
|
+
let input = RED.nodes.getNode(_input.id); // 05/04/2022 Get the real node
|
|
1190
1235
|
|
|
1191
1236
|
// 16/08/2021 If not connected, exit
|
|
1192
1237
|
if (node.linkStatus !== "connected") {
|
|
@@ -1199,7 +1244,7 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1199
1244
|
|
|
1200
1245
|
} else if (input.hasOwnProperty("isLogger")) { // 26/03/2020 Coronavirus is slightly decreasing the affected numer of people. Logger Node
|
|
1201
1246
|
|
|
1202
|
-
} else if (input.listenallga
|
|
1247
|
+
} else if (input.listenallga === true) {
|
|
1203
1248
|
|
|
1204
1249
|
} else if (input.topic == oKNXMessage.grpaddr) {
|
|
1205
1250
|
|
|
@@ -1242,7 +1287,8 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1242
1287
|
}
|
|
1243
1288
|
} catch (error) {
|
|
1244
1289
|
try {
|
|
1245
|
-
|
|
1290
|
+
let oNode = RED.nodes.getNode(oKNXMessage.nodecallerid); // 05/04/2022 Get the real node
|
|
1291
|
+
oNode.setNodeStatus({ fill: "red", shape: "dot", text: "Send write " + error, payload: oKNXMessage.payload, GA: oKNXMessage.grpaddr, dpt: oKNXMessage.dpt, devicename: "" })
|
|
1246
1292
|
} catch (error) { }
|
|
1247
1293
|
}
|
|
1248
1294
|
|
|
@@ -1448,6 +1494,7 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1448
1494
|
node.lockHandleTelegramQueue = false; // Unlock the telegram handling function
|
|
1449
1495
|
|
|
1450
1496
|
saveExposedGAs(); // 04/04/2021 save the current values of GA payload
|
|
1497
|
+
node.nodeClients = []; // 05/04/2023 Nullify
|
|
1451
1498
|
try {
|
|
1452
1499
|
if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.destroy();
|
|
1453
1500
|
} catch (error) { }
|
|
@@ -1714,14 +1761,16 @@ return msg;`, "helplink": "https://github.com/Supergiovane/node-red-contrib-knx-
|
|
|
1714
1761
|
if (_msg.outputtype === "response") sEvent = "GroupValue_Response";
|
|
1715
1762
|
if (_msg.outputtype === "read") sEvent = "GroupValue_Read";
|
|
1716
1763
|
|
|
1717
|
-
node.nodeClients.forEach(
|
|
1764
|
+
node.nodeClients.forEach(_input => {
|
|
1765
|
+
|
|
1766
|
+
let input = RED.nodes.getNode(_input.id); // 05/04/2022 Get the real node
|
|
1718
1767
|
|
|
1719
1768
|
// 19/03/2020 in the middle of coronavirus. Whole italy is red zone, closed down. Scene Controller implementation
|
|
1720
1769
|
if (input.hasOwnProperty("isSceneController")) {
|
|
1721
1770
|
|
|
1722
1771
|
} else if (input.hasOwnProperty("isLogger")) { // 26/03/2020 Coronavirus is slightly decreasing the affected numer of people. Logger Node
|
|
1723
1772
|
|
|
1724
|
-
} else if (input.listenallga
|
|
1773
|
+
} else if (input.listenallga === true) {
|
|
1725
1774
|
|
|
1726
1775
|
// Get the DPT
|
|
1727
1776
|
let oGA;
|
package/package.json
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-knx-ultimate",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.38",
|
|
4
4
|
"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.",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"os": ">=0.1.1",
|
|
9
|
-
"ping": ">=0.4.1",
|
|
10
|
-
"@types/node": "^6.14.4",
|
|
6
|
+
"mkdirp": "1.0.4",
|
|
7
|
+
"ping": "0.4.1",
|
|
11
8
|
"binary-parser": "1.1.5",
|
|
12
9
|
"binary-protocol": "0.0.0",
|
|
13
|
-
"ipaddr.js": ">=2.0.0",
|
|
14
10
|
"log-driver": "1.2.7",
|
|
15
|
-
"
|
|
16
|
-
"lodash": ">=4.17.21",
|
|
17
|
-
"caller-id": "^0.1.0",
|
|
11
|
+
"lodash": "4.17.21",
|
|
18
12
|
"path": ">=0.12.7",
|
|
19
13
|
"crypto-js": ">=4.1.1",
|
|
20
14
|
"xml2js": ">=0.4.23"
|
|
@@ -28,8 +22,8 @@
|
|
|
28
22
|
"knxUltimate-config": "/nodes/knxUltimate-config.js",
|
|
29
23
|
"knxUltimateGlobalContext": "/nodes/knxUltimateGlobalContext.js",
|
|
30
24
|
"knxUltimateAlerter": "/nodes/knxUltimateAlerter.js",
|
|
31
|
-
"knxUltimateLoadControl":"/nodes/knxUltimateLoadControl.js",
|
|
32
|
-
"knxUltimateViewer":"/nodes/knxUltimateViewer.js"
|
|
25
|
+
"knxUltimateLoadControl": "/nodes/knxUltimateLoadControl.js",
|
|
26
|
+
"knxUltimateViewer": "/nodes/knxUltimateViewer.js"
|
|
33
27
|
}
|
|
34
28
|
},
|
|
35
29
|
"repository": {
|