node-red-contrib-knx-ultimate 2.1.63 → 2.2.1

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.
@@ -121,6 +121,7 @@ return msg;`,
121
121
  : Number(config.delaybetweentelegramsfurtherdelayREAD); // 18/05/2020 delay multiplicator only for "read" telegrams.
122
122
  node.delaybetweentelegramsREADCount = 0; // 18/05/2020 delay multiplicator only for "read" telegrams.
123
123
  node.timerDoInitialRead = null; // 17/02/2020 Timer (timeout) to do initial read of all nodes requesting initial read, after all nodes have been registered to the sercer
124
+ node.timerCallConnectToHueBridgeOfAllHUEServers = null; // // Timer for the callConnectToHueBridgeOfAllHUEServers function
124
125
  node.stopETSImportIfNoDatapoint = typeof config.stopETSImportIfNoDatapoint === "undefined" ? "stop" : config.stopETSImportIfNoDatapoint; // 09/01/2020 Stop, Import Fake or Skip the import if a group address has unset datapoint
125
126
  node.csv = readCSV(config.csv); // Array from ETS CSV Group Addresses {ga:group address, dpt: datapoint, devicename: full device name with main and subgroups}
126
127
  node.localEchoInTunneling = typeof config.localEchoInTunneling !== "undefined" ? config.localEchoInTunneling : true;
@@ -130,7 +131,7 @@ return msg;`,
130
131
  node.sysLogger = null; // 20/03/2022 Default
131
132
  try {
132
133
  node.sysLogger = loggerEngine.get({ loglevel: node.loglevel }); // 08/04/2021 new logger to adhere to the loglevel selected in the config-window
133
- } catch (error) {}
134
+ } catch (error) { }
134
135
  // 12/11/2021 Connect at start delay
135
136
  node.autoReconnect = true; // 20/03/2022 Default
136
137
  if (config.autoReconnect === "no" || config.autoReconnect === false) {
@@ -221,13 +222,13 @@ return msg;`,
221
222
  node.jKNXSecureKeyring = await knx.KNXSecureKeyring.keyring.load(node.keyringFileXML, node.credentials.keyringFilePassword);
222
223
  RED.log.info(
223
224
  "KNX-Secure: Keyring for ETS proj " +
224
- node.jKNXSecureKeyring.ETSProjectName +
225
- ", created by " +
226
- node.jKNXSecureKeyring.ETSCreatedBy +
227
- " on " +
228
- node.jKNXSecureKeyring.ETSCreated +
229
- " succesfully validated with provided password, using node " +
230
- node.name || node.id,
225
+ node.jKNXSecureKeyring.ETSProjectName +
226
+ ", created by " +
227
+ node.jKNXSecureKeyring.ETSCreatedBy +
228
+ " on " +
229
+ node.jKNXSecureKeyring.ETSCreated +
230
+ " succesfully validated with provided password, using node " +
231
+ node.name || node.id,
231
232
  );
232
233
  } else {
233
234
  RED.log.info("KNX-Unsecure: connection to insecure interface/router using node " + node.name || node.id);
@@ -330,8 +331,8 @@ return msg;`,
330
331
  if (node.sysLogger !== undefined && node.sysLogger !== null) {
331
332
  node.sysLogger.info(
332
333
  "User has been created on the Hue Bridge. The following username can be used to\n" +
333
- "authenticate with the Bridge and provide full local access to the Hue Bridge.\n" +
334
- "YOU SHOULD TREAT THIS LIKE A PASSWORD\n",
334
+ "authenticate with the Bridge and provide full local access to the Hue Bridge.\n" +
335
+ "YOU SHOULD TREAT THIS LIKE A PASSWORD\n",
335
336
  );
336
337
  }
337
338
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info(`Hue Bridge User: ${createdUser.username}`);
@@ -367,8 +368,8 @@ return msg;`,
367
368
  if (node.sysLogger !== undefined && node.sysLogger !== null) {
368
369
  node.sysLogger.info(
369
370
  "User has been created on the Hue Bridge. The following username can be used to\n" +
370
- "authenticate with the Bridge and provide full local access to the Hue Bridge.\n" +
371
- "YOU SHOULD TREAT THIS LIKE A PASSWORD\n",
371
+ "authenticate with the Bridge and provide full local access to the Hue Bridge.\n" +
372
+ "YOU SHOULD TREAT THIS LIKE A PASSWORD\n",
372
373
  );
373
374
  }
374
375
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info(`Hue Bridge User: ${createdUser.username}`);
@@ -428,7 +429,7 @@ return msg;`,
428
429
  res.json(RED.nodes.getNode(_node.id).csv);
429
430
  }
