iobroker.lorawan 1.16.8 → 1.16.10

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,14 @@ 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.10 (2025-09-18)
27
+ * (BenAhrdt) bugfix change query of Bridgeurl to LoRaWAN url
28
+
29
+ ### 1.16.9 (2025-09-18)
30
+ * (BenAhrdt) bring connectiontest to bridge config
31
+ * (BenAhrdt) Bugfixing deaktivate LNS connection search in case of empty url
32
+ * (BenAhrdt) Bugfixing defaultvalues for json states.
33
+
26
34
  ### 1.16.8 (2025-09-17)
27
35
  * (BenAhrdt) Bring enum selection in config
28
36
 
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "Neues Gerät discovered",
162
162
  "Adapter will be stoped": "Der LoRaWAN Bridge Adapter wurde gestoppt",
163
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"
164
+ "BridgeEnumTooltip": "Wählen Sie eine enum (Kategorie) aus, die verwendet werden soll, um Adapter fremde States zur Bridge zu übertragen",
165
+ "BridgeConnectionTest": "Verbindungstest",
166
+ "BridgeConnectionTestTooltip": "Klicken, um einen Verbindungstest zur Bridge durchzuführen",
167
+ "no connection to bridge": "❌ Keine Verbindung",
168
+ "connection to bridge ok": "✅ Verbindung OK"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "new device discovered",
162
162
  "Adapter will be stoped": "The LoRaWAN Bridge Adapter will be stoped",
163
163
  "BridgeEnum": "Bridge Enum",
164
- "BridgeEnumTooltip": "Select an enum, that is used for bringing foreign states to the bridge"
164
+ "BridgeEnumTooltip": "Select an enum, that is used for bringing foreign states to the bridge",
165
+ "BridgeConnectionTest": "connectiontest",
166
+ "BridgeConnectionTestTooltip": "cklick this button, to check to connection to your bridge",
167
+ "no connection to bridge": "❌ no connection",
168
+ "connection to bridge ok": "✅ connection OK"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "nuevo dispositivo descubierto",
162
162
  "Adapter will be stoped": "El adaptador del puente Lorawan se detendrá",
163
163
  "BridgeEnum": "Enum de puente",
164
- "BridgeEnumTooltip": "Seleccione una enumación, que se usa para llevar estados extranjeros al puente"
164
+ "BridgeEnumTooltip": "Seleccione una enumación, que se usa para llevar estados extranjeros al puente",
165
+ "BridgeConnectionTest": "ConnectionTest",
166
+ "BridgeConnectionTestTooltip": "Cklick este botón, para verificar la conexión a su puente",
167
+ "no connection to bridge": "❌ Sin conexión",
168
+ "connection to bridge ok": "✅ Conexión OK"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "Nouvel appareil découvert",
162
162
  "Adapter will be stoped": "L'adaptateur de pont Lorawan sera arrêté",
163
163
  "BridgeEnum": "Énumération du pont",
164
- "BridgeEnumTooltip": "Sélectionnez une énumération, qui est utilisée pour amener des états étrangers au pont"
164
+ "BridgeEnumTooltip": "Sélectionnez une énumération, qui est utilisée pour amener des états étrangers au pont",
165
+ "BridgeConnectionTest": "connexion",
166
+ "BridgeConnectionTestTooltip": "CKlick ce bouton, pour vérifier la connexion à votre pont",
167
+ "no connection to bridge": "❌ Pas de connexion",
168
+ "connection to bridge ok": "✅ Connexion OK"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "Nuovo dispositivo scoperto",
162
162
  "Adapter will be stoped": "L'adattatore del ponte Lorawan sarà fermato",
163
163
  "BridgeEnum": "Ponte enum",
164
- "BridgeEnumTooltip": "Seleziona un enum, che viene utilizzato per portare stati stranieri sul ponte"
164
+ "BridgeEnumTooltip": "Seleziona un enum, che viene utilizzato per portare stati stranieri sul ponte",
165
+ "BridgeConnectionTest": "ConnectionTest",
166
+ "BridgeConnectionTestTooltip": "cklick questo pulsante, per controllare la connessione al tuo ponte",
167
+ "no connection to bridge": "❌ Nessuna connessione",
168
+ "connection to bridge ok": "✅ connessione ok"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "Nieuw apparaat ontdekt",
162
162
  "Adapter will be stoped": "De Lorawan Bridge -adapter wordt gestopt",
