iobroker.lorawan 1.18.61 → 1.18.63
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 +6 -0
- package/io-package.json +27 -27
- package/lib/modules/bridge.js +59 -55
- package/main.js +0 -18
- package/package.json +1 -1
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.63 (2026-01-01)
|
|
27
|
+
* (BenAhrdt) return to await calls in checkAll (bridge)
|
|
28
|
+
|
|
29
|
+
### 1.18.62 (2026-01-01)
|
|
30
|
+
* (BenAhrdt) Promise the foreign functions in Promise.all
|
|
31
|
+
|
|
26
32
|
### 1.18.61 (2026-01-01)
|
|
27
33
|
* (BenAhrdt) set chunksize to 32
|
|
28
34
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.63",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.18.63": {
|
|
7
|
+
"en": "return to await calls in checkAll (bridge)",
|
|
8
|
+
"de": "zurück zu warten Anrufe im Check Alle (Brücke)",
|
|
9
|
+
"ru": "возвращение в ожидании звонков в чек Все (мост)",
|
|
10
|
+
"pt": "retornar para aguardar chamadas em cheque Todos (ponte)",
|
|
11
|
+
"nl": "terug te keren naar wachten gesprekken in check Alle (brug)",
|
|
12
|
+
"fr": "retour à attendre les appels en contrôle Tous (pont)",
|
|
13
|
+
"it": "ritorno in attesa chiamate in controllo Tutti (ponte)",
|
|
14
|
+
"es": "volver a esperar llamadas en cheque Todo (puente)",
|
|
15
|
+
"pl": "powrót czekać rozmowy w czeku Wszystkie (most)",
|
|
16
|
+
"uk": "поверніть на чек дзвінків Всі (місто)",
|
|
17
|
+
"zh-cn": "返回等待呼叫检查 全部(桥梁)"
|
|
18
|
+
},
|
|
19
|
+
"1.18.62": {
|
|
20
|
+
"en": "Promise the foreign functions in Promise.all",
|
|
21
|
+
"de": "Versprechen Sie die ausländischen Funktionen in Promise.all",
|
|
22
|
+
"ru": "Обещайте иностранные функции в Promise.all",
|
|
23
|
+
"pt": "Prometa as funções estrangeiras em Promise.all",
|
|
24
|
+
"nl": "Beloof de buitenlandse functies in Promise.all",
|
|
25
|
+
"fr": "Promets les fonctions étrangères dans Promise.all",
|
|
26
|
+
"it": "Promettere le funzioni straniere in Promise.all",
|
|
27
|
+
"es": "Prométeme las funciones extranjeras en Promesa.todos",
|
|
28
|
+
"pl": "Obiecaj funkcje zagraniczne w Promise.all",
|
|
29
|
+
"uk": "Використовуйте іноземні функції в Promise.all",
|
|
30
|
+
"zh-cn": "在保证中保证外国职能"
|
|
31
|
+
},
|
|
6
32
|
"1.18.61": {
|
|
7
33
|
"en": "set chunksize to 32",
|
|
8
34
|
"de": "set chunksize auf 32",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "cache Infos w konfiguracji dla większej wydajności",
|
|
68
94
|
"uk": "cache Infos в конфігурації для більшої продуктивності",
|
|
69
95
|
"zh-cn": "为更多性能在配置中缓存信息"
|
|
70
|
-
},
|
|
71
|
-
"1.18.56": {
|
|
72
|
-
"en": "remoove namespace twice remooved\nserialize getConfigStates",
|
|
73
|
-
"de": "remoove namespace zweimal remooved\nserialisieren getConfigStates",
|
|
74
|
-
"ru": "remoove namespace дважды удаляется\nсерийный GetConfigStates",
|
|
75
|
-
"pt": "remoove namespace duas vezes remooved\nserialize getConfigStates",
|
|
76
|
-
"nl": "naamruimte twee keer verplaatsen\nserialiseren getConfigStates",
|
|
77
|
-
"fr": "remove namespace deux fois removed\nsérialiser getConfigStates",
|
|
78
|
-
"it": "rimoove namespace due volte rimuovi\nserializzare ottenereConfigStates",
|
|
79
|
-
"es": "remoove namespace dos remooved\nserialize getConfigStates",
|
|
80
|
-
"pl": "remoove namespace two remooved\nserialize getConfigurations",
|
|
81
|
-
"uk": "remoove namespace двічі remooved\nсертифіковано getConfigStates",
|
|
82
|
-
"zh-cn": "两次重新移动命名空间\n序列化获取配置状态"
|
|
83
|
-
},
|
|
84
|
-
"1.18.55": {
|
|
85
|
-
"en": "bugfix folderinclusion",
|
|
86
|
-
"de": "bugfix ordnerinclusion",
|
|
87
|
-
"ru": "bugfix включение папок",
|
|
88
|
-
"pt": "inclusão de pastas de correção de erros",
|
|
89
|
-
"nl": "bugfix-map-integratie",
|
|
90
|
-
"fr": "bugfix dossierinclusion",
|
|
91
|
-
"it": "bugfix folderinclusione",
|
|
92
|
-
"es": "carpeta bugfixinclusion",
|
|
93
|
-
"pl": "włączenie folderu bugfix",
|
|
94
|
-
"uk": "папка прикусу",
|
|
95
|
-
"zh-cn": "包含错误文件夹"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/lib/modules/bridge.js
CHANGED
|
@@ -1752,59 +1752,42 @@ class bridgeClass {
|
|
|
1752
1752
|
async checkAllStatesForBridgeWork(options) {
|
|
1753
1753
|
const activeFunction = 'bridge.js - checkAllStatesForBridgeWork';
|
|
1754
1754
|
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
1755
|
-
|
|
1756
1755
|
try {
|
|
1757
1756
|
// get old Discovered ids
|
|
1758
1757
|
this.OldDiscoveredIds = JSON.parse((await this.adapter.getStateAsync('info.discoveredIds')).val);
|
|
1759
1758
|
this.oldDiscoveredDevices = this.generateOldDevices(this.OldDiscoveredIds);
|
|
1760
|
-
|
|
1761
1759
|
// Clear object of all subscribed Ids and published Topics
|
|
1762
1760
|
this.SubscribedTopics = {};
|
|
1763
1761
|
this.PublishedIds = {};
|
|
1764
1762
|
this.Notifications = {};
|
|
1765
1763
|
|
|
1764
|
+
//this.adapter.log.error(JSON.stringify(this.oldDiscoveredDevices));
|
|
1766
1765
|
await this.discoverGeneralNotification();
|
|
1766
|
+
|
|
1767
1767
|
await this.discoverDataExchange();
|
|
1768
1768
|
|
|
1769
|
+
// Get all ids in adapterfolder
|
|
1770
|
+
// Generate Infos of all devices and decoded folders
|
|
1769
1771
|
const adapterObjects = await this.adapter.getAdapterObjectsAsync();
|
|
1770
|
-
|
|
1771
|
-
const CHUNK_SIZE = (await this.adapter.getStateAsync('bridge.debug.chunk'))?.val || 32;
|
|
1772
|
-
let chunk = [];
|
|
1773
1772
|
for (const adapterObject of Object.values(adapterObjects)) {
|
|
1774
|
-
if (adapterObject.type !== 'state') {
|
|
1775
|
-
continue;
|
|
1776
|
-
}
|
|
1777
1773
|
if (
|
|
1778
|
-
|
|
1774
|
+
adapterObject._id.includes(
|
|
1779
1775
|
`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.uplinkDecoded}.`,
|
|
1780
|
-
)
|
|
1781
|
-
|
|
1776
|
+
) ||
|
|
1777
|
+
adapterObject._id.includes(
|
|
1782
1778
|
`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.downlinkControl}.`,
|
|
1783
1779
|
)
|
|
1784
1780
|
) {
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
common: adapterObject.common,
|
|
1791
|
-
};
|
|
1792
|
-
|
|
1793
|
-
chunk.push(this.work(adapterObject._id, undefined, localOptions));
|
|
1781
|
+
if (adapterObject.type === 'state') {
|
|
1782
|
+
const localOptions = {
|
|
1783
|
+
...(options || {}),
|
|
1784
|
+
common: adapterObject.common,
|
|
1785
|
+
};
|
|
1794
1786
|
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
await Promise.all(chunk);
|
|
1798
|
-
chunk = [];
|
|
1787
|
+
await this.work(adapterObject._id, undefined, localOptions);
|
|
1788
|
+
}
|
|
1799
1789
|
}
|
|
1800
1790
|
}
|
|
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
1791
|
await this.discoverClimate();
|
|
1809
1792
|
await this.getForeignStatesForStandardEntities();
|
|
1810
1793
|
await this.getForeignClimateConfig();
|
|
@@ -1814,62 +1797,83 @@ class bridgeClass {
|
|
|
1814
1797
|
await this.getForeignLockConfig();
|
|
1815
1798
|
await this.checkDiscoveries();
|
|
1816
1799
|
} catch (error) {
|
|
1817
|
-
this.adapter.log.error(`error at ${activeFunction}:
|
|
1800
|
+
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
1818
1801
|
}
|
|
1819
1802
|
}
|
|
1820
1803
|
|
|
1821
|
-
/*
|
|
1804
|
+
/*
|
|
1822
1805
|
async checkAllStatesForBridgeWork(options) {
|
|
1823
1806
|
const activeFunction = 'bridge.js - checkAllStatesForBridgeWork';
|
|
1824
1807
|
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
1808
|
+
|
|
1825
1809
|
try {
|
|
1826
1810
|
// get old Discovered ids
|
|
1827
1811
|
this.OldDiscoveredIds = JSON.parse((await this.adapter.getStateAsync('info.discoveredIds')).val);
|
|
1828
1812
|
this.oldDiscoveredDevices = this.generateOldDevices(this.OldDiscoveredIds);
|
|
1813
|
+
|
|
1829
1814
|
// Clear object of all subscribed Ids and published Topics
|
|
1830
1815
|
this.SubscribedTopics = {};
|
|
1831
1816
|
this.PublishedIds = {};
|
|
1832
1817
|
this.Notifications = {};
|
|
1833
1818
|
|
|
1834
|
-
//this.adapter.log.error(JSON.stringify(this.oldDiscoveredDevices));
|
|
1835
1819
|
await this.discoverGeneralNotification();
|
|
1836
|
-
|
|
1837
1820
|
await this.discoverDataExchange();
|
|
1838
1821
|
|
|
1839
|
-
// Get all ids in adapterfolder
|
|
1840
|
-
// Generate Infos of all devices and decoded folders
|
|
1841
1822
|
const adapterObjects = await this.adapter.getAdapterObjectsAsync();
|
|
1823
|
+
|
|
1824
|
+
const CHUNK_SIZE = (await this.adapter.getStateAsync('bridge.debug.chunk'))?.val || 32;
|
|
1825
|
+
let chunk = [];
|
|
1842
1826
|
for (const adapterObject of Object.values(adapterObjects)) {
|
|
1827
|
+
if (adapterObject.type !== 'state') {
|
|
1828
|
+
continue;
|
|
1829
|
+
}
|
|
1843
1830
|
if (
|
|
1844
|
-
adapterObject._id.includes(
|
|
1831
|
+
!adapterObject._id.includes(
|
|
1845
1832
|
`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.uplinkDecoded}.`,
|
|
1846
|
-
)
|
|
1847
|
-
adapterObject._id.includes(
|
|
1833
|
+
) &&
|
|
1834
|
+
!adapterObject._id.includes(
|
|
1848
1835
|
`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.downlinkControl}.`,
|
|
1849
1836
|
)
|
|
1850
1837
|
) {
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1838
|
+
continue;
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
const localOptions = {
|
|
1842
|
+
...(options || {}),
|
|
1843
|
+
common: adapterObject.common,
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1846
|
+
chunk.push(this.work(adapterObject._id, undefined, localOptions));
|
|
1847
|
+
|
|
1848
|
+
// if chunk full => do
|
|
1849
|
+
if (chunk.length >= CHUNK_SIZE) {
|
|
1850
|
+
await Promise.all(chunk);
|
|
1851
|
+
chunk = [];
|
|
1858
1852
|
}
|
|
1859
1853
|
}
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1854
|
+
|
|
1855
|
+
// Do until chunk is 0
|
|
1856
|
+
if (chunk.length > 0) {
|
|
1857
|
+
await Promise.all(chunk);
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
// Promise all functions
|
|
1861
|
+
await Promise.all([
|
|
1862
|
+
this.discoverClimate(),
|
|
1863
|
+
this.getForeignStatesForStandardEntities(),
|
|
1864
|
+
this.getForeignClimateConfig(),
|
|
1865
|
+
this.getForeignHumidifierConfig(),
|
|
1866
|
+
this.getForeignLightConfig(),
|
|
1867
|
+
this.getForeignCoverConfig(),
|
|
1868
|
+
this.getForeignLockConfig(),
|
|
1869
|
+
]);
|
|
1867
1870
|
await this.checkDiscoveries();
|
|
1868
1871
|
} catch (error) {
|
|
1869
|
-
this.adapter.log.error(`error at ${activeFunction}:
|
|
1872
|
+
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
1870
1873
|
}
|
|
1871
1874
|
}
|
|
1872
1875
|
*/
|
|
1876
|
+
|
|
1873
1877
|
/**
|
|
1874
1878
|
* @param oldDiscoveredIds Ids wiche are discovered last time that Adapter runs
|
|
1875
1879
|
*/
|
package/main.js
CHANGED
|
@@ -846,24 +846,6 @@ class Lorawan extends utils.Adapter {
|
|
|
846
846
|
native: {},
|
|
847
847
|
});
|
|
848
848
|
await this.setState(id, '', true);
|
|
849
|
-
} else if (words[1] === 'chunk') {
|
|
850
|
-
this.extendObject('bridge.debug', {
|
|
851
|
-
type: 'folder',
|
|
852
|
-
common: { name: 'Debugfunctions of bridge' },
|
|
853
|
-
native: {},
|
|
854
|
-
});
|
|
855
|
-
this.extendObject('bridge.debug.chunk', {
|
|
856
|
-
type: 'state',
|
|
857
|
-
common: {
|
|
858
|
-
name: 'chunk of parallel works',
|
|
859
|
-
type: 'number',
|
|
860
|
-
read: true,
|
|
861
|
-
write: true,
|
|
862
|
-
def: 32,
|
|
863
|
-
},
|
|
864
|
-
native: {},
|
|
865
|
-
});
|
|
866
|
-
await this.setState(id, '', true);
|
|
867
849
|
}
|
|
868
850
|
} else {
|
|
869
851
|
let notificationId = `${this.namespace}.${this.bridge?.Words.notification}${this.bridge?.GeneralId}`;
|