iobroker.lorawan 1.16.4 → 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,12 @@ 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
+
29
+ ### 1.16.5 (2025-09-17)
30
+ * (BenAhrdt) Bugfix in notifications to Bridge (new device dicovered) => namespace not set
31
+
26
32
  ### 1.16.4 (2025-09-17)
27
33
  * (BenAhrdt) Bridge import foreign states till Adapter is running
28
34
  * (BenAhrdt) Bridge delete foreign states till Adapter is running
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.16.4",
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
+ },
19
+ "1.16.5": {
20
+ "en": "Bugfix in notifications to Bridge (new device dicovered) => namespace not set",
21
+ "de": "Fehlerbehebung bei Benachrichtigungen an Bridge (neues Gerät erkannt) => Namespace nicht festgelegt",
22
+ "ru": "Исправлена ошибка в уведомлениях для моста (обнаружение нового устройства) => пространство имен не установлено",
23
+ "pt": "Correção de bug nas notificações para Bridge (novo dispositivo descoberto) => espaço de nomes não definido",
24
+ "nl": "Bugfix in meldingen naar Bridge (nieuw apparaat ontdekt) => namespace niet ingesteld",
25
+ "fr": "Correction de bug dans les notifications vers le pont (nouveau périphérique découvert) => espace de noms non défini",
26
+ "it": "Correzione di un bug nelle notifiche al Bridge (nuovo dispositivo scoperto) => namespace non impostato",
27
+ "es": "Corrección de error en las notificaciones al puente (nuevo dispositivo descubierto) => espacio de nombres no establecido",
28
+ "pl": "Poprawiono błąd w powiadomieniach do Bridge (nowe urządzenie zostało znalezione) => nie ustawiona przestrzeń nazw",
29
+ "uk": "Виправлено помилку у сповіщеннях до мосту (виявлено новий пристрій) => не встановлений простір імен",
30
+ "zh-cn": "修复了通知到桥接器的bug(发现新设备)=>命名空间未设置"
31
+ },
6
32
  "1.16.4": {
7
33
  "en": "Bridge import foreign states till Adapter is running\nBridge delete foreign states till Adapter is running",
8
34
  "de": "Brücke importiert externe Zustände, solange der Adapter läuft.\nLösche Fremdzustände aus der Datenbank, solange der Adapter aktiv ist.",
@@ -67,32 +93,6 @@
67
93
  "pl": "możliwość wstawienia stanów zewnętrznych do mostka za pomocą enum.functions.bridge",
68
94
  "uk": "Можливість додавання зовнішніх станів до моста за допомогою enum.functions.bridge",
69
95
  "zh-cn": "通过使用enum.functions.bridge功能,可以将外部状态插入到桥接器中。"
70
- },
71
- "1.15.8": {
72
- "en": "remove await from some callings",
73
- "de": "Entferne das „await“ aus einigen Aufrufen.",
74
- "ru": "Удалите ожидание (await) из некоторых вызовов",
75
- "pt": "remover await de algumas chamadas",
76
- "nl": "Verwijder 'await' uit enkele aanroepen.",
77
- "fr": "supprimer l'attente de certains appels",
78
- "it": "Rimuovere l'attesa da alcune chiamate.",
79
- "es": "eliminar await de algunas llamadas",
80
- "pl": "Usuń oczekiwanie (await) z niektórych wywołań.",
81
- "uk": "видаліть await із деяких викликів",
82
- "zh-cn": "从部分调用中删除 await"
83
- },
84
- "1.15.7": {
85
- "en": "solve publishing intern",
86
- "de": "Löse das Problem mit der Veröffentlichung des Praktikanten.",
87
- "ru": "решить вопрос с публикацией стажера",
88
- "pt": "Resolver publicação de estagiário",
89
- "nl": "Oplossen van het publiceren van stages",
90
- "fr": "résoudre le stage en édition",
91
- "it": "risolto l'internato che pubblica",
92
- "es": "Resolver publicación de interno.",
93
- "pl": "rozwiązać problem stażysty ds. publikacji",
94
- "uk": "вирішення питань практиканта з розміщення текстів",
95
- "zh-cn": "解决发布实习生"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -234,14 +234,13 @@ 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.DiscoveredIds).length;
238
- await this.discovery(id, options);
239
- // only publish new discovered Ids
240
- if (countBefore !== Object.keys(this.DiscoveredIds).length) {
237
+ const newNotification = await this.discovery(id, options);
238
+ // notify new discovered Devices (new notification)
239
+ if (newNotification) {
241
240
  const device = this.DiscoveredIds[id].informations.usedDeviceId;
242
241
  const application = this.DiscoveredIds[id].informations.usedApplicationName;
243
242
  const message = `${this.adapter.i18nTranslation['new device discovered']}.\n${this.adapter.i18nTranslation['Device']}: ${device}\n${this.adapter.i18nTranslation['Application']}: ${application}`;
244
- const notificationId = `${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
243
+ const notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
245
244
  await this.adapter.bridge?.publishNotification(
246
245
  notificationId,
247
246
  message,
@@ -278,10 +277,10 @@ class bridgeClass {
278
277
  if (!this.CheckedIds[id] || (options && options.forceDiscovery)) {
279
278
  this.CheckedIds[id] = {};
280
279
  this.adapter.log.debug(`discover the id ${id}`);
281
- await this.buildDiscovery(id, options);
282
- } else {
283
- this.adapter.log.debug(`${id} allready checked for discovery`);
280
+ return await this.buildDiscovery(id, options);
284
281
  }
282
+ this.adapter.log.debug(`${id} allready checked for discovery`);
283
+ return false;
285
284
  } catch (error) {
286
285
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
287
286
  }
@@ -396,7 +395,9 @@ class bridgeClass {
396
395
  usedDeviceId: changeInfo.usedDeviceId,
397
396
  },
398
397
  });
398
+ return true;
399
399
  }
400
+ return false;
400
401
  } catch (error) {
401
402
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
402
403
  }
@@ -815,6 +816,8 @@ class bridgeClass {
815
816
  const activeFunction = 'bridge.js - buildDiscovery';
816
817
  this.adapter.log.debug(`Function ${activeFunction} started.`);
817
818
  try {
819
+ // Defaultvalue for discover
820
+ let newNotification = false;
818
821
  // Query for decoded Folder
819
822
  if (id.includes(`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.uplinkDecoded}.`)) {
820
823
  const changeInfo = await this.adapter.getChangeInfo(id);
@@ -874,7 +877,11 @@ class bridgeClass {
874
877
  usedDeviceId: changeInfo.usedDeviceId,
875
878
  },
876
879
  });
877
- await this.discoverDeviceNotifications(changeInfo);
880
+ if (await this.discoverDeviceNotifications(changeInfo)) {
881
+ newNotification = true;
882
+ } else {
883
+ newNotification = false;
884
+ }
878
885
  }
879
886
  }
880
887
 
@@ -948,10 +955,15 @@ class bridgeClass {
948
955
  usedDeviceId: changeInfo.usedDeviceId,
949
956
  },
950
957
  });
951
- await this.discoverDeviceNotifications(changeInfo);
958
+ if (await this.discoverDeviceNotifications(changeInfo)) {
959
+ newNotification = true;
960
+ } else {
961
+ newNotification = false;
962
+ }
952
963
  }
953
964
  }
954
965
  }
966
+ return newNotification;
955
967
  } catch (error) {
956
968
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
957
969
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.16.4",
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",