430
431
  });
431
- } catch (error) {}
432
+ } catch (error) { }
432
433
  }
433
434
  });
434
435
 
@@ -452,7 +453,7 @@ return msg;`,
452
453
  if (sAddresses !== "") jListInterfaces.push({ name: ifname, address: sAddresses });
453
454
  }
454
455
  });
455
- } catch (error) {}
456
+ } catch (error) { }
456
457
  res.json(jListInterfaces);
457
458
  });
458
459
 
@@ -462,7 +463,7 @@ return msg;`,
462
463
  const sFile = path.join(node.userDir, "knxpersistvalues", "knxpersist" + req.query.nodeID + ".json");
463
464
  try {
464
465
  fs.unlinkSync(sFile);
465
- } catch (error) {}
466
+ } catch (error) { }
466
467
  res.json({ error: "No error" });
467
468
  } else {
468
469
  res.json({ error: "No NodeID specified" });
@@ -524,13 +525,13 @@ return msg;`,
524
525
  // Remove the client node from the clients array
525
526
  try {
526
527
  node.nodeClients = node.nodeClients.filter((x) => x.id !== _Node.id);
527
- } catch (error) {}
528
+ } catch (error) { /* empty */ }
528
529
 
529
530
  // If no clien nodes, disconnect from bus.
530
531
  if (node.nodeClients.length === 0) {
531
532
  try {
532
533
  node.Disconnect();
533
- } catch (error) {}
534
+ } catch (error) { /* empty */ }
534
535
  }
535
536
  };
536
537
 
@@ -540,7 +541,7 @@ return msg;`,
540
541
  loadExposedGAs(); // 04/04/2021 load the current values of GA payload
541
542
  try {
542
543
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info("KNXUltimate-config: Loaded saved GA values", node.exposedGAs.length);
543
- } catch (error) {}
544
+ } catch (error) { }
544
545
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info("KNXUltimate-config: Do DoInitialReadFromKNXBusOrFile");
545
546
  try {
546
547
  const readHistory = [];
@@ -597,16 +598,7 @@ return msg;`,
597
598
  dpt: oClient.dpt,
598
599
  devicename: oClient.devicename || "",
599
600
  });
600
- if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(
601
- "knxUltimate-config: DoInitialReadFromKNXBusOrFile: Datapoint may have been changed, remove the value from persist file of " +
602
- oClient.topic +
603
- " Devicename " +
604
- oClient.name +
605
- " Currend DPT " +
606
- oClient.dpt +
607
- " Node.id " +
608
- oClient.id,
609
- );
601
+ if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error("knxUltimate-config: 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);
610
602
  } else {
611
603
  if (oClient.notifyresponse) oClient.handleSend(msg);
612
604
  }
@@ -636,7 +628,7 @@ return msg;`,
636
628
  }
637
629
  }
638
630
  }
639
- } catch (error) {}
631
+ } catch (error) { }
640
632
  }
641
633
  });
642
634
 
@@ -684,9 +676,20 @@ return msg;`,
684
676
  }
685
677
  }
686
678
  });
687
- } catch (error) {}
679
+ } catch (error) { }
680
+ }
681
+ // Call the connect function of all hue-config nodes.
682
+ function callConnectToHueBridgeOfAllHUEServers() {
683
+ RED.nodes.eachNode((_node) => {
684
+ if (_node.type === 'hue-config') {
685
+ try {
686
+ RED.nodes.getNode(_node.id).ConnectToHueBridge();
687
+ } catch (error) {
688
+ if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error("callConnectToHueBridgeOfAllHUEServers: Node " + _node.name + " " + error.message);
689
+ }
690
+ }
691
+ });
688
692
  }
689
-
690
693
  // 01/02/2020 Dinamic change of the KNX Gateway IP, Port and Physical Address
691
694
  // This new thing has been requested by proServ RealKNX staff.
692
695
  node.setGatewayConfig = (
@@ -713,14 +716,14 @@ return msg;`,
713
716
 
