node-red-contrib-knx-ultimate 3.2.6 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/nodes/knxUltimate-config.js +18 -5
- package/nodes/knxUltimate.html +2 -1
- package/nodes/knxUltimate.js +10 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -317,6 +317,7 @@ module.exports = (RED) => {
|
|
|
317
317
|
_devicename: _oClient.name ? _oClient.name : "",
|
|
318
318
|
_outputtopic: _oClient.outputtopic,
|
|
319
319
|
_oNode: _oClient,
|
|
320
|
+
_echoed: _echoed
|
|
320
321
|
});
|
|
321
322
|
_oClient.previouspayload = ""; // 05/04/2021 Added previous payload
|
|
322
323
|
_oClient.currentPayload = msg.payload;
|
|
@@ -739,6 +740,8 @@ module.exports = (RED) => {
|
|
|
739
740
|
let _dest = null;
|
|
740
741
|
_dest = _datagram.cEMIMessage.dstAddress.toString();
|
|
741
742
|
|
|
743
|
+
_echoed = _echoed || false;
|
|
744
|
+
|
|
742
745
|
const isRepeated = _datagram.cEMIMessage.control.repeat !== 1;
|
|
743
746
|
// 06/06/2021 Supergiovane: check if i can handle the telegrams with "Repeated" flag
|
|
744
747
|
if (node.ignoreTelegramsWithRepeatedFlag === true && isRepeated) {
|
|
@@ -812,6 +815,7 @@ module.exports = (RED) => {
|
|
|
812
815
|
_devicename: _input.name ? _input.name : "",
|
|
813
816
|
_outputtopic: _input.outputtopic,
|
|
814
817
|
_oNode: null,
|
|
818
|
+
_echoed: _echoed
|
|
815
819
|
});
|
|
816
820
|
_input.RecallScene(msgRecall.payload, false);
|
|
817
821
|
} catch (error) { }
|
|
@@ -827,6 +831,7 @@ module.exports = (RED) => {
|
|
|
827
831
|
_devicename: _input.name || "",
|
|
828
832
|
_outputtopic: _dest,
|
|
829
833
|
_oNode: null,
|
|
834
|
+
_echoed: _echoed
|
|
830
835
|
});
|
|
831
836
|
_input.SaveScene(msgSave.payload, false);
|
|
832
837
|
} catch (error) { }
|
|
@@ -853,6 +858,7 @@ module.exports = (RED) => {
|
|
|
853
858
|
_devicename: oDevice.name || "",
|
|
854
859
|
_outputtopic: oDevice.outputtopic,
|
|
855
860
|
_oNode: null,
|
|
861
|
+
_echoed: _echoed
|
|
856
862
|
});
|
|
857
863
|
oDevice.currentPayload = msg.payload;
|
|
858
864
|
_input.setNodeStatus({
|
|
@@ -892,7 +898,8 @@ module.exports = (RED) => {
|
|
|
892
898
|
_event: _evt,
|
|
893
899
|
_Rawvalue: _rawValue,
|
|
894
900
|
_outputtopic: _dest,
|
|
895
|
-
_oNode: _input
|
|
901
|
+
_oNode: _input,
|
|
902
|
+
_echoed: _echoed
|
|
896
903
|
});
|
|
897
904
|
_input.setNodeStatus({
|
|
898
905
|
fill: "green",
|
|
@@ -918,6 +925,7 @@ module.exports = (RED) => {
|
|
|
918
925
|
_devicename: _input.name ? _input.name : "",
|
|
919
926
|
_outputtopic: _input.outputtopic,
|
|
920
927
|
_oNode: _input,
|
|
928
|
+
_echoed: _echoed
|
|
921
929
|
});
|
|
922
930
|
// Check RBE INPUT from KNX Bus, to avoid send the payload to the flow, if it's equal to the current payload
|
|
923
931
|
if (!checkRBEInputFromKNXBusAllowSend(_input, msg.payload)) {
|
|
@@ -973,7 +981,8 @@ module.exports = (RED) => {
|
|
|
973
981
|
_event: _evt,
|
|
974
982
|
_Rawvalue: _rawValue,
|
|
975
983
|
_outputtopic: _dest,
|
|
976
|
-
_oNode: _input
|
|
984
|
+
_oNode: _input,
|
|
985
|
+
_echoed: _echoed
|
|
977
986
|
});
|
|
978
987
|
_input.setNodeStatus({
|
|
979
988
|
fill: "blue",
|
|
@@ -1000,6 +1009,7 @@ module.exports = (RED) => {
|
|
|
1000
1009
|
_devicename: _input.name ? _input.name : "",
|
|
1001
1010
|
_outputtopic: _input.outputtopic,
|
|
1002
1011
|
_oNode: _input,
|
|
1012
|
+
_echoed: _echoed
|
|
1003
1013
|
});
|
|
1004
1014
|
// Check RBE INPUT from KNX Bus, to avoid send the payload to the flow, if it's equal to the current payload
|
|
1005
1015
|
if (!checkRBEInputFromKNXBusAllowSend(_input, msg.payload)) {
|
|
@@ -1054,7 +1064,8 @@ module.exports = (RED) => {
|
|
|
1054
1064
|
_event: _evt,
|
|
1055
1065
|
_Rawvalue: null,
|
|
1056
1066
|
_outputtopic: _dest,
|
|
1057
|
-
_oNode: _input
|
|
1067
|
+
_oNode: _input,
|
|
1068
|
+
_echoed: _echoed
|
|
1058
1069
|
});
|
|
1059
1070
|
_input.setNodeStatus({
|
|
1060
1071
|
fill: "grey",
|
|
@@ -1081,6 +1092,7 @@ module.exports = (RED) => {
|
|
|
1081
1092
|
_devicename: _input.name || "",
|
|
1082
1093
|
_outputtopic: _input.outputtopic,
|
|
1083
1094
|
_oNode: _input,
|
|
1095
|
+
_echoed: _echoed
|
|
1084
1096
|
});
|
|
1085
1097
|
msg.previouspayload = typeof _input.currentPayload !== "undefined" ? _input.currentPayload : ""; // 24/01/2020 Reset previous payload
|
|
1086
1098
|
// 24/09/2019 Autorespond to BUS
|
|
@@ -1145,6 +1157,7 @@ module.exports = (RED) => {
|
|
|
1145
1157
|
}
|
|
1146
1158
|
// END Handle BUS events---------------------------------------------------------------------------------------
|
|
1147
1159
|
|
|
1160
|
+
// oKNXMessage is { grpaddr, payload,dpt,outputtype (write or response),nodecallerid (node caller)}. 06/03/2020 "Read" request does have the lower priority in the queue, so firstly, i search for "read" telegrams and i move it on the top of the queue pile.
|
|
1148
1161
|
node.sendKNXTelegramToKNXEngine = (_oKNXMessage) => {
|
|
1149
1162
|
if (node.knxConnection === null || node.linkStatus !== "connected") return;
|
|
1150
1163
|
|
|
@@ -1157,7 +1170,6 @@ module.exports = (RED) => {
|
|
|
1157
1170
|
);
|
|
1158
1171
|
}
|
|
1159
1172
|
|
|
1160
|
-
// oKNXMessage is { grpaddr, payload,dpt,outputtype (write or response),nodecallerid (node caller)}. 06/03/2020 "Read" request does have the lower priority in the queue, so firstly, i search for "read" telegrams and i move it on the top of the queue pile.
|
|
1161
1173
|
|
|
1162
1174
|
// 19/01/2023 FORMATTING THE OUTPUT PAYLOAD (ROUND, ETC) BASED ON THE NODE CONFIG
|
|
1163
1175
|
//* ********************************************************
|
|
@@ -1316,7 +1328,7 @@ module.exports = (RED) => {
|
|
|
1316
1328
|
}
|
|
1317
1329
|
|
|
1318
1330
|
|
|
1319
|
-
function buildInputMessage({ _srcGA, _destGA, _event, _Rawvalue, _inputDpt, _devicename, _outputtopic, _oNode }) {
|
|
1331
|
+
function buildInputMessage({ _srcGA, _destGA, _event, _Rawvalue, _inputDpt, _devicename, _outputtopic, _oNode, _echoed = false }) {
|
|
1320
1332
|
let sPayloadmeasureunit = "unknown";
|
|
1321
1333
|
let sDptdesc = "unknown";
|
|
1322
1334
|
let sPayloadsubtypevalue = "unknown";
|
|
@@ -1512,6 +1524,7 @@ module.exports = (RED) => {
|
|
|
1512
1524
|
payloadmeasureunit: sPayloadmeasureunit,
|
|
1513
1525
|
payloadsubtypevalue: sPayloadsubtypevalue,
|
|
1514
1526
|
gainfo: gainfo,
|
|
1527
|
+
echoed: _echoed,
|
|
1515
1528
|
knx: {
|
|
1516
1529
|
event: _event,
|
|
1517
1530
|
dpt: sInputDpt,
|
package/nodes/knxUltimate.html
CHANGED
|
@@ -966,7 +966,8 @@ msg = {
|
|
|
966
966
|
maingroupnumber:"1"
|
|
967
967
|
middlegroupnumber:"1"
|
|
968
968
|
ganumber:"0"
|
|
969
|
-
}
|
|
969
|
+
},
|
|
970
|
+
echoed:true, // True if the msg is coming from the input PIN, otherwise false if the msg is coming form the KNX BUS.
|
|
970
971
|
knx: { // This is a representation of the KNX BUS telegram, coming from BUS
|
|
971
972
|
event: "GroupValue_Write" // (or "GroupValue_Response", or "GroupValue_Read")
|
|
972
973
|
dpt: "1.001"
|
package/nodes/knxUltimate.js
CHANGED
|
@@ -38,7 +38,7 @@ module.exports = function (RED) {
|
|
|
38
38
|
devicename = devicename || '';
|
|
39
39
|
dpt = (typeof dpt === 'undefined' || dpt == '') ? '' : ` DPT${dpt}`;
|
|
40
40
|
payload = typeof payload === 'object' ? JSON.stringify(payload) : payload;
|
|
41
|
-
node.status({ fill, shape, text: `${GA + payload + (node.listenallga === true ? ` ${devicename}` : '')} (${dDate.getDate()}, ${dDate.toLocaleTimeString()} ${text}` });
|
|
41
|
+
node.status({ fill, shape, text: `${GA + payload + (node.listenallga === true ? ` ${devicename}` : '')} (day ${dDate.getDate()}, ${dDate.toLocaleTimeString()}) ${text}` });
|
|
42
42
|
// 16/02/2020 signal errors to the server
|
|
43
43
|
if (fill.toUpperCase() === 'RED') {
|
|
44
44
|
if (node.serverKNX) {
|
|
@@ -259,7 +259,11 @@ module.exports = function (RED) {
|
|
|
259
259
|
}
|
|
260
260
|
// -+++++++++++++++++++++++++++++++++++++++++++
|
|
261
261
|
//#endregion
|
|
262
|
-
|
|
262
|
+
// if (msg.echoed !== undefined && msg.echoed === true) {
|
|
263
|
+
// node.setNodeStatus({
|
|
264
|
+
// fill: 'grey', shape: 'dot', text: 'Output echoed msg', payload: '', GA: node.topic, dpt: '', devicename: '',
|
|
265
|
+
// });
|
|
266
|
+
// }
|
|
263
267
|
if (msg !== undefined) node.send(msg);
|
|
264
268
|
};
|
|
265
269
|
|
|
@@ -561,16 +565,13 @@ module.exports = function (RED) {
|
|
|
561
565
|
} else {
|
|
562
566
|
try {
|
|
563
567
|
node.currentPayload = msg.payload;// 31/12/2019 Set the current value (because, if the node is a virtual device, then it'll never fire "GroupValue_Write" in the server node, causing the currentPayload to never update)
|
|
564
|
-
// if (node.serverKNX.linkStatus === "connected") {
|
|
565
|
-
node.serverKNX.sendKNXTelegramToKNXEngine({
|
|
566
|
-
grpaddr, payload: msg.payload, dpt, outputtype, nodecallerid: node.id,
|
|
567
|
-
});
|
|
568
568
|
node.setNodeStatus({
|
|
569
569
|
fill: 'green', shape: 'dot', text: 'Writing', payload: msg.payload, GA: grpaddr, dpt, devicename: '',
|
|
570
570
|
});
|
|
571
|
-
//
|
|
572
|
-
|
|
573
|
-
|
|
571
|
+
// if (node.serverKNX.linkStatus === "connected") {
|
|
572
|
+
node.serverKNX.sendKNXTelegramToKNXEngine({
|
|
573
|
+
grpaddr: grpaddr, payload: msg.payload, dpt: dpt, outputtype: outputtype, nodecallerid: node.id,
|
|
574
|
+
});
|
|
574
575
|
} catch (error) { }
|
|
575
576
|
}
|
|
576
577
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=16.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.2.
|
|
6
|
+
"version": "3.2.7",
|
|
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",
|