iobroker.lorawan 1.16.7 → 1.16.8

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,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.16.8 (2025-09-17)
27
+ * (BenAhrdt) Bring enum selection in config
28
+
26
29
  ### 1.16.7 (2025-09-17)
27
30
  * (BenAhrdt) Bugfix deleting discovered devices
28
31
  * (BenAhrdt) build in devug logging to find bug in devicename
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "Die Verbindung zur Bridge ist aktiv",
160
160
  "connection to bridge is closed": "Die Verbindung zur Bridge ist geschlossen",
161
161
  "new device discovered": "Neues Gerät discovered",
162
- "Adapter will be stoped": "Der LoRaWAN Bridge Adapter wurde gestoppt"
162
+ "Adapter will be stoped": "Der LoRaWAN Bridge Adapter wurde gestoppt",
163
+ "BridgeEnum": "Bridge enum",
164
+ "BridgeEnumTooltip": "Wählen Sie eine enum (Kategorie) aus, die verwendet werden soll, um Adapter fremde States zur Bridge zu übertragen"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "connection to bridge is activ",
160
160
  "connection to bridge is closed": "connection to bridge will be closed",
161
161
  "new device discovered": "new device discovered",
162
- "Adapter will be stoped": "The LoRaWAN Bridge Adapter will be stoped"
162
+ "Adapter will be stoped": "The LoRaWAN Bridge Adapter will be stoped",
163
+ "BridgeEnum": "Bridge Enum",
164
+ "BridgeEnumTooltip": "Select an enum, that is used for bringing foreign states to the bridge"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "La conexión al puente es activado",
160
160
  "connection to bridge is closed": "La conexión al puente se cerrará",
161
161
  "new device discovered": "nuevo dispositivo descubierto",
162
- "Adapter will be stoped": "El adaptador del puente Lorawan se detendrá"
162
+ "Adapter will be stoped": "El adaptador del puente Lorawan se detendrá",
163
+ "BridgeEnum": "Enum de puente",
164
+ "BridgeEnumTooltip": "Seleccione una enumación, que se usa para llevar estados extranjeros al puente"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "La connexion au pont est activ",
160
160
  "connection to bridge is closed": "La connexion au pont sera fermée",
161
161
  "new device discovered": "Nouvel appareil découvert",
162
- "Adapter will be stoped": "L'adaptateur de pont Lorawan sera arrêté"
162
+ "Adapter will be stoped": "L'adaptateur de pont Lorawan sera arrêté",
163
+ "BridgeEnum": "Énumération du pont",
164
+ "BridgeEnumTooltip": "Sélectionnez une énumération, qui est utilisée pour amener des états étrangers au pont"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "La connessione a bridge è attiva",
160
160
  "connection to bridge is closed": "La connessione al ponte sarà chiusa",
161
161
  "new device discovered": "Nuovo dispositivo scoperto",
162
- "Adapter will be stoped": "L'adattatore del ponte Lorawan sarà fermato"
162
+ "Adapter will be stoped": "L'adattatore del ponte Lorawan sarà fermato",
163
+ "BridgeEnum": "Ponte enum",
164
+ "BridgeEnumTooltip": "Seleziona un enum, che viene utilizzato per portare stati stranieri sul ponte"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "Verbinding met Bridge is activ",
160
160
  "connection to bridge is closed": "Verbinding met Bridge wordt gesloten",
161
161
  "new device discovered": "Nieuw apparaat ontdekt",
162
- "Adapter will be stoped": "De Lorawan Bridge -adapter wordt gestopt"
162
+ "Adapter will be stoped": "De Lorawan Bridge -adapter wordt gestopt",
163
+ "BridgeEnum": "Brug -opsomming",
164
+ "BridgeEnumTooltip": "Selecteer een opsomming, dat wordt gebruikt om buitenlandse staten naar de brug te brengen"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "Połączenie z mostem jest aktywne",
160
160
  "connection to bridge is closed": "Połączenie z mostem zostanie zamknięte",
161
161
  "new device discovered": "odkryte nowe urządzenie",
162
- "Adapter will be stoped": "Adapter mostu Lorawan zostanie zatrzymany"
162
+ "Adapter will be stoped": "Adapter mostu Lorawan zostanie zatrzymany",
163
+ "BridgeEnum": "Most Enum",
164
+ "BridgeEnumTooltip": "Wybierz enum, które służy do przeniesienia obcego państw na most"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "A conexão com a ponte é ativista",
160
160
  "connection to bridge is closed": "A conexão com a ponte será fechada",
161
161
  "new device discovered": "novo dispositivo descoberto",