163
163
  "BridgeEnum": "Brug -opsomming",
164
- "BridgeEnumTooltip": "Selecteer een opsomming, dat wordt gebruikt om buitenlandse staten naar de brug te brengen"
164
+ "BridgeEnumTooltip": "Selecteer een opsomming, dat wordt gebruikt om buitenlandse staten naar de brug te brengen",
165
+ "BridgeConnectionTest": "Verbindingstest",
166
+ "BridgeConnectionTestTooltip": "Cklick deze knop, om te controleren op de verbinding met uw brug",
167
+ "no connection to bridge": "❌ Geen verbinding",
168
+ "connection to bridge ok": "✅ Verbinding OK"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "odkryte nowe urządzenie",
162
162
  "Adapter will be stoped": "Adapter mostu Lorawan zostanie zatrzymany",
163
163
  "BridgeEnum": "Most Enum",
164
- "BridgeEnumTooltip": "Wybierz enum, które służy do przeniesienia obcego państw na most"
164
+ "BridgeEnumTooltip": "Wybierz enum, które służy do przeniesienia obcego państw na most",
165
+ "BridgeConnectionTest": "ConnectionTest",
166
+ "BridgeConnectionTestTooltip": "CKlick ten przycisk, aby sprawdzić połączenie z mostem",
167
+ "no connection to bridge": "❌ Brak połączenia",
168
+ "connection to bridge ok": "✅ Połączenie OK"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "novo dispositivo descoberto",
162
162
  "Adapter will be stoped": "O adaptador da ponte Lorawan será interrompido",
163
163
  "BridgeEnum": "Enumeração da ponte",
164
- "BridgeEnumTooltip": "Selecione uma enumeração, usada para trazer estados estrangeiros para a ponte"
164
+ "BridgeEnumTooltip": "Selecione uma enumeração, usada para trazer estados estrangeiros para a ponte",
165
+ "BridgeConnectionTest": "ConnectionTest",
166
+ "BridgeConnectionTestTooltip": "Cklick este botão, para verificar a conexão com sua ponte",
167
+ "no connection to bridge": "❌ Sem conexão",
168
+ "connection to bridge ok": "✅ Conexão OK"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "Новое устройство обнаружено",
162
162
  "Adapter will be stoped": "Адаптер моста Лораван будет остановлен",
163
163
  "BridgeEnum": "Мост enum",
164
- "BridgeEnumTooltip": "Выберите перечисление, которое используется для привлечения иностранных государств на мост"
164
+ "BridgeEnumTooltip": "Выберите перечисление, которое используется для привлечения иностранных государств на мост",
165
+ "BridgeConnectionTest": "ConnectionTest",
166
+ "BridgeConnectionTestTooltip": "Cklick эта кнопка, чтобы проверить подключение к мосту",
167
+ "no connection to bridge": "❌ Нет соединения",
168
+ "connection to bridge ok": "✅ Соединение ОК"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "Виявлений новий пристрій",
162
162
  "Adapter will be stoped": "Адаптер мосту Лоравана буде зупинено",
163
163
  "BridgeEnum": "Мост",
164
- "BridgeEnumTooltip": "Виберіть Enum, який використовується для залучення іноземних держав до мосту"
164
+ "BridgeEnumTooltip": "Виберіть Enum, який використовується для залучення іноземних держав до мосту",
165
+ "BridgeConnectionTest": "з'єднання",
166
+ "BridgeConnectionTestTooltip": "cklick ця кнопка, щоб перевірити підключення до вашого мосту",
167
+ "no connection to bridge": "❌ Немає з'єднання",
168
+ "connection to bridge ok": "✅ з'єднання добре"
165
169
  }
@@ -161,5 +161,9 @@
161
161
  "new device discovered": "发现了新设备",
162
162
  "Adapter will be stoped": "Lorawan桥适配器将停止",
163
163
  "BridgeEnum": "桥梁枚举",