714
717
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info(
715
718
  "Node's main config setting has been changed. New config: IP " +
716
- node.host +
717
- " Port " +
718
- node.port +
719
- " PhysicalAddress " +
720
- node.physAddr +
721
- " BindToInterface " +
722
- node.KNXEthInterface +
723
- (typeof _CSV !== "undefined" && _CSV !== "" ? ". A new group address CSV has been imported." : ""),
719
+ node.host +
720
+ " Port " +
721
+ node.port +
722
+ " PhysicalAddress " +
723
+ node.physAddr +
724
+ " BindToInterface " +
725
+ node.KNXEthInterface +
726
+ (typeof _CSV !== "undefined" && _CSV !== "" ? ". A new group address CSV has been imported." : ""),
724
727
  );
725
728
 
726
729
  try {
@@ -728,7 +731,7 @@ return msg;`,
728
731
  // node.setKnxConnectionProperties(); // 28/12/2021 Commented
729
732
  node.setAllClientsStatus("CONFIG", "yellow", "KNXUltimage-config:setGatewayConfig: disconnected by new setting...");
730
733
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.debug("KNXUltimage-config:setGatewayConfig: disconnected by setGatewayConfig.");
731
- } catch (error) {}
734
+ } catch (error) { }
732
735
  };
733
736
 
734
737
  // 05/05/2021 force connection or disconnection from the KNX BUS and disable the autoreconenctions attempts.
@@ -737,13 +740,13 @@ return msg;`,
737
740
  if (_bConnection === undefined) return;
738
741
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info(
739
742
  (_bConnection === true ? "Forced connection from watchdog" : "Forced disconnection from watchdog") +
740
- node.host +
741
- " Port " +
742
- node.port +
743
- " PhysicalAddress " +
744
- node.physAddr +
745
- " BindToInterface " +
746
- node.KNXEthInterface,
743
+ node.host +
744
+ " Port " +
745
+ node.port +
746
+ " PhysicalAddress " +
747
+ node.physAddr +
748
+ " BindToInterface " +
749
+ node.KNXEthInterface,
747
750
  );
748
751
  if (_bConnection === true) {
749
752
  // CONNECT AND ENABLE RECONNECTION ATTEMPTS
@@ -751,7 +754,7 @@ return msg;`,
751
754
  node.Disconnect();
752
755
  node.setAllClientsStatus("CONFIG", "yellow", "Forced GW connection from watchdog.");
753
756
  node.autoReconnect = true;
754
- } catch (error) {}
757
+ } catch (error) { }
755
758
  } else {
756
759
  // DISCONNECT AND DISABLE RECONNECTION ATTEMPTS
757
760
  try {
@@ -761,7 +764,7 @@ return msg;`,
761
764
  // 21/03/2022 fixed possible memory leak. Previously was setTimeout without "let t = ".
762
765
  node.setAllClientsStatus("CONFIG", "yellow", "Forced GW disconnection and stop reconnection attempts, from watchdog.");
763
766
  }, 2000);
764
- } catch (error) {}
767
+ } catch (error) { }
765
768
  }
766
769
  };
767
770
 
@@ -816,9 +819,9 @@ return msg;`,
816
819
  }
817
820
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info(
818
821
  "knxUltimate-config: net.isIP: The gateway is not specified as IP. The DNS resolver pointed me to the IP " +
819
- node.host +
820
- ", in Config node " +
821
- node.name,
822
+ node.host +
823
+ ", in Config node " +
824
+ node.name,
822
825
  );
823
826
  node.knxConnectionProperties.ipAddr = resolvedIP;
824
827
  case 4:
@@ -847,7 +850,7 @@ return msg;`,
847
850
  // 08/10/2021 Delete the interface
848
851
  try {
849
852
  delete node.knxConnectionProperties.interface;
850
- } catch (error) {}
853
+ } catch (error) { }
851
854
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info("KNXUltimate-config: Bind KNX Bus to interface (Auto). Node " + node.name);
852
855
  }