162
- "Adapter will be stoped": "O adaptador da ponte Lorawan será interrompido"
162
+ "Adapter will be stoped": "O adaptador da ponte Lorawan será interrompido",
163
+ "BridgeEnum": "Enumeração da ponte",
164
+ "BridgeEnumTooltip": "Selecione uma enumeração, usada para trazer estados estrangeiros para a ponte"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "Соединение с мостом является активацией",
160
160
  "connection to bridge is closed": "Соединение с мостом будет закрыто",
161
161
  "new device discovered": "Новое устройство обнаружено",
162
- "Adapter will be stoped": "Адаптер моста Лораван будет остановлен"
162
+ "Adapter will be stoped": "Адаптер моста Лораван будет остановлен",
163
+ "BridgeEnum": "Мост enum",
164
+ "BridgeEnumTooltip": "Выберите перечисление, которое используется для привлечения иностранных государств на мост"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "Підключення до мосту активується",
160
160
  "connection to bridge is closed": "Підключення до мосту буде закрито",
161
161
  "new device discovered": "Виявлений новий пристрій",
162
- "Adapter will be stoped": "Адаптер мосту Лоравана буде зупинено"
162
+ "Adapter will be stoped": "Адаптер мосту Лоравана буде зупинено",
163
+ "BridgeEnum": "Мост",
164
+ "BridgeEnumTooltip": "Виберіть Enum, який використовується для залучення іноземних держав до мосту"
163
165
  }
@@ -159,5 +159,7 @@
159
159
  "connection to bridge is activ": "连接到桥梁是激活",
160
160
  "connection to bridge is closed": "连接到桥梁将关闭",
161
161
  "new device discovered": "发现了新设备",
162
- "Adapter will be stoped": "Lorawan桥适配器将停止"
162
+ "Adapter will be stoped": "Lorawan桥适配器将停止",
163
+ "BridgeEnum": "桥梁枚举",
164
+ "BridgeEnumTooltip": "选择一个枚举,用于将外国带到桥梁"
163
165
  }
@@ -783,7 +783,21 @@
783
783
  "md": 2,
784
784
  "lg": 2,
785
785
  "xl": 2
