iobroker.lorawan 1.18.58 → 1.18.59
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 +1 -1
- package/README.md +4 -1
- package/io-package.json +14 -14
- package/lib/modules/bridge.js +73 -1
- package/package.json +1 -1
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,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.18.59 (2026-01-01)
|
|
27
|
+
* (BenAhrdt) Chuck checkAllStatesForBridgeWork for better performance
|
|
28
|
+
|
|
26
29
|
### 1.18.58 (2025-12-31)
|
|
27
30
|
* (BenAhrdt) serialize and cache the config messagens
|
|
28
31
|
|
|
@@ -860,7 +863,7 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
|
|
|
860
863
|
## License
|
|
861
864
|
MIT License
|
|
862
865
|
|
|
863
|
-
Copyright (c) 2025 BenAhrdt <bsahrdt@gmail.com>
|
|
866
|
+
Copyright (c) 2025-2026 BenAhrdt <bsahrdt@gmail.com>
|
|
864
867
|
Copyright (c) 2025 Joerg Froehner <LoraWan@hafenmeister.com>
|
|
865
868
|
|
|
866
869
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.59",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.18.59": {
|
|
7
|
+
"en": "Chuck checkAllStatesForBridgeWork for better performance",
|
|
8
|
+
"de": "Chuck-Check AllStatesForBridgeWork für bessere Leistung",
|
|
9
|
+
"ru": "Проверка Чака AllStatesForBridgeWork для повышения производительности",
|
|
10
|
+
"pt": "Chuck, verifica. AllStatesForBridgeTrabalhar para melhor desempenho",
|
|
11
|
+
"nl": "Chuck check AllStatesForBridgeWork voor betere prestaties",
|
|
12
|
+
"fr": "Contrôle Chuck AllStatesForBridgeWork pour une meilleure performance",
|
|
13
|
+
"it": "Controllo Chuck AllStatesForBridgeWork per prestazioni migliori",
|
|
14
|
+
"es": "Chuck. AllStatesForBridgeWork para un mejor rendimiento",
|
|
15
|
+
"pl": "Chuck sprawdził Wszystkie państwa dla BridgeWork dla lepszej wydajności",
|
|
16
|
+
"uk": "Перевірка качки AllStatesForBridgeWork для кращої продуктивності",
|
|
17
|
+
"zh-cn": "查克检查 为更好的业绩而努力"
|
|
18
|
+
},
|
|
6
19
|
"1.18.58": {
|
|
7
20
|
"en": "serialize and cache the config messagens",
|
|
8
21
|
"de": "serialisieren und kache die config messagens",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "dodać możliwość dodawania folderów do",
|
|
81
94
|
"uk": "додати можливість додати папки до",
|
|
82
95
|
"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": {
|
package/lib/modules/bridge.js
CHANGED
|
@@ -1749,6 +1749,78 @@ 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
|
+
this.adapter.log.error('Start');
|
|
1774
|
+
for (const adapterObject of Object.values(adapterObjects)) {
|
|
1775
|
+
if (adapterObject.type !== 'state') {
|
|
1776
|
+
continue;
|
|
1777
|
+
}
|
|
1778
|
+
if (
|
|
1779
|
+
!adapterObject._id.includes(
|
|
1780
|
+
`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.uplinkDecoded}.`,
|
|
1781
|
+
) &&
|
|
1782
|
+
!adapterObject._id.includes(
|
|
1783
|
+
`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.downlinkControl}.`,
|
|
1784
|
+
)
|
|
1785
|
+
) {
|
|
1786
|
+
continue;
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
const localOptions = {
|
|
1790
|
+
...(options || {}),
|
|
1791
|
+
common: adapterObject.common,
|
|
1792
|
+
};
|
|
1793
|
+
|
|
1794
|
+
chunk.push(this.work(adapterObject._id, undefined, localOptions));
|
|
1795
|
+
|
|
1796
|
+
// Wenn Chunk voll → warten
|
|
1797
|
+
if (chunk.length >= CHUNK_SIZE) {
|
|
1798
|
+
await Promise.all(chunk);
|
|
1799
|
+
chunk = [];
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
this.adapter.log.error('Ende');
|
|
1804
|
+
// Rest abarbeiten
|
|
1805
|
+
if (chunk.length > 0) {
|
|
1806
|
+
await Promise.all(chunk);
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
// Ab hier ist ALLES aus work() fertig
|
|
1810
|
+
await this.discoverClimate();
|
|
1811
|
+
await this.getForeignStatesForStandardEntities();
|
|
1812
|
+
await this.getForeignClimateConfig();
|
|
1813
|
+
await this.getForeignHumidifierConfig();
|
|
1814
|
+
await this.getForeignLightConfig();
|
|
1815
|
+
await this.getForeignCoverConfig();
|
|
1816
|
+
await this.getForeignLockConfig();
|
|
1817
|
+
await this.checkDiscoveries();
|
|
1818
|
+
} catch (error) {
|
|
1819
|
+
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
/* Alte Version
|
|
1752
1824
|
async checkAllStatesForBridgeWork(options) {
|
|
1753
1825
|
const activeFunction = 'bridge.js - checkAllStatesForBridgeWork';
|
|
1754
1826
|
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
@@ -1799,7 +1871,7 @@ class bridgeClass {
|
|
|
1799
1871
|
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
1800
1872
|
}
|
|
1801
1873
|
}
|
|
1802
|
-
|
|
1874
|
+
*/
|
|
1803
1875
|
/**
|
|
1804
1876
|
* @param oldDiscoveredIds Ids wiche are discovered last time that Adapter runs
|
|
1805
1877
|
*/
|