iobroker.lorawan 1.22.19 → 1.22.21

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
@@ -24,6 +24,12 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
24
24
  Placeholder for the next version (at the beginning of the line):
25
25
  ### **WORK IN PROGRESS**
26
26
  -->
27
+ ### 1.22.21 (2026-06-16)
28
+ - (BenAhrdt) Changed setTimeout to this.adapter.setTimeout
29
+
30
+ ### 1.22.20 (2026-06-16)
31
+ - (BenAhrdt) Write publishIds and subscribedTopics delayed
32
+
27
33
  ### 1.22.19 (2026-06-16)
28
34
  - (BenAhrdt) Test durch fehlerhaften git commit
29
35
 
@@ -33,12 +39,6 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
33
39
  ### 1.22.17 (2026-06-07)
34
40
  - (BenAhrdt) Fixed writing valid zero values from bridged Home Assistant entities to ioBroker states.
35
41
 
36
- ### 1.22.16 (2026-06-06)
37
- - (BenAhrdt) Bugfix COver in ToIob
38
-
39
- ### 1.22.15 (2026-06-05)
40
- - (BenAhrdt) Add roles for some new devices
41
-
42
42
  [Older changes can be found there](CHANGELOG_OLD.md)
43
43
 
44
44
  ## License
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.22.19",
4
+ "version": "1.22.21",
5
5
  "news": {
6
+ "1.22.21": {
7
+ "en": "Changed setTimeout to this.adapter.setTimeout",
8
+ "de": "Geändert setTimeout zu this.adapter.setTimeout",
9
+ "ru": "Изменить setTimeout на this.adapter.setTimeout",
10
+ "pt": "SetTimeout alterado para este.adapter.setTimeout",
11
+ "nl": "Veranderde setTimeout naar deze.adapter.setTimeout",
12
+ "fr": "Changed setTimeout to this.adapter.setTimeout",
13
+ "it": "Modificato il timeout a questo.adapter.setTimeout",
14
+ "es": "Cambio de configuraciónTiempo a este.adapter.setTimeout",
15
+ "pl": "Zmieniono timeout do tego. Adapter. setTimeout",
16
+ "uk": "Змінено setTimeout в this.adapter.setTimeout",
17
+ "zh-cn": "更改了设置 Timeout 到此. adapter. set Timeout"
18
+ },
19
+ "1.22.20": {
20
+ "en": "Write publishIds and subscribedTopics delayed",
21
+ "de": "Write publishIds und abonnierteTopics verzögert",
22
+ "ru": "Написать Ids и подписатьсяTopics задерживается",
23
+ "pt": "Escrever os IDs de publicação e os Topics subscritos atrasados",
24
+ "nl": "PublicerenIds en geabonneerdTopics vertraagd schrijven",
25
+ "fr": "Ecrire des Ids et s'abonnerSujets retardés",
26
+ "it": "Scrivere pubblicaIds e abbonati Argomenti ritardati",
27
+ "es": "Escribe publicacionesIds y suscritosTemas retrasados",
28
+ "pl": "Napisz publishIds i subskrybedTopics opóźnione",
29
+ "uk": "Напишіть відгукПрихильники та підписки",
30
+ "zh-cn": "写入 Publishing Ids 和订阅日期延迟"
31
+ },
6
32
  "1.22.19": {
7
33
  "en": "Test durch fehlerhaften git commit",
8
34
  "de": "Test durch fehlerhaften git commit",
@@ -67,32 +93,6 @@
67
93
  "pl": "Dodaj role dla niektórych nowych urządzeń",
68
94
  "uk": "Додати ролі для деяких нових пристроїв",
69
95
  "zh-cn": "为一些新设备添加角色"
70
- },
71
- "1.22.14": {
72
- "en": "ToIob suports hs mode for color (light)\nissues from depandabot",
73
- "de": "ToIob suports hs mode für color (light)\nfragen von depandabot",
74
- "ru": "ToIob suports hs режим для цвета (свет)\nотзывы о depandabot",
75
- "pt": "Modo de suporte do ToIob hs para cores (luz)\nquestões do depandabot",
76
- "nl": "ToIob suports hs-modus voor kleur (licht)\nproblemen van depandabot",
77
- "fr": "Mode TOIobs hs pour la couleur (lumière)\ndepandabot",
78
- "it": "ToIob suports hs modalità per colore (luce)\nproblemi da depandabot",
79
- "es": "ToIob suports hs modo para el color (light)\ncuestiones de depandabot",
80
- "pl": "Tolob suports tryb hs dla koloru (światła)\nkwestie związane z depandabot",
81
- "uk": "ToIob suports hs режим для кольору (світло)\nпитання від depandabot",
82
- "zh-cn": "颜色的 ToIob suports hs 模式( 浅色)\n发件人的问题"
83
- },
84
- "1.22.13": {
85
- "en": "Changes in io-package.\nChanges in package.json",
86
- "de": "Änderungen im io-Paket.\nÄnderungen im Paket.json",
87
- "ru": "Изменения в io-пакете.\nИзменения в package.json",
88
- "pt": "Alterações no pacote io.\nAlterações no package.json",
89
- "nl": "Wijzigingen in de verpakking.\nWijzigingen in package.json",
90
- "fr": "Changements dans l'emballage.\nChangements dans package.json",
91
- "it": "Cambiamenti nel pacchetto io.\nModifiche nel pacchetto.json",
92
- "es": "Cambios en io-paquete.\nCambios en package.json",
93
- "pl": "Zmiany w pakiecie jo-.\nZmiany w package.json",
94
- "uk": "Зміни в io-package.\nЗміни в package.json",
95
- "zh-cn": "Io包装的变化.\n软件包的变化 json"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -187,6 +187,10 @@ class bridgeClass extends EventEmiter {
187
187
  assign: 'assign',
188
188
  messageTo: 'messageTo',
189
189
  };
190
+
191
+ // Timerwerte für verzögertes Schreiben
192
+ this.publishedIdsWriteTimer = undefined;
193
+ this.subscribedTopicsWriteTimer = undefined;
190
194
  }
191
195
 
192
196
  /*********************************************************************
@@ -234,7 +238,7 @@ class bridgeClass extends EventEmiter {
234
238
  this.VitualIds[this.SubscribedTopics[topic].id] = message;
235
239
  // Return the virtual mode
236
240
  await this.publishId(this.SubscribedTopics[topic].id, message, {});
237
- await this.writeSubscribedTopics();
241
+ this.scheduleSubscribedTopicsWrite();
238
242
  return;
239
243
  }
240
244
 
@@ -278,7 +282,7 @@ class bridgeClass extends EventEmiter {
278
282
  c: 'from bridge',
279
283
  });
280
284
  }
281
- await this.writeSubscribedTopics();
285
+ this.scheduleSubscribedTopicsWrite();
282
286
  return;
283
287
  }
284
288
 
@@ -367,7 +371,7 @@ class bridgeClass extends EventEmiter {
367
371
  });
368
372
  }
369
373
  }
370
- await this.writeSubscribedTopics();
374
+ this.scheduleSubscribedTopicsWrite();
371
375
  } else {
372
376
  this.adapter.log.debug(`The received Topic ${topic} is not subscribed`);
373
377
  }
@@ -379,13 +383,25 @@ class bridgeClass extends EventEmiter {
379
383
  /**
380
384
  * Write Subscribed Topics
381
385
  */
382
- async writeSubscribedTopics() {
383
- /*await this.adapter.setState(
384
- 'info.subscribedTopics',
385
- { val: JSON.stringify(this.SubscribedTopics), c: 'from bridge' },
386
- true,
387
- );vorerst Test*/
386
+ scheduleSubscribedTopicsWrite() {
387
+ if (this.subscribedTopicsWriteTimer) {
388
+ return;
389
+ }
390
+
391
+ this.subscribedTopicsWriteTimer = this.adapter.setTimeout(async () => {
392
+ this.subscribedTopicsWriteTimer = undefined;
393
+
394
+ await this.adapter.setState(
395
+ 'info.subscribedTopics',
396
+ {
397
+ val: JSON.stringify(this.SubscribedTopics),
398
+ c: 'from bridge',
399
+ },
400
+ true,
401
+ );
402
+ }, 1000);
388
403
  }
404
+
389
405
  /**
390
406
  * @param {string} hex value of the color
391
407
  */
@@ -1097,7 +1113,7 @@ class bridgeClass extends EventEmiter {
1097
1113
  options.retain = true;
1098
1114
  }
1099
1115
  await this.bridgeMqttClient.publish(topic, value, options);
1100
- /*await this.adapter.setState('info.publishedIds', JSON.stringify(this.PublishedIds), true); vorerst Test*/
1116
+ this.schedulePublishedIdsWrite();
1101
1117
  }
1102
1118
 
1103
1119
  /* alt 26.11.2025
@@ -1363,6 +1379,25 @@ class bridgeClass extends EventEmiter {
1363
1379
  }
1364
1380
  }
1365
1381
 
1382
+ /**
1383
+ * schedule the Published Ids
1384
+ */
1385
+ schedulePublishedIdsWrite() {
1386
+ if (this.publishedIdsWriteTimer) {
1387
+ return;
1388
+ }
1389
+
1390
+ this.publishedIdsWriteTimer = this.adapter.setTimeout(async () => {
1391
+ this.publishedIdsWriteTimer = undefined;
1392
+
1393
+ try {
1394
+ await this.adapter.setState('info.publishedIds', JSON.stringify(this.PublishedIds), true);
1395
+ } catch (error) {
1396
+ this.adapter.log.error(`schedulePublishedIdsWrite: ${error}`);
1397
+ }
1398
+ }, 1000);
1399
+ }
1400
+
1366
1401
  /*********************************************************************
1367
1402
  * **************** assign Structur of internal memory ***************
1368
1403
  * ******************************************************************/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.22.19",
3
+ "version": "1.22.21",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",