786
- },
786
+ },
787
+ "BridgeEnum": {
788
+ "type": "selectSendTo",
789
+ "label": "BridgeEnum",
790
+ "tooltip": "BridgeEnumTooltip",
791
+ "default": "",
792
+ "jsonData": "{}",
793
+ "command": "getEnums",
794
+ "hidden": "data.BridgeType === 'off'",
795
+ "xs": 12,
796
+ "sm": 5,
797
+ "md": 5,
798
+ "lg": 5,
799
+ "xl": 5
800
+ },
787
801
  "BridgenotificationActivation":{
788
802
  "newLine": true,
789
803
  "type": "select",
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.16.7",
4
+ "version": "1.16.8",
5
5
  "news": {
6
+ "1.16.8": {
7
+ "en": "Bring enum selection in config",
8
+ "de": "Fügen Sie die Auswahlmöglichkeit für Aufzählungen in der Konfiguration hinzu.",
9
+ "ru": "Добавлена возможность выбора значения из перечисления в настройках",
10
+ "pt": "Trazer seleção de enumeração na configuração",
11
+ "nl": "Breng de enum-selectie in de configuratie",
12
+ "fr": "Apporter la sélection d'énumération dans la configuration",
13
+ "it": "Porta la selezione dell'enum nella configurazione",
14
+ "es": "Traer selección de enum en la configuración",
15
+ "pl": "Przynieś wybór enum w konfiguracji",
16
+ "uk": "Додано вибір типу даних \"enum\" в налаштуваннях (config).",
17
+ "zh-cn": "在配置中添加枚举选择"
18
+ },
6
19
  "1.16.7": {
7
20
  "en": "Bugfix deleting discovered devices\nbuild in devug logging to find bug in devicename",
8
21
  "de": "Fehlerbehebung beim Löschen entdeckter Geräte\nFüge Debug-Logging hinzu, um Fehler im Gerätenamen zu finden.",
@@ -80,19 +93,6 @@
80
93
  "pl": "Poprawka błędu: przestrzeń nazw również wywoływana przez funkcję work z directoryhandler",
81
94
  "uk": "виправлено помилку у просторі імен також шляхом виклику роботи з обробника директорій",
82
95
  "zh-cn": "通过调用`directoryhandler`来修复了`namespace`问题。"
83
- },
84
- "1.16.1": {
85
- "en": "bugfix namespace also by notifications",
86
- "de": "Fehlerbehebung Namespace auch bei Benachrichtigungen",
87
- "ru": "исправлена ошибка с пространством имён также для уведомлений",
88
- "pt": "Correção de bug no namespace também por notificações.",
89
- "nl": "bugfix namespace ook bij meldingen",
90
- "fr": "Correction d'un bug concernant les notifications de namespace.",
91
- "it": "Risolto bug anche per i namespace nelle notifiche",
92
- "es": "Corrección de error en el espacio de nombres también por notificaciones.",
93
- "pl": "naprawiono błąd z przestrzenią nazw również w powiadomieniach",
94
- "uk": "виправлення помилки простору імен також за допомогою сповіщень",
95
- "zh-cn": "修复命名空间通知问题"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -422,6 +422,7 @@
422
422
  "BridgeType": "off",
423
423
  "EnableRefresh": true,
424
424
  "RefreshDiscoveryCronJob": "0 * * * *",
425
+ "BridgeEnum": "",
425
426
  "BridgenotificationActivation": "allNotifications, brdigeConnection, newDiscover, deviceState",
426
427
  "BridgeDevicenotificationActivation": "allNotifications, brdigeConnection, newDiscover, deviceState",
427
428
  "DeviceIdentifiers": [
@@ -1571,12 +1571,14 @@ class bridgeClass {
1571
1571
  const activeFunction = 'bridge.js - getForeignStatesForStandardEntities';
1572
1572
  this.adapter.log.debug(`Function ${activeFunction} started.`);
1573
1573
  try {
1574
- const idBridgefunction = 'enum.functions.bridge';
1575
- await this.adapter.subscribeForeignObjectsAsync('enum.functions.bridge');
1576
- const bridgeElements = await this.adapter.getForeignObjectAsync(idBridgefunction);
1577
- if (bridgeElements) {
1578
- for (const member of bridgeElements.common.members) {
1579
- await this.discoverForeignRange(member);
1574
+ const idBridgefunction = this.adapter.config.BridgeEnum;
1575
+ if (idBridgefunction !== '') {
1576
+ await this.adapter.subscribeForeignObjectsAsync(idBridgefunction);
1577
+ const bridgeElements = await this.adapter.getForeignObjectAsync(idBridgefunction);
1578
+ if (bridgeElements) {
1579
+ for (const member of bridgeElements.common.members) {
1580
+ await this.discoverForeignRange(member);
1581
+ }
1580
1582
  }
1581
1583
  }
1582
1584
  } catch (error) {
package/main.js CHANGED
@@ -34,6 +34,8 @@ class Lorawan extends utils.Adapter {
34
34
 
35
35
  // Simulation variables
36
36
  this.simulation = {};
37
+ this.mySystemConfig;
38
+ this.language;
37
39
  }
38
40
 
39
41
  onFileChange(_id, _fileName, _size) {
@@ -50,6 +52,10 @@ class Lorawan extends utils.Adapter {
50
52
  // read system translation out of i18n translation
51
53
  this.i18nTranslation = await this.geti18nTranslation();
52
54
 
55
+ // get systemconfig and configued language
56
+ this.mySystemConfig = await this.getForeignObjectAsync('system.config');
57
+ this.language = this.mySystemConfig?.common.language || 'en';
58
+
53
59
  // create downlinkConfigs
54
60
  this.downlinkConfighandler = new downlinkConfighandlerClass(this);
55
61
 
@@ -1224,6 +1230,27 @@ class Lorawan extends utils.Adapter {
1224
1230
  } catch (error) {
1225
1231
  this.log.error(error);
1226
1232
  }
1233
+ } else if (obj.command === 'getEnums') {
1234
+ try {
1235
+ const enums = [{ label: 'No Enum selected', value: '*' }];
1236
+ const enumList = await this.getEnumsAsync();
1237
+ for (const enumtyp of Object.values(enumList)) {
1238
+ for (const myEnum of Object.values(enumtyp)) {
1239
+ const value = myEnum._id;
1240
+ let label = myEnum.common.name;
1241
+ if (typeof label !== 'string') {
1242
+ if (this.language) {
1243
+ label = myEnum.common.name[this.language];
1244
+ }
1245
+ }
1246
+ label += ` (${myEnum._id.substring(5, myEnum._id.length)})`;
1247
+ enums.push({ label: label.toString(), value: value });
1248
+ }
1249
+ }
1250
+ this.sendTo(obj.from, obj.command, enums, obj.callback);
1251
+ } catch (error) {
1252
+ this.log.error(error);
1253
+ }
1227
1254
  } else {
1228
1255
  const result = { error: true, message: 'No message matched', received: obj.message };
1229
1256
  if (obj.callback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.16.7",
3
+ "version": "1.16.8",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",