iobroker.lorawan 1.18.60 → 1.18.62

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.18.62 (2026-01-01)
27
+ * (BenAhrdt) Promise the foreign functions in Promise.all
28
+
29
+ ### 1.18.61 (2026-01-01)
30
+ * (BenAhrdt) set chunksize to 32
31
+
26
32
  ### 1.18.60 (2026-01-01)
27
33
  * (BenAhrdt) bugfix errorlogging
28
34
 
@@ -867,7 +873,7 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
867
873
  MIT License
868
874
 
869
875
  Copyright (c) 2025-2026 BenAhrdt <bsahrdt@gmail.com>
870
- Copyright (c) 2025 Joerg Froehner <LoraWan@hafenmeister.com>
876
+ Copyright (c) 2025-2026 Joerg Froehner <LoraWan@hafenmeister.com>
871
877
 
872
878
  Permission is hereby granted, free of charge, to any person obtaining a copy
873
879
  of this software and associated documentation files (the "Software"), to deal
@@ -896,4 +902,4 @@ If this repository is forked, it must be cited as the source.
896
902
  LoRa® is a registered trademark or service
897
903
  mark of Semtech Corporation or its affilantes.
898
904
 
899
- LoRaWAN® is a licensed mark.
905
+ LoRaWAN® is a licensed mark.
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.60",
4
+ "version": "1.18.62",
5
5
  "news": {
6
+ "1.18.62": {
7
+ "en": "Promise the foreign functions in Promise.all",
8
+ "de": "Versprechen Sie die ausländischen Funktionen in Promise.all",
9
+ "ru": "Обещайте иностранные функции в Promise.all",
10
+ "pt": "Prometa as funções estrangeiras em Promise.all",
11
+ "nl": "Beloof de buitenlandse functies in Promise.all",
12
+ "fr": "Promets les fonctions étrangères dans Promise.all",
13
+ "it": "Promettere le funzioni straniere in Promise.all",
14
+ "es": "Prométeme las funciones extranjeras en Promesa.todos",
15
+ "pl": "Obiecaj funkcje zagraniczne w Promise.all",
16
+ "uk": "Використовуйте іноземні функції в Promise.all",
17
+ "zh-cn": "在保证中保证外国职能"
18
+ },
19
+ "1.18.61": {
20
+ "en": "set chunksize to 32",
21
+ "de": "set chunksize auf 32",
22
+ "ru": "устанавливает размер до 32",
23
+ "pt": "definir o tamanho do bloco como 32",
24
+ "nl": "blokgrootte instellen op 32",
25
+ "fr": "définir la taille des morceaux à 32",
26
+ "it": "set chunksize a 32",
27
+ "es": "set chunksize a 32",
28
+ "pl": "ustawiony rozmiar chunksize do 32",
29
+ "uk": "встановити chunksize до 32",
30
+ "zh-cn": "设置为32块"
31
+ },
6
32
  "1.18.60": {
7
33
  "en": "bugfix errorlogging",
8
34
  "de": "fehlerbehebung von fehlern",
@@ -67,32 +93,6 @@
67
93
  "pl": "remoove namespace two remooved\nserialize getConfigurations",
68
94
  "uk": "remoove namespace двічі remooved\nсертифіковано getConfigStates",
69
95
  "zh-cn": "两次重新移动命名空间\n序列化获取配置状态"
70
- },
71
- "1.18.55": {
72
- "en": "bugfix folderinclusion",
73
- "de": "bugfix ordnerinclusion",
74
- "ru": "bugfix включение папок",
75
- "pt": "inclusão de pastas de correção de erros",
76
- "nl": "bugfix-map-integratie",
77
- "fr": "bugfix dossierinclusion",
78
- "it": "bugfix folderinclusione",
79
- "es": "carpeta bugfixinclusion",
80
- "pl": "włączenie folderu bugfix",
81
- "uk": "папка прикусу",
82
- "zh-cn": "包含错误文件夹"
83
- },
84
- "1.18.54": {
85
- "en": "add '.' to folders in config selection",
86
- "de": "fügen sie '.' in ordner in config auswahl",
87
- "ru": "добавить '.' в папки в настройках выбора",
88
- "pt": "adicionar '.' às pastas na seleção de configuração",
89
- "nl": "'.' toevoegen aan mappen in configuratieselectie",
90
- "fr": "ajouter '.' aux dossiers dans la sélection de configuration",
91
- "it": "aggiungere '.' alle cartelle nella selezione di configurazione",
92
- "es": "añadir '.' a carpetas en la selección de configuración",
93
- "pl": "dodaj '.' do folderów w zaznaczeniu konfiguracyjnym",
94
- "uk": "додати '.' до папок у вибраному конфігурації",
95
- "zh-cn": "在配置选中的文件夹中添加“. ”"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -1768,7 +1768,7 @@ class bridgeClass {
1768
1768
 
1769
1769
  const adapterObjects = await this.adapter.getAdapterObjectsAsync();
1770
1770
 
1771
- const CHUNK_SIZE = 8; // 5–10 ist für ioBroker sehr gut
1771
+ const CHUNK_SIZE = (await this.adapter.getStateAsync('bridge.debug.chunk'))?.val || 32;
1772
1772
  let chunk = [];
1773
1773
  for (const adapterObject of Object.values(adapterObjects)) {
1774
1774
  if (adapterObject.type !== 'state') {
@@ -1792,26 +1792,28 @@ class bridgeClass {
1792
1792
 
1793
1793
  chunk.push(this.work(adapterObject._id, undefined, localOptions));
1794
1794
 
1795
- // Wenn Chunk voll warten
1795
+ // if chunk full => do
1796
1796
  if (chunk.length >= CHUNK_SIZE) {
1797
1797
  await Promise.all(chunk);
1798
1798
  chunk = [];
1799
1799
  }
1800
1800
  }
1801
1801
 
1802
- // Rest abarbeiten
1802
+ // Do until chunk is 0
1803
1803
  if (chunk.length > 0) {
1804
1804
  await Promise.all(chunk);
1805
1805
  }
1806
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();
1807
+ // Promise all functions
1808
+ await Promise.all([
1809
+ this.discoverClimate(),
1810
+ this.getForeignStatesForStandardEntities(),
1811
+ this.getForeignClimateConfig(),
1812
+ this.getForeignHumidifierConfig(),
1813
+ this.getForeignLightConfig(),
1814
+ this.getForeignCoverConfig(),
1815
+ this.getForeignLockConfig(),
1816
+ ]);
1815
1817
  await this.checkDiscoveries();
1816
1818
  } catch (error) {
1817
1819
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
package/main.js CHANGED
@@ -846,6 +846,24 @@ 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);
849
867
  }
850
868
  } else {
851
869
  let notificationId = `${this.namespace}.${this.bridge?.Words.notification}${this.bridge?.GeneralId}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.18.60",
3
+ "version": "1.18.62",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",