iobroker.lorawan 1.16.7 → 1.16.9
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 +8 -0
- package/admin/i18n/de/translations.json +7 -1
- package/admin/i18n/en/translations.json +7 -1
- package/admin/i18n/es/translations.json +7 -1
- package/admin/i18n/fr/translations.json +7 -1
- package/admin/i18n/it/translations.json +7 -1
- package/admin/i18n/nl/translations.json +7 -1
- package/admin/i18n/pl/translations.json +7 -1
- package/admin/i18n/pt/translations.json +7 -1
- package/admin/i18n/ru/translations.json +7 -1
- package/admin/i18n/uk/translations.json +7 -1
- package/admin/i18n/zh-cn/translations.json +7 -1
- package/admin/jsonConfig.json +40 -2
- package/io-package.json +32 -31
- package/lib/modules/bridge.js +8 -6
- package/lib/modules/bridgeMqttclient.js +1 -1
- package/main.js +62 -2
- package/package.json +1 -1
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.9 (2025-09-18)
|
|
27
|
+
* (BenAhrdt) bring connectiontest to bridge config
|
|
28
|
+
* (BenAhrdt) Bugfixing deaktivate LNS connection search in case of empty url
|
|
29
|
+
* (BenAhrdt) Bugfixing defaultvalues for json states.
|
|
30
|
+
|
|
31
|
+
### 1.16.8 (2025-09-17)
|
|
32
|
+
* (BenAhrdt) Bring enum selection in config
|
|
33
|
+
|
|
26
34
|
### 1.16.7 (2025-09-17)
|
|
27
35
|
* (BenAhrdt) Bugfix deleting discovered devices
|
|
28
36
|
* (BenAhrdt) build in devug logging to find bug in devicename
|
|
@@ -159,5 +159,11 @@
|
|
|
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",
|
|
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"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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",
|
|
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"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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",
|
|
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"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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",
|
|
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"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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",
|
|
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"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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",
|
|
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"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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",
|
|
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"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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",
|
|
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"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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": "Выберите перечисление, которое используется для привлечения иностранных государств на мост",
|
|
165
|
+
"BridgeConnectionTest": "ConnectionTest",
|
|
166
|
+
"BridgeConnectionTestTooltip": "Cklick эта кнопка, чтобы проверить подключение к мосту",
|
|
167
|
+
"no connection to bridge": "❌ Нет соединения",
|
|
168
|
+
"connection to bridge ok": "✅ Соединение ОК"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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, який використовується для залучення іноземних держав до мосту",
|
|
165
|
+
"BridgeConnectionTest": "з'єднання",
|
|
166
|
+
"BridgeConnectionTestTooltip": "cklick ця кнопка, щоб перевірити підключення до вашого мосту",
|
|
167
|
+
"no connection to bridge": "❌ Немає з'єднання",
|
|
168
|
+
"connection to bridge ok": "✅ з'єднання добре"
|
|
163
169
|
}
|
|
@@ -159,5 +159,11 @@
|
|
|
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": "选择一个枚举,用于将外国带到桥梁",
|
|
165
|
+
"BridgeConnectionTest": "连接测试",
|
|
166
|
+
"BridgeConnectionTestTooltip": "cklick此按钮,检查连接到您的桥梁",
|
|
167
|
+
"no connection to bridge": "❌没有连接",
|
|
168
|
+
"connection to bridge ok": "✅连接确定"
|
|
163
169
|
}
|
package/admin/jsonConfig.json
CHANGED
|
@@ -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",
|
|
@@ -929,6 +943,30 @@
|
|
|
929
943
|
"lg": 3,
|
|
930
944
|
"xl": 3
|
|
931
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
|
+
},
|
|
932
970
|
"_DeviceIdentifierDiscription":{
|
|
933
971
|
"newLine":true,
|
|
934
972
|
"type": "staticText",
|
|
@@ -1427,7 +1465,7 @@
|
|
|
1427
1465
|
"attr": "ModeState",
|
|
1428
1466
|
"label": "State",
|
|
1429
1467
|
"default": "No State selected",
|
|
1430
|
-
"jsonData": "{\"application\":\"${data.ModeApplication}\",\"device\":\"${data.
|
|
1468
|
+
"jsonData": "{\"application\":\"${data.ModeApplication}\",\"device\":\"${data.ModeDevice}\",\"folder\":\"${data.ModeFolder}\"}",
|
|
1431
1469
|
"command": "getStatesForClimateConfig",
|
|
1432
1470
|
"noTranslation": true,
|
|
1433
1471
|
"alsoDependsOn":[
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.9",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.16.9": {
|
|
7
|
+
"en": "bring connectiontest to bridge config\nBugfixing deaktivate LNS connection search in case of empty url\nBugfixing defaultvalues for json states.",
|
|
8
|
+
"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.",
|
|
9
|
+
"ru": "Добавить тест соединения в настройки моста.\nИсправлена ошибка, отключающая поиск подключения LNS в случае пустого URL-адреса.\nИсправление ошибок значений по умолчанию для состояний JSON.",
|
|
10
|
+
"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.",
|
|
11
|
+
"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.",
|
|
12
|
+
"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.",
|
|
13
|
+
"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.",
|
|
14
|
+
"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.",
|
|
15
|
+
"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.",
|
|
16
|
+
"uk": "Додайте перевірку з'єднання до налаштувань моста.\nВиправлення помилки в деактивації пошуку підключення LNS у випадку порожнього URL\nВиправлення значень за замовчуванням для станів JSON.",
|
|
17
|
+
"zh-cn": "将连接测试添加到桥接器配置\n修复Bug:如果URL为空,则禁用LNS连接搜索。\n修复了JSON状态的默认值。"
|
|
18
|
+
},
|
|
19
|
+
"1.16.8": {
|
|
20
|
+
"en": "Bring enum selection in config",
|
|
21
|
+
"de": "Fügen Sie die Auswahlmöglichkeit für Aufzählungen in der Konfiguration hinzu.",
|
|
22
|
+
"ru": "Добавлена возможность выбора значения из перечисления в настройках",
|
|
23
|
+
"pt": "Trazer seleção de enumeração na configuração",
|
|
24
|
+
"nl": "Breng de enum-selectie in de configuratie",
|
|
25
|
+
"fr": "Apporter la sélection d'énumération dans la configuration",
|
|
26
|
+
"it": "Porta la selezione dell'enum nella configurazione",
|
|
27
|
+
"es": "Traer selección de enum en la configuración",
|
|
28
|
+
"pl": "Przynieś wybór enum w konfiguracji",
|
|
29
|
+
"uk": "Додано вибір типу даних \"enum\" в налаштуваннях (config).",
|
|
30
|
+
"zh-cn": "在配置中添加枚举选择"
|
|
31
|
+
},
|
|
6
32
|
"1.16.7": {
|
|
7
33
|
"en": "Bugfix deleting discovered devices\nbuild in devug logging to find bug in devicename",
|
|
8
34
|
"de": "Fehlerbehebung beim Löschen entdeckter Geräte\nFüge Debug-Logging hinzu, um Fehler im Gerätenamen zu finden.",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Nadanie nazw obcym urządzeniom w mostku",
|
|
68
94
|
"uk": "Перейменування зовнішніх пристроїв у мосту",
|
|
69
95
|
"zh-cn": "在网桥中给外部设备命名"
|
|
70
|
-
},
|
|
71
|
-
"1.16.2": {
|
|
72
|
-
"en": "bugfix namespace also by calling work from directoryhandler",
|
|
73
|
-
"de": "Bug behoben: Namensraum auch durch Aufruf von \"Arbeit\" von DirectoryHandler.",
|
|
74
|
-
"ru": "исправлена ошибка с пространством имен путем вызова работы из directoryhandler",
|
|
75
|
-
"pt": "Corrigido bug ao chamar namespace também utilizando o trabalho do directoryhandler.",
|
|
76
|
-
"nl": "Bugfix: Namespace wordt nu ook correct opgeroepen bij het gebruik van werk van DirectoryHandler.",
|
|
77
|
-
"fr": "Correction de bug du namespace également en appelant le travail du gestionnaire de répertoires.",
|
|
78
|
-
"it": "Correzione di bug anche chiamando il lavoro dal gestore della directory.",
|
|
79
|
-
"es": "Corrección de error en el espacio de nombres al llamar al trabajo desde directoryhandler",
|
|
80
|
-
"pl": "Poprawka błędu: przestrzeń nazw również wywoływana przez funkcję work z directoryhandler",
|
|
81
|
-
"uk": "виправлено помилку у просторі імен також шляхом виклику роботи з обробника директорій",
|
|
82
|
-
"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": [
|
|
@@ -511,7 +512,7 @@
|
|
|
511
512
|
"icon": "icons/discover.png",
|
|
512
513
|
"read": true,
|
|
513
514
|
"write": false,
|
|
514
|
-
"def": ""
|
|
515
|
+
"def": "{}"
|
|
515
516
|
},
|
|
516
517
|
"native": {}
|
|
517
518
|
},
|
|
@@ -525,7 +526,7 @@
|
|
|
525
526
|
"icon": "icons/discover.png",
|
|
526
527
|
"read": true,
|
|
527
528
|
"write": false,
|
|
528
|
-
"def": ""
|
|
529
|
+
"def": "{}"
|
|
529
530
|
},
|
|
530
531
|
"native": {}
|
|
531
532
|
},
|
|
@@ -539,7 +540,7 @@
|
|
|
539
540
|
"icon": "icons/discover.png",
|
|
540
541
|
"read": true,
|
|
541
542
|
"write": false,
|
|
542
|
-
"def": ""
|
|
543
|
+
"def": "{}"
|
|
543
544
|
},
|
|
544
545
|
"native": {}
|
|
545
546
|
},
|
|
@@ -553,7 +554,7 @@
|
|
|
553
554
|
"icon": "icons/deviceinfo.png",
|
|
554
555
|
"read": true,
|
|
555
556
|
"write": false,
|
|
556
|
-
"def": ""
|
|
557
|
+
"def": "{}"
|
|
557
558
|
},
|
|
558
559
|
"native": {}
|
|
559
560
|
}
|
package/lib/modules/bridge.js
CHANGED
|
@@ -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 =
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
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) {
|
|
@@ -17,7 +17,7 @@ class bridgeMqttClientClass {
|
|
|
17
17
|
clientId: `iobroker_${this.adapter.namespace}.bridge`,
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
// Prefix for publish and
|
|
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
|
|
@@ -34,6 +35,8 @@ class Lorawan extends utils.Adapter {
|
|
|
34
35
|
|
|
35
36
|
// Simulation variables
|
|
36
37
|
this.simulation = {};
|
|
38
|
+
this.mySystemConfig;
|
|
39
|
+
this.language;
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
onFileChange(_id, _fileName, _size) {
|
|
@@ -50,6 +53,10 @@ class Lorawan extends utils.Adapter {
|
|
|
50
53
|
// read system translation out of i18n translation
|
|
51
54
|
this.i18nTranslation = await this.geti18nTranslation();
|
|
52
55
|
|
|
56
|
+
// get systemconfig and configued language
|
|
57
|
+
this.mySystemConfig = await this.getForeignObjectAsync('system.config');
|
|
58
|
+
this.language = this.mySystemConfig?.common.language || 'en';
|
|
59
|
+
|
|
53
60
|
// create downlinkConfigs
|
|
54
61
|
this.downlinkConfighandler = new downlinkConfighandlerClass(this);
|
|
55
62
|
|
|
@@ -59,8 +66,10 @@ class Lorawan extends utils.Adapter {
|
|
|
59
66
|
// create new messagehandler
|
|
60
67
|
this.messagehandler = new messagehandlerClass(this);
|
|
61
68
|
|
|
62
|
-
// Set mqtt client
|
|
63
|
-
|
|
69
|
+
// Set mqtt client => just declare, if a url is set
|
|
70
|
+
if (this.config.BridgeipUrl !== '') {
|
|
71
|
+
this.mqttClient = new mqttClientClass(this, this.config);
|
|
72
|
+
}
|
|
64
73
|
|
|
65
74
|
// declare bridge if configed
|
|
66
75
|
if (this.config.BridgeType !== 'off') {
|
|
@@ -1224,6 +1233,57 @@ class Lorawan extends utils.Adapter {
|
|
|
1224
1233
|
} catch (error) {
|
|
1225
1234
|
this.log.error(error);
|
|
1226
1235
|
}
|
|
1236
|
+
} else if (obj.command === 'getEnums') {
|
|
1237
|
+
try {
|
|
1238
|
+
const enums = [{ label: 'No Enum selected', value: '*' }];
|
|
1239
|
+
const enumList = await this.getEnumsAsync();
|
|
1240
|
+
for (const enumtyp of Object.values(enumList)) {
|
|
1241
|
+
for (const myEnum of Object.values(enumtyp)) {
|
|
1242
|
+
const value = myEnum._id;
|
|
1243
|
+
let label = myEnum.common.name;
|
|
1244
|
+
if (typeof label !== 'string') {
|
|
1245
|
+
if (this.language) {
|
|
1246
|
+
label = myEnum.common.name[this.language];
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
label += ` (${myEnum._id.substring(5, myEnum._id.length)})`;
|
|
1250
|
+
enums.push({ label: label.toString(), value: value });
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
this.sendTo(obj.from, obj.command, enums, obj.callback);
|
|
1254
|
+
} catch (error) {
|
|
1255
|
+
this.log.error(error);
|
|
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
|
+
}
|
|
1227
1287
|
} else {
|
|
1228
1288
|
const result = { error: true, message: 'No message matched', received: obj.message };
|
|
1229
1289
|
if (obj.callback) {
|