node-red-contrib-knx-ultimate 3.3.21 → 3.3.23
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 +9 -1
- package/nodes/hue-config.js +9 -9
- package/nodes/knxUltimate-config.js +64 -64
- package/nodes/knxUltimate.js +1 -1
- package/nodes/knxUltimateAlerter.js +1 -1
- package/nodes/knxUltimateAutoResponder.js +1 -1
- package/nodes/knxUltimateGarageDoorBarrierOpener.js +1 -1
- package/nodes/knxUltimateGlobalContext.js +1 -1
- package/nodes/knxUltimateHueBattery.js +2 -2
- package/nodes/knxUltimateHueButton.js +7 -7
- package/nodes/knxUltimateHueContactSensor.js +2 -2
- package/nodes/knxUltimateHueLight.js +2 -2
- package/nodes/knxUltimateHueLightSensor.js +2 -2
- package/nodes/knxUltimateHueMotion.js +2 -2
- package/nodes/knxUltimateHueScene.js +2 -2
- package/nodes/knxUltimateHueTapDial.js +2 -2
- package/nodes/knxUltimateHueTemperatureSensor.js +2 -2
- package/nodes/knxUltimateHueZigbeeConnectivity.js +2 -2
- package/nodes/knxUltimateHuedevice_software_update.js +2 -2
- package/nodes/knxUltimateLoadControl.js +1 -1
- package/nodes/knxUltimateLogger.js +1 -1
- package/nodes/knxUltimateSceneController.js +1 -1
- package/nodes/knxUltimateViewer.js +1 -1
- package/nodes/knxUltimateWatchDog.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
-
**Version 3.3.
|
|
9
|
+
**Version 3.3.23** - April 2025<br/>
|
|
10
|
+
- HUE nodes: fixed no-reconnection after disconnection, due to a bug in the connection handler.<br/>
|
|
11
|
+
- Housekeeping<br/>
|
|
12
|
+
|
|
13
|
+
**Version 3.3.22** - March 2025<br/>
|
|
14
|
+
- HUE Button: fixed random unresponsive button event.<br/>
|
|
15
|
+
- Housekeeping<br/>
|
|
16
|
+
|
|
17
|
+
**Version 3.3.21** - March 2025<br/>
|
|
10
18
|
- KNX Engine: fixed an unmeaningful error while validating DPTs.<br/>
|
|
11
19
|
|
|
12
20
|
**Version 3.3.20** - March 2025<br/>
|
package/nodes/hue-config.js
CHANGED
|
@@ -54,7 +54,7 @@ module.exports = (RED) => {
|
|
|
54
54
|
// Init HUE Utility
|
|
55
55
|
node.hueManager = new HueClass(node.host, node.credentials.username, node.credentials.clientkey, config.bridgeid, node.sysLogger);
|
|
56
56
|
} catch (error) {
|
|
57
|
-
|
|
57
|
+
node.sysLogger?.error(`Errore hue-config: node.initHUEConnection: ${error.message}`);
|
|
58
58
|
throw (error)
|
|
59
59
|
}
|
|
60
60
|
node.hueManager.on("event", (_event) => {
|
|
@@ -63,7 +63,7 @@ module.exports = (RED) => {
|
|
|
63
63
|
try {
|
|
64
64
|
if (oClient.handleSendHUE !== undefined) oClient.handleSendHUE(_event);
|
|
65
65
|
} catch (error) {
|
|
66
|
-
|
|
66
|
+
node.sysLogger?.error(`Errore node.hueManager.on(event): ${error.message}`);
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
});
|
|
@@ -75,9 +75,9 @@ module.exports = (RED) => {
|
|
|
75
75
|
node.timerDoInitialRead = setTimeout(() => {
|
|
76
76
|
(async () => {
|
|
77
77
|
try {
|
|
78
|
-
|
|
78
|
+
node.sysLogger?.info(`HTTP getting resource from HUE bridge : ${node.name}`);
|
|
79
79
|
await node.loadResourcesFromHUEBridge();
|
|
80
|
-
|
|
80
|
+
node.sysLogger?.info(`Total HUE resources count : ${node.hueAllResources.length}`);
|
|
81
81
|
} catch (error) {
|
|
82
82
|
node.nodeClients.forEach((_oClient) => {
|
|
83
83
|
setTimeout(() => {
|
|
@@ -112,7 +112,7 @@ module.exports = (RED) => {
|
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
node.startWatchdogTimer = () => {
|
|
115
|
-
if (node.timerHUEConfigCheckState !==
|
|
115
|
+
if (node.timerHUEConfigCheckState !== null) clearTimeout(node.timerHUEConfigCheckState);
|
|
116
116
|
node.timerHUEConfigCheckState = setTimeout(() => {
|
|
117
117
|
(async () => {
|
|
118
118
|
if (node.linkStatus === "disconnected") {
|
|
@@ -120,7 +120,7 @@ module.exports = (RED) => {
|
|
|
120
120
|
try {
|
|
121
121
|
await node.initHUEConnection();
|
|
122
122
|
} catch (error) {
|
|
123
|
-
|
|
123
|
+
node.sysLogger?.error(`Errore hue-config: node.startWatchdogTimer: ${error.message}`);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
node.startWatchdogTimer();
|
|
@@ -375,7 +375,7 @@ module.exports = (RED) => {
|
|
|
375
375
|
}
|
|
376
376
|
return { devices: retArray };
|
|
377
377
|
} catch (error) {
|
|
378
|
-
|
|
378
|
+
node.sysLogger?.error(`KNXUltimateHue: hueEngine: classHUE: getResources: error ${error.message}`);
|
|
379
379
|
return { devices: error.message };
|
|
380
380
|
}
|
|
381
381
|
};
|
|
@@ -388,7 +388,7 @@ module.exports = (RED) => {
|
|
|
388
388
|
const ret = "#" + hueColorConverter.ColorConverter.rgbHex(retRGB.r, retRGB.g, retRGB.b).toString();
|
|
389
389
|
return ret;
|
|
390
390
|
} catch (error) {
|
|
391
|
-
|
|
391
|
+
node.sysLogger?.warn(`KNXUltimateHue: hueEngine: getColorFromHueLight: error ${error.message}`);
|
|
392
392
|
return {};
|
|
393
393
|
}
|
|
394
394
|
};
|
|
@@ -399,7 +399,7 @@ module.exports = (RED) => {
|
|
|
399
399
|
const ret = { kelvin: hueColorConverter.ColorConverter.mirekToKelvin(oLight.color_temperature.mirek), brightness: Math.round(oLight.dimming.brightness, 0) };
|
|
400
400
|
return JSON.stringify(ret);
|
|
401
401
|
} catch (error) {
|
|
402
|
-
|
|
402
|
+
node.sysLogger?.error(`KNXUltimateHue: hueEngine: getKelvinFromHueLight: error ${error.message}`);
|
|
403
403
|
return {};
|
|
404
404
|
}
|
|
405
405
|
};
|
|
@@ -116,7 +116,7 @@ module.exports = (RED) => {
|
|
|
116
116
|
} else {
|
|
117
117
|
node.hostProtocol = "TunnelUDP";
|
|
118
118
|
}
|
|
119
|
-
|
|
119
|
+
node.sysLogger?.info("IP Protocol AUTO SET to " + node.hostProtocol + ", based on IP " + node.host);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
|
|
@@ -133,7 +133,7 @@ module.exports = (RED) => {
|
|
|
133
133
|
devicename: "",
|
|
134
134
|
});
|
|
135
135
|
} catch (error) {
|
|
136
|
-
|
|
136
|
+
node.sysLogger?.warn("Wow setAllClientsStatus error " + error.message);
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
};
|
|
@@ -163,7 +163,7 @@ module.exports = (RED) => {
|
|
|
163
163
|
}
|
|
164
164
|
})();
|
|
165
165
|
} catch (error) {
|
|
166
|
-
|
|
166
|
+
node.sysLogger?.error("KNX Secure: error parsing the keyring XML: " + error.message);
|
|
167
167
|
node.jKNXSecureKeyring = null;
|
|
168
168
|
node.knxSecureSelected = false;
|
|
169
169
|
const t = setTimeout(() => node.setAllClientsStatus("Error", "red", "KNX Secure " + error.message), 2000); // 21/03/2022 fixed possible memory leak. Previously was setTimeout without "let t = ".
|
|
@@ -186,12 +186,12 @@ module.exports = (RED) => {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
if (!setupDirectory(node.userDir)) {
|
|
189
|
-
|
|
189
|
+
node.sysLogger?.error("Unable to set up MAIN directory: " + node.userDir);
|
|
190
190
|
}
|
|
191
191
|
if (!setupDirectory(path.join(node.userDir, "knxpersistvalues"))) {
|
|
192
|
-
|
|
192
|
+
node.sysLogger?.error("Unable to set up cache directory: " + path.join(node.userDir, "knxpersistvalues"));
|
|
193
193
|
} else {
|
|
194
|
-
|
|
194
|
+
node.sysLogger?.info("payload cache set to " + path.join(node.userDir, "knxpersistvalues"));
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
function saveExposedGAs() {
|
|
@@ -199,10 +199,10 @@ module.exports = (RED) => {
|
|
|
199
199
|
try {
|
|
200
200
|
if (node.exposedGAs.length > 0) {
|
|
201
201
|
fs.writeFileSync(sFile, JSON.stringify(node.exposedGAs));
|
|
202
|
-
|
|
202
|
+
node.sysLogger?.info("wrote peristent values to the file " + sFile);
|
|
203
203
|
}
|
|
204
204
|
} catch (err) {
|
|
205
|
-
|
|
205
|
+
node.sysLogger?.error("unable to write peristent values to the file " + sFile + " " + err.message);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
function loadExposedGAs() {
|
|
@@ -211,7 +211,7 @@ module.exports = (RED) => {
|
|
|
211
211
|
node.exposedGAs = JSON.parse(fs.readFileSync(sFile, "utf8"));
|
|
212
212
|
} catch (err) {
|
|
213
213
|
node.exposedGAs = [];
|
|
214
|
-
|
|
214
|
+
node.sysLogger?.info("unable to read peristent file " + sFile + " " + err.message);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
|
|
@@ -279,9 +279,9 @@ module.exports = (RED) => {
|
|
|
279
279
|
if (node.linkStatus !== "connected") return; // 29/08/2019 If not connected, exit
|
|
280
280
|
loadExposedGAs(); // 04/04/2021 load the current values of GA payload
|
|
281
281
|
try {
|
|
282
|
-
|
|
282
|
+
node.sysLogger?.info("Loaded saved GA values", node.exposedGAs.length);
|
|
283
283
|
} catch (error) { }
|
|
284
|
-
|
|
284
|
+
node.sysLogger?.info("Do DoInitialReadFromKNXBusOrFile");
|
|
285
285
|
try {
|
|
286
286
|
const readHistory = [];
|
|
287
287
|
|
|
@@ -337,7 +337,7 @@ module.exports = (RED) => {
|
|
|
337
337
|
dpt: _oClient.dpt,
|
|
338
338
|
devicename: _oClient.devicename || "",
|
|
339
339
|
});
|
|
340
|
-
|
|
340
|
+
node.sysLogger?.error("DoInitialReadFromKNXBusOrFile: Datapoint may have been changed, remove the value from persist file of " + _oClient.topic + " Devicename " + _oClient.name + " Currend DPT " + _oClient.dpt + " Node.id " + _oClient.id);
|
|
341
341
|
} else {
|
|
342
342
|
if (_oClient.notifyresponse) _oClient.handleSend(msg);
|
|
343
343
|
}
|
|
@@ -345,7 +345,7 @@ module.exports = (RED) => {
|
|
|
345
345
|
if (_oClient.initialread === 3) {
|
|
346
346
|
// Not found, issue a READ to the bus
|
|
347
347
|
if (!readHistory.includes(_oClient.topic)) {
|
|
348
|
-
|
|
348
|
+
node.sysLogger?.debug("DoInitialReadFromKNXBusOrFile 3: sent read request to GA " + _oClient.topic);
|
|
349
349
|
_oClient.setNodeStatus({
|
|
350
350
|
fill: "grey",
|
|
351
351
|
shape: "dot",
|
|
@@ -397,7 +397,7 @@ module.exports = (RED) => {
|
|
|
397
397
|
nodecallerid: element.id,
|
|
398
398
|
});
|
|
399
399
|
readHistory.push(element.ga);
|
|
400
|
-
|
|
400
|
+
node.sysLogger?.debug("DoInitialReadFromKNXBusOrFile from Universal Node: sent read request to GA " + element.ga);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
} else {
|
|
@@ -410,7 +410,7 @@ module.exports = (RED) => {
|
|
|
410
410
|
nodecallerid: _oClient.id,
|
|
411
411
|
});
|
|
412
412
|
readHistory.push(_oClient.topic);
|
|
413
|
-
|
|
413
|
+
node.sysLogger?.debug("DoInitialReadFromKNXBusOrFile: sent read request to GA " + _oClient.topic);
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
});
|
|
@@ -437,11 +437,11 @@ module.exports = (RED) => {
|
|
|
437
437
|
const sTemp = readCSV(_CSV); // 27/09/2022 Set the new CSV
|
|
438
438
|
node.csv = sTemp;
|
|
439
439
|
} catch (error) {
|
|
440
|
-
|
|
440
|
+
node.sysLogger?.info("Node's main config setting error. " + error.message || "");
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
|
|
444
|
+
node.sysLogger?.info(
|
|
445
445
|
"Node's main config setting has been changed. New config: IP " +
|
|
446
446
|
node.host +
|
|
447
447
|
" Port " +
|
|
@@ -457,7 +457,7 @@ module.exports = (RED) => {
|
|
|
457
457
|
await node.Disconnect();
|
|
458
458
|
// node.setKnxConnectionProperties(); // 28/12/2021 Commented
|
|
459
459
|
node.setAllClientsStatus("CONFIG", "yellow", "KNXUltimage-config:setGatewayConfig: disconnected by new setting...");
|
|
460
|
-
|
|
460
|
+
node.sysLogger?.debug("KNXUltimage-config:setGatewayConfig: disconnected by setGatewayConfig.");
|
|
461
461
|
} catch (error) { }
|
|
462
462
|
};
|
|
463
463
|
|
|
@@ -465,7 +465,7 @@ module.exports = (RED) => {
|
|
|
465
465
|
// This new thing has been requested by proServ RealKNX staff.
|
|
466
466
|
node.connectGateway = async (_bConnection) => {
|
|
467
467
|
if (_bConnection === undefined) return;
|
|
468
|
-
|
|
468
|
+
node.sysLogger?.info(
|
|
469
469
|
(_bConnection === true ? "Forced connection from watchdog" : "Forced disconnection from watchdog") +
|
|
470
470
|
node.host +
|
|
471
471
|
" Port " +
|
|
@@ -542,12 +542,12 @@ module.exports = (RED) => {
|
|
|
542
542
|
}
|
|
543
543
|
if (resolvedIP === null || net.isIP(resolvedIP) === 0) {
|
|
544
544
|
// Error in resolving DNS Name
|
|
545
|
-
|
|
545
|
+
node.sysLogger?.error(
|
|
546
546
|
"net.isIP: INVALID IP OR DNS NAME. Check the Gateway Host in Config node " + node.name + " " + node.host,
|
|
547
547
|
);
|
|
548
548
|
throw new Error("net.isIP: INVALID IP OR DNS NAME. Check the Gateway Host in Config node.");
|
|
549
549
|
}
|
|
550
|
-
|
|
550
|
+
node.sysLogger?.info(
|
|
551
551
|
"net.isIP: The gateway is not specified as IP. The DNS resolver pointed me to the IP " +
|
|
552
552
|
node.host +
|
|
553
553
|
", in Config node " +
|
|
@@ -568,10 +568,10 @@ module.exports = (RED) => {
|
|
|
568
568
|
let sIfaceName = "";
|
|
569
569
|
if (node.KNXEthInterface === "Manual") {
|
|
570
570
|
sIfaceName = node.KNXEthInterfaceManuallyInput;
|
|
571
|
-
|
|
571
|
+
node.sysLogger?.info("Bind KNX Bus to interface : " + sIfaceName + " (Interface's name entered by hand). Node " + node.name);
|
|
572
572
|
} else {
|
|
573
573
|
sIfaceName = node.KNXEthInterface;
|
|
574
|
-
|
|
574
|
+
node.sysLogger?.info(
|
|
575
575
|
"Bind KNX Bus to interface : " + sIfaceName + " (Interface's name selected from dropdown list). Node " + node.name,
|
|
576
576
|
);
|
|
577
577
|
}
|
|
@@ -581,7 +581,7 @@ module.exports = (RED) => {
|
|
|
581
581
|
try {
|
|
582
582
|
delete node.knxConnectionProperties.interface;
|
|
583
583
|
} catch (error) { }
|
|
584
|
-
|
|
584
|
+
node.sysLogger?.info("Bind KNX Bus to interface (Auto). Node " + node.name);
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
587
|
// node.setKnxConnectionProperties(); 28/12/2021 Commented
|
|
@@ -590,7 +590,7 @@ module.exports = (RED) => {
|
|
|
590
590
|
try {
|
|
591
591
|
node.setKnxConnectionProperties(); // 28/12/2021 Added
|
|
592
592
|
} catch (error) {
|
|
593
|
-
|
|
593
|
+
node.sysLogger?.error("setKnxConnectionProperties: " + error.message);
|
|
594
594
|
if (node.linkStatus !== "disconnected") await node.Disconnect();
|
|
595
595
|
return;
|
|
596
596
|
}
|
|
@@ -599,7 +599,7 @@ module.exports = (RED) => {
|
|
|
599
599
|
// At start, initKNXConnection is already called only if the gateway has clients, but in the successive calls from the error handler, this check is not done.
|
|
600
600
|
if (node.nodeClients.length === 0) {
|
|
601
601
|
try {
|
|
602
|
-
|
|
602
|
+
node.sysLogger?.info("No nodes linked to this gateway " + node.name);
|
|
603
603
|
try {
|
|
604
604
|
if (node.linkStatus !== "disconnected") await node.Disconnect();
|
|
605
605
|
} catch (error) { }
|
|
@@ -611,7 +611,7 @@ module.exports = (RED) => {
|
|
|
611
611
|
// 02/01/2022 This is important to free the tunnel in case of hard disconnection.
|
|
612
612
|
await node.Disconnect();
|
|
613
613
|
} catch (error) {
|
|
614
|
-
//
|
|
614
|
+
// node.sysLogger?.info(error)
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
try {
|
|
@@ -619,11 +619,11 @@ module.exports = (RED) => {
|
|
|
619
619
|
try {
|
|
620
620
|
if (node.knxConnection !== null && node.knxConnection !== undefined) {
|
|
621
621
|
await node.knxConnection.Disconnect();
|
|
622
|
-
|
|
622
|
+
node.sysLogger?.debug("removing old handlers. Node " + node.name);
|
|
623
623
|
node.knxConnection.removeAllListeners();
|
|
624
624
|
}
|
|
625
625
|
} catch (error) {
|
|
626
|
-
|
|
626
|
+
node.sysLogger?.info("BANANA ERRORINO", error);
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
//node.knxConnectionProperties.localSocketAddress = { address: '192.168.2.2', port: 59000 }
|
|
@@ -634,12 +634,12 @@ module.exports = (RED) => {
|
|
|
634
634
|
node.knxConnection.on(knx.KNXClientEvents.indication, handleBusEvents);
|
|
635
635
|
node.knxConnection.on(knx.KNXClientEvents.error, (err) => {
|
|
636
636
|
try {
|
|
637
|
-
|
|
637
|
+
node.sysLogger?.error("received KNXClientEvents.error: " + (err.message === undefined ? err : err.message));
|
|
638
638
|
} catch (error) {
|
|
639
639
|
}
|
|
640
640
|
// 31/03/2022 Don't care about some errors
|
|
641
641
|
if (err.message !== undefined && (err.message === "ROUTING_LOST_MESSAGE" || err.message === "ROUTING_BUSY")) {
|
|
642
|
-
|
|
642
|
+
node.sysLogger?.error(
|
|
643
643
|
"KNXClientEvents.error: " +
|
|
644
644
|
(err.message === undefined ? err : err.message) +
|
|
645
645
|
" consider DECREASING the transmission speed, by increasing the telegram's DELAY in the gateway configuration node!",
|
|
@@ -647,18 +647,18 @@ module.exports = (RED) => {
|
|
|
647
647
|
return;
|
|
648
648
|
}
|
|
649
649
|
node.Disconnect("Disconnected by error " + (err.message === undefined ? err : err.message), "red");
|
|
650
|
-
|
|
650
|
+
node.sysLogger?.error("Disconnected by: " + (err.message === undefined ? err : err.message));
|
|
651
651
|
});
|
|
652
652
|
|
|
653
653
|
node.knxConnection.on(knx.KNXClientEvents.disconnected, (info) => {
|
|
654
654
|
if (node.linkStatus !== "disconnected") {
|
|
655
655
|
node.linkStatus = "disconnected";
|
|
656
|
-
|
|
656
|
+
node.sysLogger?.warn("Disconnected event %s", info);
|
|
657
657
|
node.Disconnect("Disconnected by event: " + info || "", "red"); // 11/03/2022
|
|
658
658
|
}
|
|
659
659
|
});
|
|
660
660
|
node.knxConnection.on(knx.KNXClientEvents.close, (info) => {
|
|
661
|
-
|
|
661
|
+
node.sysLogger?.debug("KNXClient socket closed.");
|
|
662
662
|
node.linkStatus = "disconnected";
|
|
663
663
|
});
|
|
664
664
|
node.knxConnection.on(knx.KNXClientEvents.connected, (info) => {
|
|
@@ -671,34 +671,34 @@ module.exports = (RED) => {
|
|
|
671
671
|
try {
|
|
672
672
|
DoInitialReadFromKNXBusOrFile();
|
|
673
673
|
} catch (error) {
|
|
674
|
-
|
|
674
|
+
node.sysLogger?.error("DoInitialReadFromKNXBusOrFile " + error.stack);
|
|
675
675
|
}
|
|
676
676
|
}, 1000); // 17/02/2020 Do initial read of all nodes requesting initial read
|
|
677
677
|
const t = setTimeout(() => {
|
|
678
678
|
// 21/03/2022 fixed possible memory leak. Previously was setTimeout without "let t = ".
|
|
679
679
|
node.setAllClientsStatus("Connected.", "green", "On duty.");
|
|
680
680
|
}, 500);
|
|
681
|
-
|
|
681
|
+
node.sysLogger?.info("Connected to %o", info);
|
|
682
682
|
});
|
|
683
683
|
node.knxConnection.on(knx.KNXClientEvents.connecting, (info) => {
|
|
684
684
|
node.linkStatus = "connecting";
|
|
685
|
-
|
|
685
|
+
node.sysLogger?.debug("Connecting to" + info.ipAddr || "");
|
|
686
686
|
node.setAllClientsStatus(info.ipAddr || "", "grey", "Connecting...");
|
|
687
687
|
});
|
|
688
688
|
// ######################################
|
|
689
689
|
|
|
690
690
|
node.setAllClientsStatus("Connecting... ", "grey", "");
|
|
691
|
-
|
|
691
|
+
node.sysLogger?.info("perform websocket connection on " + node.name);
|
|
692
692
|
try {
|
|
693
|
-
|
|
693
|
+
node.sysLogger?.info("Connecting... " + node.name);
|
|
694
694
|
node.knxConnection.Connect();
|
|
695
695
|
} catch (error) {
|
|
696
|
-
|
|
696
|
+
node.sysLogger?.error("node.knxConnection.Connect() " + node.name + ": " + error.message);
|
|
697
697
|
node.linkStatus = "disconnected";
|
|
698
698
|
throw error;
|
|
699
699
|
}
|
|
700
700
|
} catch (error) {
|
|
701
|
-
if (node.sysLogger !==
|
|
701
|
+
if (node.sysLogger !== null) {
|
|
702
702
|
node.sysLogger.error("Error in instantiating knxConnection " + error.stack + " Node " + node.name);
|
|
703
703
|
node.error("KNXUltimate-config: Error in instantiating knxConnection " + error.message + " Node " + node.name);
|
|
704
704
|
}
|
|
@@ -736,7 +736,7 @@ module.exports = (RED) => {
|
|
|
736
736
|
const isRepeated = _datagram.cEMIMessage.control.repeat !== 1;
|
|
737
737
|
// 06/06/2021 Supergiovane: check if i can handle the telegrams with "Repeated" flag
|
|
738
738
|
if (node.ignoreTelegramsWithRepeatedFlag === true && isRepeated) {
|
|
739
|
-
|
|
739
|
+
node.sysLogger?.warn("Ignored telegram with Repeated Flag " + _evt + " Src:" + _src + " Dest:" + _dest);
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
742
742
|
|
|
@@ -1046,7 +1046,7 @@ module.exports = (RED) => {
|
|
|
1046
1046
|
|
|
1047
1047
|
if (_input.hasOwnProperty("isLogger")) {
|
|
1048
1048
|
// 26/03/2020 Coronavirus is slightly decreasing the affected numer of people. Logger Node
|
|
1049
|
-
//
|
|
1049
|
+
// node.sysLogger?.info("BANANA isLogger", _evt, _src, _dest, _rawValue, _cemiETS);
|
|
1050
1050
|
// 24/03/2021 Logger Node, i'll pass cemiETS
|
|
1051
1051
|
if (_cemiETS !== undefined) {
|
|
1052
1052
|
// new Promise((resolve, reject) => {
|
|
@@ -1163,7 +1163,7 @@ module.exports = (RED) => {
|
|
|
1163
1163
|
|
|
1164
1164
|
// 26/12/2021 The KNXEngine is busy waiting for telegram's ACK. Strange.
|
|
1165
1165
|
if (!node.knxConnection.clearToSend) {
|
|
1166
|
-
|
|
1166
|
+
node.sysLogger?.warn(
|
|
1167
1167
|
"sendKNXTelegramToKNXEngine: the KNXEngine is busy or is waiting for a telegram ACK with seqNumner " +
|
|
1168
1168
|
node.knxConnection.getSeqNumber() +
|
|
1169
1169
|
". Delay handling queue.",
|
|
@@ -1177,7 +1177,7 @@ module.exports = (RED) => {
|
|
|
1177
1177
|
try {
|
|
1178
1178
|
_oKNXMessage.payload = payloadRounder.Manipulate(RED.nodes.getNode(_oKNXMessage.nodecallerid), _oKNXMessage.payload);
|
|
1179
1179
|
} catch (error) {
|
|
1180
|
-
|
|
1180
|
+
node.sysLogger?.error(
|
|
1181
1181
|
"sendKNXTelegramToKNXEngine: Sacripante Manipulate payload: " + error.message
|
|
1182
1182
|
);
|
|
1183
1183
|
}
|
|
@@ -1271,7 +1271,7 @@ module.exports = (RED) => {
|
|
|
1271
1271
|
} catch (error) {
|
|
1272
1272
|
try {
|
|
1273
1273
|
const oNode = RED.nodes.getNode(_oKNXMessage.nodecallerid); // 05/04/2022 Get the real node
|
|
1274
|
-
|
|
1274
|
+
node.sysLogger?.error(
|
|
1275
1275
|
"node.knxConnection.write: Payload: " + _oKNXMessage.payload + " GA:" + _oKNXMessage.grpaddr + " DPT:" + _oKNXMessage.dpt + " " + error.stack
|
|
1276
1276
|
);
|
|
1277
1277
|
oNode.setNodeStatus({
|
|
@@ -1326,7 +1326,7 @@ module.exports = (RED) => {
|
|
|
1326
1326
|
if (typeof dpt !== "undefined") {
|
|
1327
1327
|
const jsValue = dptlib.fromBuffer(_rawValue, dpt);
|
|
1328
1328
|
if (typeof jsValue !== "undefined") {
|
|
1329
|
-
//
|
|
1329
|
+
// node.sysLogger?.info("Trying for " + dest + ". FOUND " + element.value);
|
|
1330
1330
|
return element.value;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
@@ -1406,7 +1406,7 @@ module.exports = (RED) => {
|
|
|
1406
1406
|
sInputDpt = _inputDpt === null ? tryToFigureOutDataPointFromRawValue(_Rawvalue) : _inputDpt;
|
|
1407
1407
|
} catch (error) {
|
|
1408
1408
|
// Here comes if no datapoint has beeen found
|
|
1409
|
-
|
|
1409
|
+
node.sysLogger?.error(
|
|
1410
1410
|
"buildInputMessage: Error returning from tryToFigureOutDataPointFromRawValue. Device " +
|
|
1411
1411
|
_srcGA +
|
|
1412
1412
|
" Destination " +
|
|
@@ -1431,7 +1431,7 @@ module.exports = (RED) => {
|
|
|
1431
1431
|
try {
|
|
1432
1432
|
var dpt = dptlib.resolve(sInputDpt);
|
|
1433
1433
|
} catch (error) {
|
|
1434
|
-
|
|
1434
|
+
node.sysLogger?.error(
|
|
1435
1435
|
"buildInputMessage: Error returning from dptlib.resolve(sInputDpt). Device " +
|
|
1436
1436
|
_srcGA +
|
|
1437
1437
|
" Destination " +
|
|
@@ -1457,7 +1457,7 @@ module.exports = (RED) => {
|
|
|
1457
1457
|
try {
|
|
1458
1458
|
jsValue = dptlib.fromBuffer(_Rawvalue, dpt);
|
|
1459
1459
|
if (jsValue === null) {
|
|
1460
|
-
|
|
1460
|
+
node.sysLogger?.error(
|
|
1461
1461
|
"buildInputMessage: received a wrong datagram form KNX BUS, from device " +
|
|
1462
1462
|
_srcGA +
|
|
1463
1463
|
" Destination " +
|
|
@@ -1477,7 +1477,7 @@ module.exports = (RED) => {
|
|
|
1477
1477
|
);
|
|
1478
1478
|
}
|
|
1479
1479
|
} catch (error) {
|
|
1480
|
-
|
|
1480
|
+
node.sysLogger?.error(
|
|
1481
1481
|
"buildInputMessage: Error returning from DPT decoding. Device " +
|
|
1482
1482
|
_srcGA +
|
|
1483
1483
|
" Destination " +
|
|
@@ -1548,7 +1548,7 @@ module.exports = (RED) => {
|
|
|
1548
1548
|
|
|
1549
1549
|
return finalMessage;
|
|
1550
1550
|
} catch (error) {
|
|
1551
|
-
|
|
1551
|
+
node.sysLogger?.error("buildInputMessage error: " + error.message);
|
|
1552
1552
|
return errorMessage;
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
@@ -1561,7 +1561,7 @@ module.exports = (RED) => {
|
|
|
1561
1561
|
try {
|
|
1562
1562
|
_csvText = fs.readFileSync(sFileName, { encoding: "utf8" });
|
|
1563
1563
|
} catch (error) {
|
|
1564
|
-
|
|
1564
|
+
node.sysLogger?.error("ERROR: reading ETS file " + error.message);
|
|
1565
1565
|
node.error("ERROR: reading ETS file " + error.message);
|
|
1566
1566
|
return;
|
|
1567
1567
|
}
|
|
@@ -1573,9 +1573,9 @@ module.exports = (RED) => {
|
|
|
1573
1573
|
const ajsonOutput = new Array(); // Array: qui va l'output totale con i nodi per node-red
|
|
1574
1574
|
|
|
1575
1575
|
if (_csvText == "") {
|
|
1576
|
-
|
|
1576
|
+
node.sysLogger?.info("no csv ETS found");
|
|
1577
1577
|
} else {
|
|
1578
|
-
|
|
1578
|
+
node.sysLogger?.info("csv ETS found !");
|
|
1579
1579
|
// 23/08/2019 Delete inwanted CRLF in the GA description
|
|
1580
1580
|
const sTemp = correctCRLFInCSV(_csvText);
|
|
1581
1581
|
|
|
@@ -1685,10 +1685,10 @@ module.exports = (RED) => {
|
|
|
1685
1685
|
const ajsonOutput = new Array(); // Array: qui va l'output totale con i nodi per node-red
|
|
1686
1686
|
|
|
1687
1687
|
if (_esfText === "") {
|
|
1688
|
-
|
|
1688
|
+
node.sysLogger?.info("no ESF found");
|
|
1689
1689
|
return;
|
|
1690
1690
|
} else {
|
|
1691
|
-
|
|
1691
|
+
node.sysLogger?.info("esf ETS found !");
|
|
1692
1692
|
// Read and decode the CSV in an Array containing: "group address", "DPT", "Device Name"
|
|
1693
1693
|
const fileGA = _esfText.split("\n");
|
|
1694
1694
|
let sGA = "";
|
|
@@ -1806,7 +1806,7 @@ module.exports = (RED) => {
|
|
|
1806
1806
|
}
|
|
1807
1807
|
|
|
1808
1808
|
// 08/10/2021 Every xx seconds, i check if the connection is up and running
|
|
1809
|
-
|
|
1809
|
+
node.sysLogger?.info("Autoconnection: " + (node.autoReconnect === false ? "no." : "yes") + " Node " + node.name);
|
|
1810
1810
|
if (node.timerKNXUltimateCheckState !== null) clearInterval(node.timerKNXUltimateCheckState);
|
|
1811
1811
|
node.timerKNXUltimateCheckState = setInterval(async () => {
|
|
1812
1812
|
// If the node is disconnected, wait another cycle, then reconnects
|
|
@@ -1816,7 +1816,7 @@ module.exports = (RED) => {
|
|
|
1816
1816
|
// 21/03/2022 fixed possible memory leak. Previously was setTimeout without "const t = ".
|
|
1817
1817
|
node.setAllClientsStatus("Auto reconnect in progress...", "grey", "");
|
|
1818
1818
|
}, 100);
|
|
1819
|
-
|
|
1819
|
+
node.sysLogger?.debug(
|
|
1820
1820
|
"Auto Reconect by timerKNXUltimateCheckState in progress. node.LinkStatus: " +
|
|
1821
1821
|
node.linkStatus +
|
|
1822
1822
|
", node.autoReconnect:" +
|
|
@@ -1831,7 +1831,7 @@ module.exports = (RED) => {
|
|
|
1831
1831
|
// 21/03/2022 fixed possible memory leak. Previously was setTimeout without "let t = ".
|
|
1832
1832
|
node.setAllClientsStatus("Retry connection", "grey", "");
|
|
1833
1833
|
}, 1000);
|
|
1834
|
-
|
|
1834
|
+
node.sysLogger?.debug(
|
|
1835
1835
|
"Waiting next cycle to reconect. node.LinkStatus: " + node.linkStatus + ", node.autoReconnect:" + node.autoReconnect,
|
|
1836
1836
|
);
|
|
1837
1837
|
// node.initKNXConnection();
|
|
@@ -1840,7 +1840,7 @@ module.exports = (RED) => {
|
|
|
1840
1840
|
|
|
1841
1841
|
node.Disconnect = async (_sNodeStatus = "", _sColor = "grey") => {
|
|
1842
1842
|
if (node.linkStatus === "disconnected") {
|
|
1843
|
-
|
|
1843
|
+
node.sysLogger?.debug("Disconnect: already not connected:" + node.linkStatus + ", node.autoReconnect:" + node.autoReconnect);
|
|
1844
1844
|
return;
|
|
1845
1845
|
}
|
|
1846
1846
|
node.linkStatus = "disconnected"; // 29/08/2019 signal disconnection
|
|
@@ -1848,13 +1848,13 @@ module.exports = (RED) => {
|
|
|
1848
1848
|
try {
|
|
1849
1849
|
if (node.knxConnection !== null) await node.knxConnection.Disconnect();
|
|
1850
1850
|
} catch (error) {
|
|
1851
|
-
|
|
1851
|
+
node.sysLogger?.debug(
|
|
1852
1852
|
"Disconnected: node.knxConnection.Disconnect() " + (error.message || "") + " , node.autoReconnect:" + node.autoReconnect,
|
|
1853
1853
|
);
|
|
1854
1854
|
}
|
|
1855
1855
|
node.setAllClientsStatus("Disconnected", _sColor, _sNodeStatus);
|
|
1856
1856
|
saveExposedGAs(); // 04/04/2021 save the current values of GA payload
|
|
1857
|
-
|
|
1857
|
+
node.sysLogger?.debug("Disconnected, node.autoReconnect:" + node.autoReconnect);
|
|
1858
1858
|
};
|
|
1859
1859
|
|
|
1860
1860
|
node.on("close", async function (done) {
|
|
@@ -1863,7 +1863,7 @@ module.exports = (RED) => {
|
|
|
1863
1863
|
} catch (error) { /* empty */ }
|
|
1864
1864
|
node.nodeClients = []; // 05/04/2022 Nullify
|
|
1865
1865
|
try {
|
|
1866
|
-
if (node.sysLogger !==
|
|
1866
|
+
if (node.sysLogger !== null) node.sysLogger = null;
|
|
1867
1867
|
loggerEngine.destroy();
|
|
1868
1868
|
} catch (error) { /* empty */ }
|
|
1869
1869
|
done();
|
package/nodes/knxUltimate.js
CHANGED
|
@@ -10,7 +10,7 @@ module.exports = function (RED) {
|
|
|
10
10
|
function knxUltimate(config) {
|
|
11
11
|
RED.nodes.createNode(this, config);
|
|
12
12
|
const node = this;
|
|
13
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
13
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
14
14
|
// 11/11/2021 Is the node server disabled by the flow "disable" command?
|
|
15
15
|
if (node.serverKNX === null) {
|
|
16
16
|
node.status({ fill: 'red', shape: 'dot', text: '[THE GATEWAY NODE HAS BEEN DISABLED]' });
|
|
@@ -10,7 +10,7 @@ module.exports = function (RED) {
|
|
|
10
10
|
|
|
11
11
|
RED.nodes.createNode(this, config);
|
|
12
12
|
const node = this;
|
|
13
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
13
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
14
14
|
node.name = config.name || 'KNX Alerter';
|
|
15
15
|
node.listenallga = true; // Dont' remove this.
|
|
16
16
|
node.notifyreadrequest = false;
|
|
@@ -35,7 +35,7 @@ module.exports = function (RED) {
|
|
|
35
35
|
function knxUltimateAutoResponder(config) {
|
|
36
36
|
RED.nodes.createNode(this, config)
|
|
37
37
|
const node = this
|
|
38
|
-
node.serverKNX = RED.nodes.getNode(config.server)
|
|
38
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined
|
|
39
39
|
node.topic = node.name
|
|
40
40
|
node.name = config.name === undefined ? 'Auto responder' : config.name
|
|
41
41
|
node.outputtopic = node.name
|
|
@@ -17,7 +17,7 @@ module.exports = function (RED) {
|
|
|
17
17
|
function knxUltimateGarageDoorBarrierOpener(config) {
|
|
18
18
|
RED.nodes.createNode(this, config);
|
|
19
19
|
const node = this;
|
|
20
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
20
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
21
21
|
// 11/11/2021 Is the node server disabled by the flow "disable" command?
|
|
22
22
|
if (node.serverKNX === null) {
|
|
23
23
|
node.status({ fill: 'red', shape: 'dot', text: '[THE GATEWAY NODE HAS BEEN DISABLED]' });
|
|
@@ -29,7 +29,7 @@ module.exports = function (RED) {
|
|
|
29
29
|
function knxUltimateGlobalContext(config) {
|
|
30
30
|
RED.nodes.createNode(this, config)
|
|
31
31
|
const node = this
|
|
32
|
-
node.serverKNX = RED.nodes.getNode(config.server)
|
|
32
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined
|
|
33
33
|
node.topic = node.name
|
|
34
34
|
node.name = config.name === undefined ? 'KNXGlobalContext' : config.name
|
|
35
35
|
node.outputtopic = node.name
|
|
@@ -2,8 +2,8 @@ module.exports = function (RED) {
|
|
|
2
2
|
function knxUltimateHueBattery(config) {
|
|
3
3
|
RED.nodes.createNode(this, config);
|
|
4
4
|
const node = this;
|
|
5
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
6
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
5
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
6
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
7
7
|
node.topic = node.name;
|
|
8
8
|
node.name = config.name === undefined ? 'Hue' : config.name;
|
|
9
9
|
node.dpt = '';
|
|
@@ -4,8 +4,8 @@ module.exports = function (RED) {
|
|
|
4
4
|
function knxUltimateHueButton(config) {
|
|
5
5
|
RED.nodes.createNode(this, config);
|
|
6
6
|
const node = this;
|
|
7
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
8
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
7
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
8
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
9
9
|
node.topic = node.name;
|
|
10
10
|
node.name = config.name === undefined ? 'Hue' : config.name;
|
|
11
11
|
node.dpt = '';
|
|
@@ -93,7 +93,7 @@ module.exports = function (RED) {
|
|
|
93
93
|
if (_event.id === config.hueDevice) {
|
|
94
94
|
|
|
95
95
|
// IMPORTANT: exit if no button last_event present.
|
|
96
|
-
if (!_event.hasOwnProperty("button") || _event.button
|
|
96
|
+
if (!_event.hasOwnProperty("button") || _event.button?.last_event === undefined) return;
|
|
97
97
|
|
|
98
98
|
const knxMsgPayload = {};
|
|
99
99
|
let flowMsgPayload = true;
|
|
@@ -134,7 +134,7 @@ module.exports = function (RED) {
|
|
|
134
134
|
knxMsgPayload.dpt = config.dptshort_release;
|
|
135
135
|
knxMsgPayload.payload = node.short_releaseValue;
|
|
136
136
|
// Send to KNX bus
|
|
137
|
-
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) {
|
|
137
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined && node.serverKNX !== undefined) {
|
|
138
138
|
node.serverKNX.sendKNXTelegramToKNXEngine({
|
|
139
139
|
grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id,
|
|
140
140
|
});
|
|
@@ -159,7 +159,7 @@ module.exports = function (RED) {
|
|
|
159
159
|
knxMsgPayload.payload = node.long_pressValue ? { decr_incr: 0, data: 3 } : { decr_incr: 1, data: 3 }; // If the light is turned on, the initial DIM direction must be down, otherwise, up
|
|
160
160
|
}
|
|
161
161
|
// Send to KNX bus
|
|
162
|
-
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) {
|
|
162
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined && node.serverKNX !== undefined) {
|
|
163
163
|
node.serverKNX.sendKNXTelegramToKNXEngine({
|
|
164
164
|
grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id,
|
|
165
165
|
});
|
|
@@ -184,7 +184,7 @@ module.exports = function (RED) {
|
|
|
184
184
|
flowMsg.rawEvent = _event;
|
|
185
185
|
flowMsg.payload = flowMsgPayload;
|
|
186
186
|
node.send(flowMsg);
|
|
187
|
-
|
|
187
|
+
if (node.serverKNX === undefined) node.setNodeStatusHue({ fill: 'green', shape: 'dot', text: '', payload: flowMsg.event })
|
|
188
188
|
}
|
|
189
189
|
} catch (error) {
|
|
190
190
|
node.setNodeStatusHue({
|
|
@@ -208,7 +208,7 @@ module.exports = function (RED) {
|
|
|
208
208
|
node.isTimerDimStopRunning = false;
|
|
209
209
|
knxMsgPayload.payload = { decr_incr: 0, data: 0 }; // Payload for the output msg
|
|
210
210
|
// Send to KNX bus
|
|
211
|
-
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) {
|
|
211
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined && node.serverKNX !== undefined) {
|
|
212
212
|
node.serverKNX.sendKNXTelegramToKNXEngine({
|
|
213
213
|
grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id,
|
|
214
214
|
});
|
|
@@ -2,8 +2,8 @@ module.exports = function (RED) {
|
|
|
2
2
|
function knxUltimateHueContactSensor(config) {
|
|
3
3
|
RED.nodes.createNode(this, config)
|
|
4
4
|
const node = this
|
|
5
|
-
node.serverKNX = RED.nodes.getNode(config.server)
|
|
6
|
-
node.serverHue = RED.nodes.getNode(config.serverHue)
|
|
5
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined
|
|
6
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined
|
|
7
7
|
node.topic = node.name
|
|
8
8
|
node.name = config.name === undefined ? 'Hue' : config.name
|
|
9
9
|
node.dpt = ''
|
|
@@ -10,8 +10,8 @@ module.exports = function (RED) {
|
|
|
10
10
|
function knxUltimateHueLight(config) {
|
|
11
11
|
RED.nodes.createNode(this, config);
|
|
12
12
|
const node = this;
|
|
13
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
14
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
13
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
14
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
15
15
|
|
|
16
16
|
// Convert for backward compatibility
|
|
17
17
|
if (config.nameLightKelvinDIM === undefined) {
|
|
@@ -2,8 +2,8 @@ module.exports = function (RED) {
|
|
|
2
2
|
function knxUltimateHueLightSensor(config) {
|
|
3
3
|
RED.nodes.createNode(this, config);
|
|
4
4
|
const node = this;
|
|
5
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
6
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
5
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
6
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
7
7
|
node.topic = node.name;
|
|
8
8
|
node.name = config.name === undefined ? 'Hue' : config.name;
|
|
9
9
|
node.dpt = '';
|
|
@@ -2,8 +2,8 @@ module.exports = function (RED) {
|
|
|
2
2
|
function knxUltimateHueMotion(config) {
|
|
3
3
|
RED.nodes.createNode(this, config);
|
|
4
4
|
const node = this;
|
|
5
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
6
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
5
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
6
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
7
7
|
node.topic = node.name;
|
|
8
8
|
node.name = config.name === undefined ? "Hue" : config.name;
|
|
9
9
|
node.dpt = "";
|
|
@@ -6,8 +6,8 @@ module.exports = function (RED) {
|
|
|
6
6
|
function knxUltimateHueScene(config) {
|
|
7
7
|
RED.nodes.createNode(this, config);
|
|
8
8
|
const node = this;
|
|
9
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
10
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
9
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
10
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
11
11
|
node.topic = node.name;
|
|
12
12
|
node.name = config.name === undefined ? 'Hue' : config.name;
|
|
13
13
|
node.dpt = '';
|
|
@@ -3,8 +3,8 @@ module.exports = function (RED) {
|
|
|
3
3
|
function knxUltimateHueTapDial(config) {
|
|
4
4
|
RED.nodes.createNode(this, config);
|
|
5
5
|
const node = this;
|
|
6
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
7
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
6
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
7
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
8
8
|
node.topic = node.name;
|
|
9
9
|
node.name = config.name === undefined ? 'Hue' : config.name;
|
|
10
10
|
node.dpt = '';
|
|
@@ -2,8 +2,8 @@ module.exports = function (RED) {
|
|
|
2
2
|
function knxUltimateHueTemperatureSensor(config) {
|
|
3
3
|
RED.nodes.createNode(this, config);
|
|
4
4
|
const node = this;
|
|
5
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
6
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
5
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
6
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
7
7
|
node.topic = node.name;
|
|
8
8
|
node.name = config.name === undefined ? 'Hue' : config.name;
|
|
9
9
|
node.dpt = '';
|
|
@@ -2,8 +2,8 @@ module.exports = function (RED) {
|
|
|
2
2
|
function knxUltimateHueZigbeeConnectivity(config) {
|
|
3
3
|
RED.nodes.createNode(this, config);
|
|
4
4
|
const node = this;
|
|
5
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
6
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
5
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
6
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
7
7
|
node.topic = node.name;
|
|
8
8
|
node.name = config.name === undefined ? 'Hue' : config.name;
|
|
9
9
|
node.dpt = '';
|
|
@@ -2,8 +2,8 @@ module.exports = function (RED) {
|
|
|
2
2
|
function knxUltimateHuedevice_software_update(config) {
|
|
3
3
|
RED.nodes.createNode(this, config);
|
|
4
4
|
const node = this;
|
|
5
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
6
|
-
node.serverHue = RED.nodes.getNode(config.serverHue);
|
|
5
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
6
|
+
node.serverHue = RED.nodes.getNode(config.serverHue) || undefined;
|
|
7
7
|
node.topic = node.name;
|
|
8
8
|
node.name = config.name === undefined ? 'Hue' : config.name;
|
|
9
9
|
node.dpt = '';
|
|
@@ -7,7 +7,7 @@ module.exports = function (RED) {
|
|
|
7
7
|
|
|
8
8
|
RED.nodes.createNode(this, config)
|
|
9
9
|
const node = this
|
|
10
|
-
node.serverKNX = RED.nodes.getNode(config.server)
|
|
10
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined
|
|
11
11
|
node.name = config.name || 'KNX Load Control'
|
|
12
12
|
node.topic = config.topic
|
|
13
13
|
node.dpt = config.dpt
|
|
@@ -2,7 +2,7 @@ module.exports = function (RED) {
|
|
|
2
2
|
function knxUltimateLogger(config) {
|
|
3
3
|
RED.nodes.createNode(this, config)
|
|
4
4
|
const node = this
|
|
5
|
-
node.serverKNX = RED.nodes.getNode(config.server)
|
|
5
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined
|
|
6
6
|
node.notifyreadrequestalsorespondtobus = 'false'
|
|
7
7
|
node.notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized = ''
|
|
8
8
|
node.notifyreadrequest = true
|
|
@@ -8,7 +8,7 @@ module.exports = function (RED) {
|
|
|
8
8
|
|
|
9
9
|
RED.nodes.createNode(this, config)
|
|
10
10
|
const node = this
|
|
11
|
-
node.serverKNX = RED.nodes.getNode(config.server)
|
|
11
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined
|
|
12
12
|
node.name = config.name || 'KNX Scene Controller'
|
|
13
13
|
node.outputtopic = typeof config.outputtopic === 'undefined' ? '' : config.outputtopic
|
|
14
14
|
node.topic = config.topic || ''
|
|
@@ -5,7 +5,7 @@ module.exports = function (RED) {
|
|
|
5
5
|
function knxUltimateViewer(config) {
|
|
6
6
|
RED.nodes.createNode(this, config);
|
|
7
7
|
const node = this;
|
|
8
|
-
node.serverKNX = RED.nodes.getNode(config.server);
|
|
8
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined;
|
|
9
9
|
node.topic = node.name;
|
|
10
10
|
node.name = config.name === undefined ? 'KNXViewer' : config.name;
|
|
11
11
|
node.outputtopic = node.name;
|
|
@@ -4,7 +4,7 @@ module.exports = function (RED) {
|
|
|
4
4
|
function knxUltimateWatchDog(config) {
|
|
5
5
|
RED.nodes.createNode(this, config)
|
|
6
6
|
const node = this
|
|
7
|
-
node.serverKNX = RED.nodes.getNode(config.server)
|
|
7
|
+
node.serverKNX = RED.nodes.getNode(config.server) || undefined
|
|
8
8
|
node.dpt = '1.001'
|
|
9
9
|
node.notifyreadrequestalsorespondtobus = 'false'
|
|
10
10
|
node.notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized = ''
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=16.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.3.
|
|
6
|
+
"version": "3.3.23",
|
|
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",
|