iobroker.openknx 0.1.21 → 0.1.22

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/README.md CHANGED
@@ -305,9 +305,13 @@ Data is sent to Iobroker Sentry server hosted in Germany. If you have allowed io
305
305
  - only IPv4 supported
306
306
 
307
307
  ## Changelog
308
+ ### 0.1.22 (2022-02-26)
309
+ * bufix: repair reception error
310
+
308
311
  ### 0.1.21 (2022-02-25)
309
312
  * feature: dont sent ack request in ldata.ind, this is disturbing clients if not filtered out by gateway
310
- * dependency:adapter core must be or higher 2.6.0
313
+ * bugfix: reinit if event received before connection established to avoid deadlock
314
+ * dependency:adapter core must be 2.6.0 or higher
311
315
 
312
316
  ### 0.1.20 (2022-02-19)
313
317
  * feature: add more dpts
package/io-package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "openknx",
4
- "version": "0.1.21",
4
+ "version": "0.1.22",
5
5
  "news": {
6
- "0.1.19": {
6
+ "0.1.22": {
7
7
  "en": "Bugfixing"
8
8
  }
9
9
  },
package/main.js CHANGED
@@ -18,10 +18,6 @@ const tools = require("./lib/tools.js");
18
18
  const DoubleKeyedMap = require("./lib/doubleKeyedMap.js");
19
19
  const detect = require("./lib/openknx.js");
20
20
  const os = require("os");
21
- const {
22
- listenerCount
23
- } = require("process");
24
- const { threadId } = require("worker_threads");
25
21
 
26
22
  class openknx extends utils.Adapter {
27
23
  /**
@@ -81,16 +77,16 @@ class openknx extends utils.Adapter {
81
77
  async onReady() {
82
78
  // adapter initialization
83
79
 
80
+ /*
84
81
  if (this.supportsFeature && this.supportsFeature("PLUGINS")) {
85
82
  const sentryInstance = this.getPluginInstance("sentry");
86
83
  if (sentryInstance) {
87
84
  const Sentry = sentryInstance.getSentryObject();
88
85
  if (Sentry) {
89
86
  Sentry.init({
90
- environment: "development", //"production", todo distinguish
87
+ //environment: "development", //"production", todo distinguish
91
88
  });
92
89
  Sentry.configureScope(scope => {
93
- // eslint-disable-next-line no-unused-vars
94
90
  scope.addEventProcessor((event, _hint) => {
95
91
  if (event.exception && event.exception.values && event.exception.values[0]) {
96
92
  const eventData = event.exception.values[0];
@@ -102,17 +98,18 @@ class openknx extends utils.Adapter {
102
98
  return null;
103
99
  }
104
100
  */
105
- // We have exception data and do not sorted it out, so report it
106
- return event;
107
- }
108
- }
109
- // No exception in it ... do not report
110
- return null;
111
- });
112
- });
113
- }
114
- }
115
- }
101
+ // We have exception data and do not sorted it out, so report it
102
+ // return event;
103
+ // }
104
+ //}
105
+ // No exception in it ... do not report
106
+ // return null;
107
+ // });
108
+ // });
109
+ // }
110
+ // }
111
+ //}
112
+
116
113
 
117
114
  //after installation
118
115
  if (tools.isEmptyObject(this.config)) {
@@ -440,10 +437,11 @@ class openknx extends utils.Adapter {
440
437
  for (const key of this.gaList) {
441
438
  try {
442
439
  const datapoint = new knx.Datapoint({
443
- ga: this.gaList.getDataById(key).native.address,
444
- dpt: this.gaList.getDataById(key).native.dpt,
445
- autoread: this.gaList.getDataById(key).native.autoread, // issue a GroupValue_Read request to try to get the initial state from the bus (if any)
446
- },
440
+ ga: this.gaList.getDataById(key).native.address,
441
+ dpt: this.gaList.getDataById(key).native.dpt,
442
+ autoread: this.gaList.getDataById(key).native.autoread, // issue a GroupValue_Read request to try to get the initial state from the bus (if any)
443
+ },
444
+ this.knxConnection
447
445
  );
448
446
  datapoint.on("error", (ga, dptid) => {
449
447
  this.log.warn("Received data length for GA " + ga + " does not match configured " + dptid);
@@ -452,8 +450,8 @@ class openknx extends utils.Adapter {
452
450
  cnt_withDPT++;
453
451
  this.log.debug(
454
452
  `Datapoint ${this.gaList.getDataById(key).native.autoread ? "autoread" : ""} created and GroupValueWrite sent: ${
455
- this.gaList.getDataById(key).native.address
456
- } ${key}`
453
+ this.gaList.getDataById(key).native.address
454
+ } ${key}`
457
455
  );
458
456
  } catch (e) {
459
457
  this.log.error("could not create KNX Datapoint for " + key + " with error: " + e);
@@ -485,7 +483,7 @@ class openknx extends utils.Adapter {
485
483
  if (!this.connected) {
486
484
  this.knxConnection.Disconnect();
487
485
  this.startKnxStack();
488
- this.log.warn("trap");
486
+ this.log.warn("event received before initialisation");
489
487
  return;
490
488
  }
491
489
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.openknx",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "ioBroker knx Adapter",
5
5
  "author": "boellner",
6
6
  "homepage": "https://github.com/iobroker-community-adapters/ioBroker.openknx.git",