164
- "BridgeEnumTooltip": "选择一个枚举,用于将外国带到桥梁"
164
+ "BridgeEnumTooltip": "选择一个枚举,用于将外国带到桥梁",
165
+ "BridgeConnectionTest": "连接测试",
166
+ "BridgeConnectionTestTooltip": "cklick此按钮,检查连接到您的桥梁",
167
+ "no connection to bridge": "❌没有连接",
168
+ "connection to bridge ok": "✅连接确定"
165
169
  }
@@ -943,6 +943,30 @@
943
943
  "lg": 3,
944
944
  "xl": 3
945
945
  },
946
+ "_Sparepart":{
947
+ "type": "staticText",
948
+ "label": "",
949
+ "xs": 1,
950
+ "sm": 1,
951
+ "md": 1,
952
+ "lg": 1,
953
+ "xl": 1
954
+ },
955
+ "_BridgeConnectionTest":{
956
+ "type": "sendTo",
957
+ "label": "BridgeConnectionTest",
958
+ "hidden": "data.BridgeType === 'off'",
959
+ "tooltip": "BridgeConnectionTestTooltip",
960
+ "showProcess": false,
961
+ "variant": "contained",
962
+ "jsonData": "{\"BridgeipUrl\":\"${data.BridgeipUrl}\",\"Bridgeport\":${data.Bridgeport},\"Bridgessl\":${data.Bridgessl},\"Bridgeusername\":\"${data.Bridgeusername}\",\"Bridgepassword\":\"${data.Bridgepassword}\"}",
963
+ "command": "getBridgeConnection",
964
+ "xs": 12,
965
+ "sm": 3,
966
+ "md": 3,
967
+ "lg": 3,
968
+ "xl": 3
969
+ },
946
970
  "_DeviceIdentifierDiscription":{
947
971
  "newLine":true,
948
972
  "type": "staticText",
@@ -1441,7 +1465,7 @@
1441
1465
  "attr": "ModeState",
1442
1466
  "label": "State",
1443
1467
  "default": "No State selected",
1444
- "jsonData": "{\"application\":\"${data.ModeApplication}\",\"device\":\"${data.ActDevice}\",\"folder\":\"${data.ActFolder}\"}",
1468
+ "jsonData": "{\"application\":\"${data.ModeApplication}\",\"device\":\"${data.ModeDevice}\",\"folder\":\"${data.ModeFolder}\"}",
1445
1469
  "command": "getStatesForClimateConfig",
1446
1470
  "noTranslation": true,
1447
1471
  "alsoDependsOn":[
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.16.8",
4
+ "version": "1.16.10",
5
5
  "news": {
6
+ "1.16.10": {
7
+ "en": "bugfix change query of Bridgeurl to LoRaWAN url",
8
+ "de": "Fehlerbehebung Änderung der Abfrage von Bridge-URL zu LoRaWAN-URL",
9
+ "ru": "Исправлена ошибка изменения запроса с Bridgeurl на LoRaWAN url.",
10
+ "pt": "correção de bug: alteração da consulta do Bridgeurl para a url LoRaWAN",
11
+ "nl": "bugfix verander query van Bridgeurl naar LoRaWAN-url",
12
+ "fr": "corriger le changement de requête de Bridgeurl vers l'URL LoRaWAN",
13
+ "it": "Modifica del bugfix della query del Bridgeurl in indirizzo LoRaWAN.",
14
+ "es": "Corrección de errores: cambiar la consulta de Bridgeurl a la URL de LoRaWAN.",
15
+ "pl": "Naprawiono błąd zmieniający zapytanie Bridgeurl na adres url LoRaWAN",
16
+ "uk": "виправлення помилки зміни запиту Bridgeurl на URL протоколу LoRaWAN",
17
+ "zh-cn": "修复将Bridgeurl查询更改为LoRaWAN网址"
18
+ },
19
+ "1.16.9": {
20
+ "en": "bring connectiontest to bridge config\nBugfixing deaktivate LNS connection search in case of empty url\nBugfixing defaultvalues for json states.",
21
+ "de": "Füge den Verbindungstest zur Bridge-Konfiguration hinzu.\nFehlerbehebung: Deaktivierung der LNS-Verbindungssuche im Falle einer leeren URL\nBeheben von Standardwerten für JSON-Stati.",
22
+ "ru": "Добавить тест соединения в настройки моста.\nИсправлена ошибка, отключающая поиск подключения LNS в случае пустого URL-адреса.\nИсправление ошибок значений по умолчанию для состояний JSON.",
23
+ "pt": "Adicionar teste de conexão à configuração da ponte\nCorreção de bug: desativar a busca de conexão LNS no caso de URL vazia\nCorreção de bug nos valores padrão para estados json.",
24
+ "nl": "Voeg de verbindingstest toe aan de bridge-configuratie.\nBugfix: deactiveer LNS-verbinding zoeken in geval van een lege URL.\nOplossing van standaardwaarden voor json-stateno.",
25
+ "fr": "ajouter le test de connexion à la configuration du pont\nCorrection de bugs: désactivation de la recherche de connexion LNS en cas d'URL vide\nCorrection de bugs pour les valeurs par défaut des états JSON.",
26
+ "it": "portare il test di connessione alla configurazione del bridge\nCorrezione di bug: disattivata la ricerca della connessione LNS in caso di URL vuoto\nCorrezione dei valori predefiniti per gli stati JSON.",
27
+ "es": "agregar prueba de conexión a la configuración del puente\nCorrección de errores: desactivar la búsqueda de conexión LNS en caso de URL vacía\nCorrección de errores en los valores predeterminados para los estados JSON.",
28
+ "pl": "Dodaj test połączenia do konfiguracji mostka\nNaprawiono problem z deaktywacją wyszukiwania połączenia LNS w przypadku pustego adresu URL.\nNaprawiono wartości domyślne dla stanów typu json.",
29
+ "uk": "Додайте перевірку з'єднання до налаштувань моста.\nВиправлення помилки в деактивації пошуку підключення LNS у випадку порожнього URL\nВиправлення значень за замовчуванням для станів JSON.",
30
+ "zh-cn": "将连接测试添加到桥接器配置\n修复Bug:如果URL为空,则禁用LNS连接搜索。\n修复了JSON状态的默认值。"
31
+ },
6
32
  "1.16.8": {
7
33
  "en": "Bring enum selection in config",
8
34
  "de": "Fügen Sie die Auswahlmöglichkeit für Aufzählungen in der Konfiguration hinzu.",
@@ -67,32 +93,6 @@
67
93
  "pl": "Importuj stany mostu do momentu uruchomienia adaptera.\nUsunięto stany obce do momentu uruchomienia adaptera.",
68
94
  "uk": "Міст імпортує зовнішні стани поки адаптер працює\nВидалення зовнішніх станів у мосту доки адаптер працює.",
69
95
  "zh-cn": "桥接器在适配器运行之前导入外部状态\n桥删除外部状态直到适配器运行"
70
- },
71
- "1.16.3": {
72
- "en": "nameing of foreign Devices in Bridge",
73
- "de": "Benennung von fremden Geräten in der Brücke",
74
- "ru": "Наименование иностранных устройств в мосту",
75
- "pt": "Nomenclatura de Dispositivos Estrangeiros na Ponte",
76
- "nl": "Benaming van externe apparaten in de bridge",
77
- "fr": "Renommage des appareils étrangers dans le pont",
78
- "it": "Nominativo dei dispositivi stranieri nel Bridge",
79
- "es": "Renombrar dispositivos extranjeros en el puente",
80
- "pl": "Nadanie nazw obcym urządzeniom w mostku",
81
- "uk": "Перейменування зовнішніх пристроїв у мосту",
82
- "zh-cn": "在网桥中给外部设备命名"
83
- },
84
- "1.16.2": {
85
- "en": "bugfix namespace also by calling work from directoryhandler",
86
- "de": "Bug behoben: Namensraum auch durch Aufruf von \"Arbeit\" von DirectoryHandler.",
87
- "ru": "исправлена ошибка с пространством имен путем вызова работы из directoryhandler",
88
- "pt": "Corrigido bug ao chamar namespace também utilizando o trabalho do directoryhandler.",
89
- "nl": "Bugfix: Namespace wordt nu ook correct opgeroepen bij het gebruik van werk van DirectoryHandler.",
90
- "fr": "Correction de bug du namespace également en appelant le travail du gestionnaire de répertoires.",
91
- "it": "Correzione di bug anche chiamando il lavoro dal gestore della directory.",
92
- "es": "Corrección de error en el espacio de nombres al llamar al trabajo desde directoryhandler",
93
- "pl": "Poprawka błędu: przestrzeń nazw również wywoływana przez funkcję work z directoryhandler",
94
- "uk": "виправлено помилку у просторі імен також шляхом виклику роботи з обробника директорій",
95
- "zh-cn": "通过调用`directoryhandler`来修复了`namespace`问题。"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -512,7 +512,7 @@
512
512
  "icon": "icons/discover.png",
513
513
  "read": true,
514
514
  "write": false,
515
- "def": ""
515
+ "def": "{}"
516
516
  },
517
517
  "native": {}
518
518
  },
@@ -526,7 +526,7 @@
526
526
  "icon": "icons/discover.png",
527
527
  "read": true,
528
528
  "write": false,
529
- "def": ""
529
+ "def": "{}"
530
530
  },
531
531
  "native": {}
532
532
  },