853
856
  };
@@ -869,9 +872,9 @@ return msg;`,
869
872
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info("knxUltimate-config: No nodes linked to this gateway " + node.name);
870
873
  try {
871
874
  if (node.linkStatus !== "disconnected") node.Disconnect();
872
- } catch (error) {}
875
+ } catch (error) { }
873
876
  return;
874
- } catch (error) {}
877
+ } catch (error) { }
875
878
  }
876
879
 
877
880
  try {
@@ -901,13 +904,13 @@ return msg;`,
901
904
  node.knxConnection.on(knx.KNXClient.KNXClientEvents.error, (err) => {
902
905
  try {
903
906
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error("knxUltimate-config: received KNXClientEvents.error: " + (err.message === undefined ? err : err.message));
904
- } catch (error) {}
907
+ } catch (error) { }
905
908
  // 31/03/2022 Don't care about some errors
906
909
  if (err.message !== undefined && (err.message === "ROUTING_LOST_MESSAGE" || err.message === "ROUTING_BUSY")) {
907
910
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(
908
911
  "knxUltimate-config: KNXClientEvents.error: " +
909
- (err.message === undefined ? err : err.message) +
910
- " consider DECREASING the transmission speed, by increasing the telegram's DELAY in the gateway configuration node!",
912
+ (err.message === undefined ? err : err.message) +
913
+ " consider DECREASING the transmission speed, by increasing the telegram's DELAY in the gateway configuration node!",
911
914
  );
912
915
  return;
913
916
  }
@@ -937,15 +940,14 @@ return msg;`,
937
940
  }
938
941
  // 12/11/2021 Starts the telegram out queue handler
939
942
  if (node.timerSendTelegramFromQueue !== null) clearInterval(node.timerSendTelegramFromQueue);
940
- node.timerSendTelegramFromQueue = setInterval(
941
- handleTelegramQueue,
942
- config.delaybetweentelegrams === undefined || Number(config.delaybetweentelegrams) < 20 ? 20 : Number(config.delaybetweentelegrams),
943
+ node.timerSendTelegramFromQueue = setInterval(handleTelegramQueue, config.delaybetweentelegrams === undefined || Number(config.delaybetweentelegrams) < 20 ? 20 : Number(config.delaybetweentelegrams),
943
944
  ); // 02/01/2020 Start the timer that handles the queue of telegrams
944
945
  node.linkStatus = "connected";
945
946
 
946
947
  // Start the timer to do initial read.
947
948
  if (node.timerDoInitialRead !== null) clearTimeout(node.timerDoInitialRead);
948
949
  node.timerDoInitialRead = setTimeout(DoInitialReadFromKNXBusOrFile, 6000); // 17/02/2020 Do initial read of all nodes requesting initial read
950
+ node.timerCallConnectToHueBridgeOfAllHUEServers = setTimeout(callConnectToHueBridgeOfAllHUEServers, 10000); // connects all hue-config nodes to the HUE Bridge.
949
951
  const t = setTimeout(() => {
950
952
  // 21/03/2022 fixed possible memory leak. Previously was setTimeout without "let t = ".
951
953
  node.setAllClientsStatus("Connected.", "green", "On duty.");
@@ -1040,7 +1042,7 @@ return msg;`,
1040
1042
  try {
1041
1043
  node.exposedGAs = node.exposedGAs.filter((item) => item.ga !== _dest); // Remove previous
1042
1044
  node.exposedGAs.push({ ga: _dest, rawValue: _rawValue }); // add the new
1043
- } catch (error) {}
1045
+ } catch (error) { }
1044
1046
  }
1045
1047
  switch (_evt) {
1046
1048
  case "GroupValue_Write":
@@ -1069,7 +1071,7 @@ return msg;`,
1069
1071
  _oNode: null,
1070
1072
  });
1071
1073
  input.RecallScene(msgRecall.payload, false);
1072
- } catch (error) {}
1074
+ } catch (error) { }
1073
1075
  } // 12/08/2020 Do NOT use "else", because both topics must be evaluated in case both recall and save have same group address.
1074
1076
  if (_dest === input.topicSave) {
1075
1077
  try {
@@ -1084,13 +1086,13 @@ return msg;`,
1084
1086
  _oNode: null,
1085
1087
  });
