iobroker.lorawan 1.18.58 → 1.18.60

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 BenAhrdt <bsahrdt@gmail.com>
3
+ Copyright (c) 2025-2026 BenAhrdt <bsahrdt@gmail.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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.18.60 (2026-01-01)
27
+ * (BenAhrdt) bugfix errorlogging
28
+
29
+ ### 1.18.59 (2026-01-01)
30
+ * (BenAhrdt) Chuck checkAllStatesForBridgeWork for better performance
31
+
26
32
  ### 1.18.58 (2025-12-31)
27
33
  * (BenAhrdt) serialize and cache the config messagens
28
34
 
@@ -860,7 +866,7 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
860
866
  ## License
861
867
  MIT License
862
868
 
863
- Copyright (c) 2025 BenAhrdt <bsahrdt@gmail.com>
869
+ Copyright (c) 2025-2026 BenAhrdt <bsahrdt@gmail.com>
864
870
  Copyright (c) 2025 Joerg Froehner <LoraWan@hafenmeister.com>
865
871
 
866
872
  Permission is hereby granted, free of charge, to any person obtaining a copy
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.58",
4
+ "version": "1.18.60",
5
5
  "news": {
6
+ "1.18.60": {
7
+ "en": "bugfix errorlogging",
8
+ "de": "fehlerbehebung von fehlern",
9
+ "ru": "bugfix ошибка",
10
+ "pt": "erro de correção",
11
+ "nl": "bugfix foutloggen",
12
+ "fr": "bugfix errorlogging",
13
+ "it": "bugfix errorelogging",
14
+ "es": "error bugfixlogging",
15
+ "pl": "błąd bugfix",
16
+ "uk": "повідомлень про помилку",
17
+ "zh-cn": "错误修正错误日志"
18
+ },
19
+ "1.18.59": {
20
+ "en": "Chuck checkAllStatesForBridgeWork for better performance",
21
+ "de": "Chuck-Check AllStatesForBridgeWork für bessere Leistung",
22
+ "ru": "Проверка Чака AllStatesForBridgeWork для повышения производительности",
23
+ "pt": "Chuck, verifica. AllStatesForBridgeTrabalhar para melhor desempenho",
24
+ "nl": "Chuck check AllStatesForBridgeWork voor betere prestaties",
25
+ "fr": "Contrôle Chuck AllStatesForBridgeWork pour une meilleure performance",
26
+ "it": "Controllo Chuck AllStatesForBridgeWork per prestazioni migliori",
27
+ "es": "Chuck. AllStatesForBridgeWork para un mejor rendimiento",
28
+ "pl": "Chuck sprawdził Wszystkie państwa dla BridgeWork dla lepszej wydajności",
29
+ "uk": "Перевірка качки AllStatesForBridgeWork для кращої продуктивності",
30
+ "zh-cn": "查克检查 为更好的业绩而努力"
31
+ },
6
32
  "1.18.58": {
7
33
  "en": "serialize and cache the config messagens",
8
34
  "de": "serialisieren und kache die config messagens",
@@ -67,32 +93,6 @@
67
93
  "pl": "dodaj '.' do folderów w zaznaczeniu konfiguracyjnym",
68
94
  "uk": "додати '.' до папок у вибраному конфігурації",
69
95
  "zh-cn": "在配置选中的文件夹中添加“. ”"
70
- },
71
- "1.18.53": {
72
- "en": "add possibility to add folders to",
73
- "de": "die möglichkeit hinzufügen von ordnern",
74
- "ru": "добавить возможность добавления папок в",
75
- "pt": "adicionar a possibilidade de adicionar pastas",
76
- "nl": "mogelijkheid toevoegen om mappen toe te voegen aan",
77
- "fr": "ajouter la possibilité d'ajouter des dossiers à",
78
- "it": "aggiungere la possibilità di aggiungere cartelle a",
79
- "es": "añadir la posibilidad de añadir carpetas para",
80
- "pl": "dodać możliwość dodawania folderów do",
81
- "uk": "додати можливість додати папки до",
82
- "zh-cn": "添加文件夹到"
83
- },
84
- "1.18.52": {
85
- "en": "add possibility to set Devicesuffix in LoraWAN States",
86
- "de": "möglichkeit hinzufügen, Devicesuffix in LoraWAN-Staaten einzustellen",
87
- "ru": "добавить возможность установки Devicesuffix в штатах LoraWAN",
88
- "pt": "adicionar possibilidade de definir Dispositivosuffix nos Estados de LoraWAN",
89
- "nl": "voeg mogelijkheid toe om Devicesuffix in LoraWAN Staten in te stellen",
90
- "fr": "ajouter la possibilité de définir Devicesuffix dans les États de LoraWAN",
91
- "it": "aggiungere la possibilità di impostare Devicesuffix in LoraWAN States",
92
- "es": "añadir posibilidad para establecer Dispositivosuffix en Estados LoraWAN",
93
- "pl": "dodać możliwość ustawienia Devicesuffix w państwach LoraWAN",
94
- "uk": "додати можливість встановити Devicesuffix в LoraWAN",
95
- "zh-cn": "添加在 LoraWAN 州设置设备后缀的可能性"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -1749,6 +1749,76 @@ class bridgeClass {
1749
1749
  *
1750
1750
  * @param options options to special functions
1751
1751
  */
1752
+ async checkAllStatesForBridgeWork(options) {
1753
+ const activeFunction = 'bridge.js - checkAllStatesForBridgeWork';
1754
+ this.adapter.log.debug(`Function ${activeFunction} started.`);
1755
+
1756
+ try {
1757
+ // get old Discovered ids
1758
+ this.OldDiscoveredIds = JSON.parse((await this.adapter.getStateAsync('info.discoveredIds')).val);
1759
+ this.oldDiscoveredDevices = this.generateOldDevices(this.OldDiscoveredIds);
1760
+
1761
+ // Clear object of all subscribed Ids and published Topics
1762
+ this.SubscribedTopics = {};
1763
+ this.PublishedIds = {};
1764
+ this.Notifications = {};
1765
+
1766
+ await this.discoverGeneralNotification();
1767
+ await this.discoverDataExchange();
1768
+
1769
+ const adapterObjects = await this.adapter.getAdapterObjectsAsync();
1770
+
1771
+ const CHUNK_SIZE = 8; // 5–10 ist für ioBroker sehr gut
1772
+ let chunk = [];
1773
+ for (const adapterObject of Object.values(adapterObjects)) {
1774
+ if (adapterObject.type !== 'state') {
1775
+ continue;
1776
+ }
1777
+ if (
1778
+ !adapterObject._id.includes(
1779
+ `${this.adapter.messagehandler.directoryhandler.reachableSubfolders.uplinkDecoded}.`,
1780
+ ) &&
1781
+ !adapterObject._id.includes(
1782
+ `${this.adapter.messagehandler.directoryhandler.reachableSubfolders.downlinkControl}.`,
1783
+ )
1784
+ ) {
1785
+ continue;
1786
+ }
1787
+
1788
+ const localOptions = {
1789
+ ...(options || {}),
1790
+ common: adapterObject.common,
1791
+ };
1792
+
1793
+ chunk.push(this.work(adapterObject._id, undefined, localOptions));
1794
+
1795
+ // Wenn Chunk voll → warten
1796
+ if (chunk.length >= CHUNK_SIZE) {
1797
+ await Promise.all(chunk);
1798
+ chunk = [];
1799
+ }
1800
+ }
1801
+
1802
+ // Rest abarbeiten
1803
+ if (chunk.length > 0) {
1804
+ await Promise.all(chunk);
1805
+ }
1806
+
1807
+ // Ab hier ist ALLES aus work() fertig
1808
+ await this.discoverClimate();
1809
+ await this.getForeignStatesForStandardEntities();
1810
+ await this.getForeignClimateConfig();
1811
+ await this.getForeignHumidifierConfig();
1812
+ await this.getForeignLightConfig();
1813
+ await this.getForeignCoverConfig();
1814
+ await this.getForeignLockConfig();
1815
+ await this.checkDiscoveries();
1816
+ } catch (error) {
1817
+ this.adapter.log.error(`error at ${activeFunction}: ${error}`);
1818
+ }
1819
+ }
1820
+
1821
+ /* Alte Version
1752
1822
  async checkAllStatesForBridgeWork(options) {
1753
1823
  const activeFunction = 'bridge.js - checkAllStatesForBridgeWork';
1754
1824
  this.adapter.log.debug(`Function ${activeFunction} started.`);
@@ -1799,7 +1869,7 @@ class bridgeClass {
1799
1869
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
1800
1870
  }
1801
1871
  }
1802
-
1872
+ */
1803
1873
  /**
1804
1874
  * @param oldDiscoveredIds Ids wiche are discovered last time that Adapter runs
1805
1875
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.18.58",
3
+ "version": "1.18.60",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",