iobroker.lorawan 1.16.5 → 1.16.6

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
@@ -23,6 +23,9 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
23
23
  Placeholder for the next version (at the beginning of the line):
24
24
  ### **WORK IN PROGRESS**
25
25
  -->
26
+ ### 1.16.6 (2025-09-17)
27
+ * (BenAhrdt) Change detection of new Discovery from LoRaWAN devices
28
+
26
29
  ### 1.16.5 (2025-09-17)
27
30
  * (BenAhrdt) Bugfix in notifications to Bridge (new device dicovered) => namespace not set
28
31
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.16.5",
4
+ "version": "1.16.6",
5
5
  "news": {
6
+ "1.16.6": {
7
+ "en": "Change detection of new Discovery from LoRaWAN devices",
8
+ "de": "Änderung der Erkennung neuer Entdeckungen von LoRaWAN-Geräten",
9
+ "ru": "Обнаружение изменений новых устройств LoRaWAN",
10
+ "pt": "Detecção de novos dispositivos LoRaWAN na Descoberta",
11
+ "nl": "Wijziging in detectie van nieuwe Discovery van LoRaWAN apparaten",
12
+ "fr": "Détection des nouvelles découvertes des dispositifs LoRaWAN",
13
+ "it": "Rilevamento delle nuove scoperte dei dispositivi LoRaWAN",
14
+ "es": "Detección de cambios de nuevos dispositivos de descubrimiento de LoRaWAN",
15
+ "pl": "Wykrywanie zmian w nowym Discovery urządzeń LoRaWAN",
16
+ "uk": "Виявлення нових пристроїв Discovery з LoRaWAN",
17
+ "zh-cn": "更改LoRaWAN设备的新发现检测"
18
+ },
6
19
  "1.16.5": {
7
20
  "en": "Bugfix in notifications to Bridge (new device dicovered) => namespace not set",
8
21
  "de": "Fehlerbehebung bei Benachrichtigungen an Bridge (neues Gerät erkannt) => Namespace nicht festgelegt",
@@ -80,19 +93,6 @@
80
93
  "pl": "możliwość wstawienia stanów zewnętrznych do mostka za pomocą enum.functions.bridge",
81
94
  "uk": "Можливість додавання зовнішніх станів до моста за допомогою enum.functions.bridge",
82
95
  "zh-cn": "通过使用enum.functions.bridge功能,可以将外部状态插入到桥接器中。"
83
- },
84
- "1.15.8": {
85
- "en": "remove await from some callings",
86
- "de": "Entferne das „await“ aus einigen Aufrufen.",
87
- "ru": "Удалите ожидание (await) из некоторых вызовов",
88
- "pt": "remover await de algumas chamadas",
89
- "nl": "Verwijder 'await' uit enkele aanroepen.",
90
- "fr": "supprimer l'attente de certains appels",
91
- "it": "Rimuovere l'attesa da alcune chiamate.",
92
- "es": "eliminar await de algunas llamadas",
93
- "pl": "Usuń oczekiwanie (await) z niektórych wywołań.",
94
- "uk": "видаліть await із деяких викликів",
95
- "zh-cn": "从部分调用中删除 await"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -234,12 +234,9 @@ class bridgeClass {
234
234
  this.adapter.log.debug(`Function ${activeFunction} started.`);
235
235
  try {
236
236
  if (this.bridgeMqttClient.internalConnectionstate) {
237
- const countBefore = Object.keys(this.Notifications).length;
238
- await this.discovery(id, options);
239
- // notify new discovered Devices (Notification count changed)
240
- // On startup this ist mostly true, but the genereal notification id will set later.
241
- // So there is no notificaton published to Bridge
242
- if (countBefore !== Object.keys(this.Notifications).length) {
237
+ const newNotification = await this.discovery(id, options);
238
+ // notify new discovered Devices (new notification)
239
+ if (newNotification) {
243
240
  const device = this.DiscoveredIds[id].informations.usedDeviceId;
244
241
  const application = this.DiscoveredIds[id].informations.usedApplicationName;
245
242
  const message = `${this.adapter.i18nTranslation['new device discovered']}.\n${this.adapter.i18nTranslation['Device']}: ${device}\n${this.adapter.i18nTranslation['Application']}: ${application}`;
@@ -280,10 +277,10 @@ class bridgeClass {
280
277
  if (!this.CheckedIds[id] || (options && options.forceDiscovery)) {
281
278
  this.CheckedIds[id] = {};
282
279
  this.adapter.log.debug(`discover the id ${id}`);
283
- await this.buildDiscovery(id, options);
284
- } else {
285
- this.adapter.log.debug(`${id} allready checked for discovery`);
280
+ return await this.buildDiscovery(id, options);
286
281
  }
282
+ this.adapter.log.debug(`${id} allready checked for discovery`);
283
+ return false;
287
284
  } catch (error) {
288
285
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
289
286
  }
@@ -398,7 +395,9 @@ class bridgeClass {
398
395
  usedDeviceId: changeInfo.usedDeviceId,
399
396
  },
400
397
  });
398
+ return true;
401
399
  }
400
+ return false;
402
401
  } catch (error) {
403
402
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
404
403
  }
@@ -817,6 +816,8 @@ class bridgeClass {
817
816
  const activeFunction = 'bridge.js - buildDiscovery';
818
817
  this.adapter.log.debug(`Function ${activeFunction} started.`);
819
818
  try {
819
+ // Defaultvalue for discover
820
+ let newNotification = false;
820
821
  // Query for decoded Folder
821
822
  if (id.includes(`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.uplinkDecoded}.`)) {
822
823
  const changeInfo = await this.adapter.getChangeInfo(id);
@@ -876,7 +877,11 @@ class bridgeClass {
876
877
  usedDeviceId: changeInfo.usedDeviceId,
877
878
  },
878
879
  });
879
- await this.discoverDeviceNotifications(changeInfo);
880
+ if (await this.discoverDeviceNotifications(changeInfo)) {
881
+ newNotification = true;
882
+ } else {
883
+ newNotification = false;
884
+ }
880
885
  }
881
886
  }
882
887
 
@@ -950,10 +955,15 @@ class bridgeClass {
950
955
  usedDeviceId: changeInfo.usedDeviceId,
951
956
  },
952
957
  });
953
- await this.discoverDeviceNotifications(changeInfo);
958
+ if (await this.discoverDeviceNotifications(changeInfo)) {
959
+ newNotification = true;
960
+ } else {
961
+ newNotification = false;
962
+ }
954
963
  }
955
964
  }
956
965
  }
966
+ return newNotification;
957
967
  } catch (error) {
958
968
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
959
969
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.16.5",
3
+ "version": "1.16.6",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",