1086
1088
  input.SaveScene(msgSave.payload, false);
1087
- } catch (error) {}
1089
+ } catch (error) { }
1088
1090
  }
1089
1091
  resolve(true); // fulfilled
1090
1092
  // reject("error"); // rejected
1091
1093
  })
1092
- .then(function () {})
1093
- .catch(function () {});
1094
+ .then(function () { })
1095
+ .catch(function () { });
1094
1096
  } else {
1095
1097
  // 19/03/2020 Check and Update value if the input is part of a scene controller
1096
1098
  new Promise((resolve) => {
@@ -1125,8 +1127,8 @@ return msg;`,
1125
1127
  resolve(true); // fulfilled
1126
1128
  // reject("error"); // rejected
1127
1129
  })
1128
- .then(function () {})
1129
- .catch(function () {});
1130
+ .then(function () { })
1131
+ .catch(function () { });
1130
1132
  }
1131
1133
  } else if (input.hasOwnProperty("isLogger")) {
1132
1134
  // 26/03/2020 Coronavirus is slightly decreasing the affected numer of people. Logger Node
@@ -1144,7 +1146,7 @@ return msg;`,
1144
1146
  if (node.csv !== undefined) {
1145
1147
  try {
1146
1148
  oGA = node.csv.filter((sga) => sga.ga == _dest)[0];
1147
- } catch (error) {}
1149
+ } catch (error) { }
1148
1150
  }
1149
1151
 
1150
1152
  // 25/10/2019 TRY TO AUTO DECODE IF Group address not found in the CSV
@@ -1235,7 +1237,7 @@ return msg;`,
1235
1237
  let oGA;
1236
1238
  try {
1237
1239
  oGA = node.csv.filter((sga) => sga.ga == _dest)[0];
1238
- } catch (error) {}
1240
+ } catch (error) { }
1239
1241
 
1240
1242
  const msg = buildInputMessage({
1241
1243
  _srcGA: _src,
@@ -1323,7 +1325,7 @@ return msg;`,
1323
1325
  let oGA;
1324
1326
  try {
1325
1327
  oGA = node.csv.filter((sga) => sga.ga == _dest)[0];
1326
- } catch (error) {}
1328
+ } catch (error) { }
1327
1329
 
1328
1330
  // Read Request
1329
1331
  const msg = buildInputMessage({
@@ -1457,8 +1459,8 @@ return msg;`,
1457
1459
  if (node.telegramsQueue.length > 0) {
1458
1460
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.warn(
1459
1461
  "knxUltimate-config: handleTelegramQueue: the KNXEngine is busy or is waiting for a telegram ACK with seqNumner " +
1460
- node.knxConnection._getSeqNumber() +
1461
- ". Delay handling queue.",
1462
+ node.knxConnection._getSeqNumber() +
1463
+ ". Delay handling queue.",
1462
1464
  );
1463
1465
  }
1464
1466
  return;
@@ -1505,12 +1507,12 @@ return msg;`,
1505
1507
  dpt: oKNXMessage.dpt,
1506
1508
  devicename: "",
1507
1509
  });
1508
- } catch (error) {}
1510
+ } catch (error) { }
1509
1511
  }
1510
1512
  } else if (oKNXMessage.outputtype === "read") {
1511
1513
  try {
1512
1514
  node.knxConnection.read(oKNXMessage.grpaddr);
1513
- } catch (error) {}
1515
+ } catch (error) { }
1514
1516
  } else if (oKNXMessage.outputtype === "update") {
1515
1517
  // 05/01/2021 Update don't send anything to the bus, but instead updates the values of all nodes belonging to the group address passed
1516
1518
  // oKNXMessage = {
@@ -1576,7 +1578,7 @@ return msg;`,
1576
1578
  }
1577
1579
  }
1578
1580
  });
1579
- } catch (error) {}
1581
+ } catch (error) { }
1580
1582
  } else {
1581
1583
  // Write
1582
1584
  try {
@@ -1593,7 +1595,7 @@ return msg;`,
1593
1595
  dpt: oKNXMessage.dpt,
1594
1596
  devicename: "",
1595
1597
  });