@@ -540,7 +540,7 @@
540
540
  "icon": "icons/discover.png",
541
541
  "read": true,
542
542
  "write": false,
543
- "def": ""
543
+ "def": "{}"
544
544
  },
545
545
  "native": {}
546
546
  },
@@ -554,7 +554,7 @@
554
554
  "icon": "icons/deviceinfo.png",
555
555
  "read": true,
556
556
  "write": false,
557
- "def": ""
557
+ "def": "{}"
558
558
  },
559
559
  "native": {}
560
560
  }
@@ -17,7 +17,7 @@ class bridgeMqttClientClass {
17
17
  clientId: `iobroker_${this.adapter.namespace}.bridge`,
18
18
  });
19
19
 
20
- // Prefix for publish and subscrip
20
+ // Prefix for publish and subscribe
21
21
  this.BridgePrefix = `${this.adapter.namespace}/`.replace(/\./g, '_');
22
22
 
23
23
  // Variables for correct connection (disconnection) notification / logging
package/main.js CHANGED
@@ -1,4 +1,5 @@
1
1
  'use strict';
2
+ const mqtt = require('mqtt');
2
3
 
3
4
  /*
4
5
  * Created with @iobroker/create-adapter v2.6.0
@@ -65,8 +66,10 @@ class Lorawan extends utils.Adapter {
65
66
  // create new messagehandler
66
67
  this.messagehandler = new messagehandlerClass(this);
67
68
 
68
- // Set mqtt client
69
- this.mqttClient = new mqttClientClass(this, this.config);
69
+ // Set mqtt client => just declare, if a url is set
70
+ if (this.config.ipUrl !== '') {
71
+ this.mqttClient = new mqttClientClass(this, this.config);
72
+ }
70
73
 
71
74
  // declare bridge if configed
72
75
  if (this.config.BridgeType !== 'off') {
@@ -1251,6 +1254,36 @@ class Lorawan extends utils.Adapter {
1251
1254
  } catch (error) {
1252
1255
  this.log.error(error);
1253
1256
  }
1257
+ } else if (obj.command === 'getBridgeConnection') {
1258
+ try {
1259
+ this.log.error(typeof obj.message.Bridgessl);
1260
+ let connection = false;
1261
+ const mqttprefix = obj.message.Bridgessl ? 'mqtts://' : 'mqtt://';
1262
+ const testclient = mqtt.connect(`${mqttprefix}${obj.message.BridgeipUrl}`, {
1263
+ port: obj.message.Bridgeport,
1264
+ username: obj.message.Bridgeusername,
1265
+ password: obj.message.Bridgepassword,
1266
+ clientId: `iobroker_${this.namespace}.bridgeTest`,
1267
+ });
1268
+ testclient.on('connect', async () => {
1269
+ connection = true;
1270
+ });
1271
+ setTimeout(() => {
1272
+ testclient.end();
1273
+ this.sendTo(
1274
+ obj.from,
1275
+ obj.command,
1276
+ {
1277
+ result: connection
1278
+ ? this.i18nTranslation['connection to bridge ok']
1279
+ : this.i18nTranslation['no connection to bridge'],
1280
+ },
1281
+ obj.callback,
1282
+ );
1283
+ }, 100);
1284
+ } catch (error) {
1285
+ this.log.error(error);
1286
+ }
1254
1287
  } else {
1255
1288
  const result = { error: true, message: 'No message matched', received: obj.message };
1256
1289
  if (obj.callback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.16.8",
3
+ "version": "1.16.10",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",