1596
- } catch (error) {}
1598
+ } catch (error) { }
1597
1599
  }
1598
1600
  }
1599
1601
  // Remove current item in the main node.telegramsQueue array
@@ -1603,7 +1605,7 @@ return msg;`,
1603
1605
  return item;
1604
1606
  }
1605
1607
  });
1606
- } catch (error) {}
1608
+ } catch (error) { }
1607
1609
  node.lockHandleTelegramQueue = false; // Unlock the function
1608
1610
  }
1609
1611
  }
@@ -1649,7 +1651,7 @@ return msg;`,
1649
1651
  return element.value;
1650
1652
  }
1651
1653
  }
1652
- } catch (error) {}
1654
+ } catch (error) { }
1653
1655
  }
1654
1656
  throw new Error("tryToFigureOutDataPointFromRawValue: no suitable datapoint found"); // 24/08/2021 Return error if no DPT
1655
1657
  }
@@ -1687,21 +1689,21 @@ return msg;`,
1687
1689
  // Here comes if no datapoint has beeen found
1688
1690
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(
1689
1691
  "knxUltimate-config: buildInputMessage: Error returning from tryToFigureOutDataPointFromRawValue. Device " +
1690
- _srcGA +
1691
- " Destination " +
1692
- _destGA +
1693
- " Event " +
1694
- _event +
1695
- " GA's Datapoint " +
1696
- (_inputDpt === null
1697
- ? "THE ETS FILE HAS NOT BEEN IMPORTED, SO I'M TRYING TO FIGURE OUT WHAT DATAPOINT BELONGS THIS GROUP ADDRESS. DON'T BLAME ME IF I'M WRONG, INSTEAD, IMPORT THE ETS FILE!"
1698
- : _inputDpt) +
1699
- " Devicename " +
1700
- _devicename +
1701
- " Topic " +
1702
- _outputtopic +
1703
- " " +
1704
- error.message,
1692
+ _srcGA +
1693
+ " Destination " +
1694
+ _destGA +
1695
+ " Event " +
1696
+ _event +
1697
+ " GA's Datapoint " +
1698
+ (_inputDpt === null
1699
+ ? "THE ETS FILE HAS NOT BEEN IMPORTED, SO I'M TRYING TO FIGURE OUT WHAT DATAPOINT BELONGS THIS GROUP ADDRESS. DON'T BLAME ME IF I'M WRONG, INSTEAD, IMPORT THE ETS FILE!"
1700
+ : _inputDpt) +
1701
+ " Devicename " +
1702
+ _devicename +
1703
+ " Topic " +
1704
+ _outputtopic +
1705
+ " " +
1706
+ error.message,
1705
1707
  );
1706
1708
  errorMessage.payload = "UNKNOWN: ERROR tryToFigureOutDataPointFromRawValue:" + error.message;
1707
1709
  return errorMessage;
@@ -1712,6 +1714,32 @@ return msg;`,
1712
1714
  } catch (error) {
1713
1715
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(
1714
1716
  "knxUltimate-config: buildInputMessage: Error returning from dptlib.resolve(sInputDpt). Device " +
1717
+ _srcGA +
1718
+ " Destination " +
1719
+ _destGA +
1720
+ " Event " +
1721
+ _event +
1722
+ " GA's Datapoint " +
1723
+ (_inputDpt === null
1724
+ ? "THE ETS FILE HAS NOT BEEN IMPORTED, SO I'M TRYING TO FIGURE OUT WHAT DATAPOINT BELONGS THIS GROUP ADDRESS. DON'T BLAME ME IF I'M WRONG, INSTEAD, IMPORT THE ETS FILE!"
1725
+ : _inputDpt) +
1726
+ " Devicename " +
1727
+ _devicename +
1728
+ " Topic " +
1729
+ _outputtopic +
1730
+ " " +
1731
+ error.message,
1732
+ );
1733
+ errorMessage.payload = "UNKNOWN: ERROR dptlib.resolve:" + error.messages;
1734
+ return errorMessage;
1735
+ }
1736
+
1737
+ if (dpt !== null && _Rawvalue !== null) {
1738
+ try {
1739
+ jsValue = dptlib.fromBuffer(_Rawvalue, dpt);
1740
+ if (jsValue === null) {
1741
+ if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(
1742
+ "knxUltimate-config: buildInputMessage: received a wrong datagram form KNX BUS, from device " +
1715
1743
  _srcGA +
1716
1744
  " Destination " +
1717
1745
  _destGA +
@@ -1725,56 +1753,30 @@ return msg;`,
1725
1753
  _devicename +
1726
1754
  " Topic " +
1727
1755
  _outputtopic +
1728
- " " +
1729
- error.message,
1730
- );
1731
- errorMessage.payload = "UNKNOWN: ERROR dptlib.resolve:" + error.messages;
1732
- return errorMessage;
1733
- }
1734
-
1735
- if (dpt !== null && _Rawvalue !== null) {
1736
- try {
1737
- jsValue = dptlib.fromBuffer(_Rawvalue, dpt);
1738
- if (jsValue === null) {
1739
- if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(
1740
- "knxUltimate-config: buildInputMessage: received a wrong datagram form KNX BUS, from device " +
1741
- _srcGA +
1742
- " Destination " +
1743
- _destGA +
1744
- " Event " +
1745
- _event +
1746
- " GA's Datapoint " +
1747
- (_inputDpt === null
1748
- ? "THE ETS FILE HAS NOT BEEN IMPORTED, SO I'M TRYING TO FIGURE OUT WHAT DATAPOINT BELONGS THIS GROUP ADDRESS. DON'T BLAME ME IF I'M WRONG, INSTEAD, IMPORT THE ETS FILE!"
1749
- : _inputDpt) +
1750
- " Devicename " +
1751
- _devicename +
1752
- " Topic " +
1753
- _outputtopic +
1754
- " NodeID " +
1755
- _oNode.id || "",
1756
+ " NodeID " +
1757
+ _oNode.id || "",
1756
1758
  );
1757
1759
  }
1758
1760
  } catch (error) {
1759
1761
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(
1760
1762
  "knxUltimate-config: buildInputMessage: Error returning from DPT decoding. Device " +
1761
- _srcGA +
1762
- " Destination " +
1763
- _destGA +
1764
- " Event " +
1765
- _event +
1766
- " GA's Datapoint " +
1767
- (_inputDpt === null
1768
- ? "THE ETS FILE HAS NOT BEEN IMPORTED, SO I'M TRYING TO FIGURE OUT WHAT DATAPOINT BELONGS THIS GROUP ADDRESS. DON'T BLAME ME IF I'M WRONG, INSTEAD, IMPORT THE ETS FILE!"
1769
- : _inputDpt) +
1770
- " Devicename " +
1771
- _devicename +
1772
- " Topic " +
1773
- _outputtopic +
1774
- " " +
1775
- error.message +
1776
- " NodeID " +
1777
- _oNode.id || "",
1763
+ _srcGA +
1764
+ " Destination " +
1765
+ _destGA +
1766
+ " Event " +
1767
+ _event +
1768
+ " GA's Datapoint " +
1769
+ (_inputDpt === null
1770
+ ? "THE ETS FILE HAS NOT BEEN IMPORTED, SO I'M TRYING TO FIGURE OUT WHAT DATAPOINT BELONGS THIS GROUP ADDRESS. DON'T BLAME ME IF I'M WRONG, INSTEAD, IMPORT THE ETS FILE!"
1771
+ : _inputDpt) +
1772
+ " Devicename " +
1773
+ _devicename +
1774
+ " Topic " +
1775
+ _outputtopic +
1776
+ " " +
1777
+ error.message +
1778
+ " NodeID " +
1779
+ _oNode.id || "",
1778
1780
  );
1779
1781
  errorMessage.payload = "UNKNOWN: ERROR dptlib.fromBuffer:" + error.message;
1780
1782
  return errorMessage;
@@ -1900,9 +1902,9 @@ return msg;`,
1900
1902
  // 02/03/2020 Whould you like to continue without datapoint? Good. Here a totally fake datapoint
1901
1903
  node.warn(
1902
1904
  "KNXUltimate-config: WARNING IMPORT OF ETS CSV FILE. Datapoint not set. You choosed to continue import with a fake datapoint 1.001. -> " +
1903
- element.split("\t")[0] +
1904
- " " +
1905
- element.split("\t")[1],
1905
+ element.split("\t")[0] +
1906
+ " " +
1907
+ element.split("\t")[1],
1906
1908
  );
1907
1909
  ajsonOutput.push({
1908
1910
  ga: element.split("\t")[1],
@@ -1913,9 +1915,9 @@ return msg;`,
1913
1915
  // 31/03/2020 Skip import
1914
1916
  node.warn(
1915
1917
  "KNXUltimate-config: WARNING IMPORT OF ETS CSV FILE. Datapoint not set. You choosed to skip -> " +
1916
- element.split("\t")[0] +
1917
- " " +
1918
- element.split("\t")[1],
1918
+ element.split("\t")[0] +
1919
+ " " +
1920
+ element.split("\t")[1],
1919
1921
  );
1920
1922
  }
1921
1923
  } else {
@@ -1924,11 +1926,11 @@ return msg;`,
1924
1926
  if (typeof DPTb === "undefined") {
1925
1927
  node.warn(
1926
1928
  "KNXUltimate-config: WARNING: Datapoint not fully set (there is only the main type). I applied a default .001, but please check if i'ts ok ->" +
1927
- element.split("\t")[0] +
1928
- " " +
1929
- element.split("\t")[1] +
1930
- " Datapoint: " +
1931
- element.split("\t")[5],
1929
+ element.split("\t")[0] +
1930
+ " " +
1931
+ element.split("\t")[1] +
1932
+ " Datapoint: " +
1933
+ element.split("\t")[5],
1932
1934
  );
1933
1935
  DPTb = "001"; // default
1934
1936
  }
@@ -2028,9 +2030,9 @@ return msg;`,
2028
2030
  sDPT = "5.004"; // Maybe.
2029
2031
  node.error(
2030
2032
  "KNXUltimate-config: ERROR: Found an UNCERTAIN datapoint in ESF ETS. You choosed to fake the datapoint -> " +
2031
- sGA +
2032
- ". An fake datapoint has been set: " +
2033
- sDPT,
2033
+ sGA +
2034
+ ". An fake datapoint has been set: " +
2035
+ sDPT,
2034
2036
  );
2035
2037
  } else {
2036
2038
  sDPT = "SKIP";
@@ -2095,9 +2097,9 @@ return msg;`,
2095
2097
  }, 100);
2096
2098
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.debug(
2097
2099
  "knxUltimate-config: Auto Reconect by timerKNXUltimateCheckState in progress. node.LinkStatus: " +
2098
- node.linkStatus +
2099
- ", node.autoReconnect:" +
2100
- node.autoReconnect,
2100
+ node.linkStatus +
2101
+ ", node.autoReconnect:" +
2102
+ node.autoReconnect,
2101
2103
  );
2102
2104
  node.initKNXConnection();
2103
2105
  return;
@@ -222,8 +222,8 @@
222
222
  </script>
223
223
  <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
224
224
 
225
- <script type="text/markdown" data-help-name="knxUltimateHueBattery">
226
- <p> This node lets you get the battery level from your HUE device.<br/>
225
+ <script type="text/markdown" data-help-name="knxUltimateHueBattery"
226
+ This node lets you get the battery level from your HUE device.
227
227
 
228
228
  Here you can get the HUE battery level events, that represents a percentage 0-100% value, evetytime the battery level changes.<br/>
229
229
  Start typing in the GA field, the name or group address of your KNX device, the avaiable devices start showing up while you're typing.
@@ -408,7 +408,7 @@
408
408
  <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
409
409
 
410
410
  <script type="text/markdown" data-help-name="knxUltimateHueButton">
411
- <p> This node lets you get the events from your HUE button.<br/>
411
+ This node lets you get the events from your HUE button.
412
412
 
413
413
  Link the Group Adresses you want, to the respective events.
414
414
  All fields are optional.