iobroker.lorawan 1.16.12 → 1.17.1
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/admin/i18n/de/translations.json +10 -1
- package/admin/i18n/en/translations.json +10 -1
- package/admin/i18n/es/translations.json +10 -1
- package/admin/i18n/fr/translations.json +11 -2
- package/admin/i18n/it/translations.json +10 -1
- package/admin/i18n/nl/translations.json +10 -1
- package/admin/i18n/pl/translations.json +10 -1
- package/admin/i18n/pt/translations.json +11 -2
- package/admin/i18n/ru/translations.json +11 -2
- package/admin/i18n/uk/translations.json +10 -1
- package/admin/i18n/zh-cn/translations.json +10 -1
- package/admin/jsonConfig.json +152 -33
- package/io-package.json +29 -28
- package/lib/modules/bridge.js +263 -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.17.1 (2025-09-19)
|
|
27
|
+
* (BenAhrdt) Bugfix xs in jsonconfig
|
|
28
|
+
|
|
29
|
+
### 1.17.0 (2025-09-19)
|
|
30
|
+
* (BenAhrdt) Add Climate Entity configuration to foreign states
|
|
31
|
+
|
|
26
32
|
### 1.16.12 (2025-09-18)
|
|
27
33
|
* (BenAhrdt) delete devices in bridge (discover empty) after changing the device_identifier
|
|
28
34
|
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "Verbindungstest",
|
|
166
166
|
"BridgeConnectionTestTooltip": "Klicken, um einen Verbindungstest zur Bridge durchzuführen",
|
|
167
167
|
"no connection to bridge": "❌ Keine Verbindung",
|
|
168
|
-
"connection to bridge ok": "✅ Verbindung OK"
|
|
168
|
+
"connection to bridge ok": "✅ Verbindung OK",
|
|
169
|
+
"BridgeLoRaPanel": "Bridge LoRaWAN",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Einstellungen für die Lorawan Bridge",
|
|
171
|
+
"BridgeForeignPanel": "Bridge fremde States",
|
|
172
|
+
"BridgeForeignConfigHeader": "Einstellungen für fremede States",
|
|
173
|
+
"BridgeLoRaHeader": "Definition der Gerätekennung",
|
|
174
|
+
"BridgeForeignHeader": "Wählen der Bridge Enum",
|
|
175
|
+
"_BridgeEnumDiscription": "Wählen Sie eine Enumm (Kategorie) aus, die zum aktivieren der State in die Bridge verwendet wird.\nDer Name des Geräts erfolgt nach folgenden Prioritäten:\n1. Gerätename\n2. Channelname\n1. Namespace des States",
|
|
176
|
+
"ClimateForeignHeader": "Definieren Sie Zustände für eine Klima Entität",
|
|
177
|
+
"ClimateForeignInformation": "Hier können Sie ein Array von Klimaentitäten definieren"
|
|
169
178
|
}
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "connectiontest",
|
|
166
166
|
"BridgeConnectionTestTooltip": "cklick this button, to check to connection to your bridge",
|
|
167
167
|
"no connection to bridge": "❌ no connection",
|
|
168
|
-
"connection to bridge ok": "✅ connection OK"
|
|
168
|
+
"connection to bridge ok": "✅ connection OK",
|
|
169
|
+
"BridgeLoRaPanel": "Bridge LoRaWAN",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Settigs for the Lorawan Bridge",
|
|
171
|
+
"BridgeForeignPanel": "Bridge Foreign",
|
|
172
|
+
"BridgeForeignConfigHeader": "Settings for the foreign states",
|
|
173
|
+
"BridgeLoRaHeader": "Definition of deviceindetifier",
|
|
174
|
+
"BridgeForeignHeader": "Select of Bridge Enum",
|
|
175
|
+
"_BridgeEnumDiscription": "Select a Enum tha is used for setting states into Bridge.\nThe name of the device is following this priorities:\n1. Devicename\n2. Channelname\n3. Namespace of state",
|
|
176
|
+
"ClimateForeignHeader": "Define States for Climate Entity",
|
|
177
|
+
"ClimateForeignInformation": "Here you can define an array of Climate definitions"
|
|
169
178
|
}
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "ConnectionTest",
|
|
166
166
|
"BridgeConnectionTestTooltip": "Cklick este botón, para verificar la conexión a su puente",
|
|
167
167
|
"no connection to bridge": "❌ Sin conexión",
|
|
168
|
-
"connection to bridge ok": "✅ Conexión OK"
|
|
168
|
+
"connection to bridge ok": "✅ Conexión OK",
|
|
169
|
+
"BridgeLoRaPanel": "Puente Lorawan",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Settigs para el puente Lorawan",
|
|
171
|
+
"BridgeForeignPanel": "Puente extranjero",
|
|
172
|
+
"BridgeForeignConfigHeader": "Configuración para los estados extranjeros",
|
|
173
|
+
"BridgeLoRaHeader": "Definición de indicador de dispositivos",
|
|
174
|
+
"BridgeForeignHeader": "Definición de puente enum",
|
|
175
|
+
"_BridgeEnumDiscription": "Definir un enum que se usa para establecer estados en puente.\nEl nombre del dispositivo está siguiendo estas prioridades:\n1.\n2. Nombre de canal\n3. Espacio de nombres de estado",
|
|
176
|
+
"ClimateForeignHeader": "Definir estados para la entidad climática",
|
|
177
|
+
"ClimateForeignInformation": "Aquí puedes definir una variedad de definiciones climáticas"
|
|
169
178
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"confirmed": "confirmé",
|
|
34
34
|
"confirmedTooltip": "Si vous aimez envoyer le téléchargement avec le message confirmé, activez cette option",
|
|
35
35
|
"front": "valeur avant",
|
|
36
|
-
"frontTooltip": "
|
|
36
|
+
"frontTooltip": "Insérer la valeur avant, qui sera réglée sur la liaison descendante (la valeur doit être en chaîne de type hexadécimal)",
|
|
37
37
|
"end": "valeur finale",
|
|
38
38
|
"endTooltip": "Insérer la valeur finale, qui sera définie sur la liaison descendante (la valeur doit être en chaîne de type hexadécimal)",
|
|
39
39
|
"lengthInByte": "longueur d'état (octet)",
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "connexion",
|
|
166
166
|
"BridgeConnectionTestTooltip": "CKlick ce bouton, pour vérifier la connexion à votre pont",
|
|
167
167
|
"no connection to bridge": "❌ Pas de connexion",
|
|
168
|
-
"connection to bridge ok": "✅ Connexion OK"
|
|
168
|
+
"connection to bridge ok": "✅ Connexion OK",
|
|
169
|
+
"BridgeLoRaPanel": "Bridge Lorawan",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Settigs pour le pont Lorawan",
|
|
171
|
+
"BridgeForeignPanel": "Pont à l'étranger",
|
|
172
|
+
"BridgeForeignConfigHeader": "Paramètres pour les États étrangers",
|
|
173
|
+
"BridgeLoRaHeader": "Définition de l'appareil indiquant",
|
|
174
|
+
"BridgeForeignHeader": "Définition de l'énumération du pont",
|
|
175
|
+
"_BridgeEnumDiscription": "Définir une enum Tha est utilisée pour mettre les états dans le pont.\nLe nom de l'appareil suit ces priorités:\n1. Devicename\n2. ChannelName\n3. Espace de noms de l'État",
|
|
176
|
+
"ClimateForeignHeader": "Définir les États de l'entité climatique",
|
|
177
|
+
"ClimateForeignInformation": "Ici, vous pouvez définir un tableau de définitions climatiques"
|
|
169
178
|
}
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "ConnectionTest",
|
|
166
166
|
"BridgeConnectionTestTooltip": "cklick questo pulsante, per controllare la connessione al tuo ponte",
|
|
167
167
|
"no connection to bridge": "❌ Nessuna connessione",
|
|
168
|
-
"connection to bridge ok": "✅ connessione ok"
|
|
168
|
+
"connection to bridge ok": "✅ connessione ok",
|
|
169
|
+
"BridgeLoRaPanel": "Bridge Lorawan",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Settigs per il ponte di Lorawan",
|
|
171
|
+
"BridgeForeignPanel": "Ponte straniero",
|
|
172
|
+
"BridgeForeignConfigHeader": "Impostazioni per gli stati stranieri",
|
|
173
|
+
"BridgeLoRaHeader": "Definizione di DisponiveIdEtifier",
|
|
174
|
+
"BridgeForeignHeader": "Definizione Bridge Enum",
|
|
175
|
+
"_BridgeEnumDiscription": "Definire un enum tha viene utilizzato per impostare gli stati nel ponte.\nIl nome del dispositivo sta seguendo queste priorità:\n1. Devicename\n2. CANALENAME\n3. Spazio dei nomi di stato",
|
|
176
|
+
"ClimateForeignHeader": "Definire gli stati per l'entità climatica",
|
|
177
|
+
"ClimateForeignInformation": "Qui puoi definire una serie di definizioni climatiche"
|
|
169
178
|
}
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "Verbindingstest",
|
|
166
166
|
"BridgeConnectionTestTooltip": "Cklick deze knop, om te controleren op de verbinding met uw brug",
|
|
167
167
|
"no connection to bridge": "❌ Geen verbinding",
|
|
168
|
-
"connection to bridge ok": "✅ Verbinding OK"
|
|
168
|
+
"connection to bridge ok": "✅ Verbinding OK",
|
|
169
|
+
"BridgeLoRaPanel": "Bridge Lorawan",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Vestigt zich voor de Lorawan -brug",
|
|
171
|
+
"BridgeForeignPanel": "Brug buitenlands",
|
|
172
|
+
"BridgeForeignConfigHeader": "Instellingen voor de buitenlandse staten",
|
|
173
|
+
"BridgeLoRaHeader": "Definitie van apparaatIndetifier",
|
|
174
|
+
"BridgeForeignHeader": "Definitie van bridge enum",
|
|
175
|
+
"_BridgeEnumDiscription": "Definieer een enum die wordt gebruikt voor het instellen van staten in brug.\nDe naam van het apparaat volgt deze prioriteiten:\n1. Devicename\n2. ChannelName\n3. Naamruimte van de staat",
|
|
176
|
+
"ClimateForeignHeader": "Definieer staten voor klimaat entiteit",
|
|
177
|
+
"ClimateForeignInformation": "Hier kunt u een scala aan klimaatdefinities definiëren"
|
|
169
178
|
}
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "ConnectionTest",
|
|
166
166
|
"BridgeConnectionTestTooltip": "CKlick ten przycisk, aby sprawdzić połączenie z mostem",
|
|
167
167
|
"no connection to bridge": "❌ Brak połączenia",
|
|
168
|
-
"connection to bridge ok": "✅ Połączenie OK"
|
|
168
|
+
"connection to bridge ok": "✅ Połączenie OK",
|
|
169
|
+
"BridgeLoRaPanel": "Bridge Lorawan",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Setigs dla mostu Lorawan",
|
|
171
|
+
"BridgeForeignPanel": "Most zagraniczny",
|
|
172
|
+
"BridgeForeignConfigHeader": "Ustawienia dla obcych państw",
|
|
173
|
+
"BridgeLoRaHeader": "Definicja urządzenia",
|
|
174
|
+
"BridgeForeignHeader": "Definicja mostu enum",
|
|
175
|
+
"_BridgeEnumDiscription": "Zdefiniuj enum THA jest używany do ustawiania stanów na most.\nNazwa urządzenia podąża za tymi priorytetami:\n1. DeviceName\n2. Nazwa kanału\n3. Przestrzeń nazw państwa",
|
|
176
|
+
"ClimateForeignHeader": "Zdefiniuj stany dla jednostki klimatycznej",
|
|
177
|
+
"ClimateForeignInformation": "Tutaj możesz zdefiniować szereg definicji klimatycznych"
|
|
169
178
|
}
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"RefreshDiscoveryCronJobTooltip": "Insira o Cronjob para refrescar a descoberta",
|
|
132
132
|
"ClimateHeader": "Definir estados para a entidade climática",
|
|
133
133
|
"ClimateInformation": "Aqui você pode definir uma variedade de definições climáticas",
|
|
134
|
-
"ClimateNameText": "
|
|
134
|
+
"ClimateNameText": "Entityname",
|
|
135
135
|
"ClimateTargetTemperatureText": "Temperatura alvo",
|
|
136
136
|
"ClimateActTemperatureText": "Temperatura alvo",
|
|
137
137
|
"ClimateModeTemperatureText": "Modo",
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "ConnectionTest",
|
|
166
166
|
"BridgeConnectionTestTooltip": "Cklick este botão, para verificar a conexão com sua ponte",
|
|
167
167
|
"no connection to bridge": "❌ Sem conexão",
|
|
168
|
-
"connection to bridge ok": "✅ Conexão OK"
|
|
168
|
+
"connection to bridge ok": "✅ Conexão OK",
|
|
169
|
+
"BridgeLoRaPanel": "Bridge Lorawan",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Assentamentos para a ponte Lorawan",
|
|
171
|
+
"BridgeForeignPanel": "Ponte estrangeira",
|
|
172
|
+
"BridgeForeignConfigHeader": "Configurações para os estados estrangeiros",
|
|
173
|
+
"BridgeLoRaHeader": "Definição de DeviceIndetifier",
|
|
174
|
+
"BridgeForeignHeader": "Definição de Enum Bridge",
|
|
175
|
+
"_BridgeEnumDiscription": "Defina uma enumeração que é usada para definir estados em ponte.\nO nome do dispositivo está seguindo essas prioridades:\n1. DeviceName\n2. Nome do canal\n3. Namespace of State",
|
|
176
|
+
"ClimateForeignHeader": "Definir estados para a entidade climática",
|
|
177
|
+
"ClimateForeignInformation": "Aqui você pode definir uma variedade de definições climáticas"
|
|
169
178
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"confirmed": "подтвержденный",
|
|
34
34
|
"confirmedTooltip": "Если вы хотите отправить загрузку с подтвержденным сообщением, включите эту опцию",
|
|
35
35
|
"front": "фронт",
|
|
36
|
-
"frontTooltip": "Вставьте переднюю ценность,
|
|
36
|
+
"frontTooltip": "Вставьте переднюю ценность, WICH будет установлена на нисходящую линейку (значение должно быть в строке HEX - Exept Type)",
|
|
37
37
|
"end": "конечное значение",
|
|
38
38
|
"endTooltip": "Вставьте конечную стоимость, WICH будет установлена на нисходящую линию (значение должно быть в строке HEX - Exept Type)",
|
|
39
39
|
"lengthInByte": "продолжительность состояния (байт)",
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "ConnectionTest",
|
|
166
166
|
"BridgeConnectionTestTooltip": "Cklick эта кнопка, чтобы проверить подключение к мосту",
|
|
167
167
|
"no connection to bridge": "❌ Нет соединения",
|
|
168
|
-
"connection to bridge ok": "✅ Соединение ОК"
|
|
168
|
+
"connection to bridge ok": "✅ Соединение ОК",
|
|
169
|
+
"BridgeLoRaPanel": "Мост Лораван",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Поселения для моста Лоравана",
|
|
171
|
+
"BridgeForeignPanel": "Мост иностранный",
|
|
172
|
+
"BridgeForeignConfigHeader": "Настройки для иностранных государств",
|
|
173
|
+
"BridgeLoRaHeader": "Определение устройства Indetifier",
|
|
174
|
+
"BridgeForeignHeader": "Определение мостового перечисления",
|
|
175
|
+
"_BridgeEnumDiscription": "Определите enum THA, используется для положения состояний в мост.\nНазвание устройства следует этим приоритетам:\n1. DeviceName\n2. ChannelName\n3. Пространство государства имен",
|
|
176
|
+
"ClimateForeignHeader": "Определить состояния для климатической сущности",
|
|
177
|
+
"ClimateForeignInformation": "Здесь вы можете определить множество климатических определений"
|
|
169
178
|
}
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "з'єднання",
|
|
166
166
|
"BridgeConnectionTestTooltip": "cklick ця кнопка, щоб перевірити підключення до вашого мосту",
|
|
167
167
|
"no connection to bridge": "❌ Немає з'єднання",
|
|
168
|
-
"connection to bridge ok": "✅ з'єднання добре"
|
|
168
|
+
"connection to bridge ok": "✅ з'єднання добре",
|
|
169
|
+
"BridgeLoRaPanel": "Міст Лораван",
|
|
170
|
+
"BridgeLoRaConfigHeader": "Сефтиги для мосту Лораван",
|
|
171
|
+
"BridgeForeignPanel": "Міст іноземний",
|
|
172
|
+
"BridgeForeignConfigHeader": "Налаштування іноземних держав",
|
|
173
|
+
"BridgeLoRaHeader": "Визначення пристроюіндерифікатора",
|
|
174
|
+
"BridgeForeignHeader": "Визначення мосту Enum",
|
|
175
|
+
"_BridgeEnumDiscription": "Визначте Enum tha використовується для встановлення станів у міст.\nНазва пристрою виконує ці пріоритети:\n1.\n2.\n3. Державний простір імен",
|
|
176
|
+
"ClimateForeignHeader": "Визначте стани клімату",
|
|
177
|
+
"ClimateForeignInformation": "Тут ви можете визначити безліч визначення клімату"
|
|
169
178
|
}
|
|
@@ -165,5 +165,14 @@
|
|
|
165
165
|
"BridgeConnectionTest": "连接测试",
|
|
166
166
|
"BridgeConnectionTestTooltip": "cklick此按钮,检查连接到您的桥梁",
|
|
167
167
|
"no connection to bridge": "❌没有连接",
|
|
168
|
-
"connection to bridge ok": "✅连接确定"
|
|
168
|
+
"connection to bridge ok": "✅连接确定",
|
|
169
|
+
"BridgeLoRaPanel": "桥梁洛万",
|
|
170
|
+
"BridgeLoRaConfigHeader": "洛万桥的索位",
|
|
171
|
+
"BridgeForeignPanel": "外国桥梁",
|
|
172
|
+
"BridgeForeignConfigHeader": "外国的设置",
|
|
173
|
+
"BridgeLoRaHeader": "设备Indetifier的定义",
|
|
174
|
+
"BridgeForeignHeader": "桥梁枚举的定义",
|
|
175
|
+
"_BridgeEnumDiscription": "定义枚举用于将状态设置为桥梁。\n该设备的名称遵循此优先级:\n1。devicename\n2。频道名称\n3。状态名称空间",
|
|
176
|
+
"ClimateForeignHeader": "定义气候实体的国家",
|
|
177
|
+
"ClimateForeignInformation": "在这里您可以定义一系列气候定义"
|
|
169
178
|
}
|
package/admin/jsonConfig.json
CHANGED
|
@@ -784,20 +784,6 @@
|
|
|
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
|
-
},
|
|
801
787
|
"BridgenotificationActivation":{
|
|
802
788
|
"newLine": true,
|
|
803
789
|
"type": "select",
|
|
@@ -946,7 +932,7 @@
|
|
|
946
932
|
"_Sparepart":{
|
|
947
933
|
"type": "staticText",
|
|
948
934
|
"label": "",
|
|
949
|
-
"xs":
|
|
935
|
+
"xs": 12,
|
|
950
936
|
"sm": 1,
|
|
951
937
|
"md": 1,
|
|
952
938
|
"lg": 1,
|
|
@@ -966,11 +952,28 @@
|
|
|
966
952
|
"md": 3,
|
|
967
953
|
"lg": 3,
|
|
968
954
|
"xl": 3
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
"_BridgeLoRaPanel":{
|
|
959
|
+
"type": "panel",
|
|
960
|
+
"label": "BridgeLoRaPanel",
|
|
961
|
+
"hidden": "data.BridgeType === 'off'",
|
|
962
|
+
"items": {
|
|
963
|
+
"_BridgeLoRaConfigHeader":{
|
|
964
|
+
"newLine": true,
|
|
965
|
+
"type": "header",
|
|
966
|
+
"text": "BridgeLoRaHeader",
|
|
967
|
+
"size": 3,
|
|
968
|
+
"xs": 12,
|
|
969
|
+
"sm": 12,
|
|
970
|
+
"md": 12,
|
|
971
|
+
"lg": 12,
|
|
972
|
+
"xl": 12
|
|
969
973
|
},
|
|
970
974
|
"_DeviceIdentifierDiscription":{
|
|
971
975
|
"newLine":true,
|
|
972
976
|
"type": "staticText",
|
|
973
|
-
"hidden": "data.BridgeType === 'off'",
|
|
974
977
|
"label": "_DeviceIdentifierDiscription",
|
|
975
978
|
"xs": 12,
|
|
976
979
|
"sm": 12,
|
|
@@ -980,7 +983,6 @@
|
|
|
980
983
|
},
|
|
981
984
|
"DeviceIdentifiers":{
|
|
982
985
|
"newLine": true,
|
|
983
|
-
"hidden": "data.BridgeType === 'off'",
|
|
984
986
|
"type":"accordion",
|
|
985
987
|
"titleAttr": "DeviceIdentifier",
|
|
986
988
|
"clone": true,
|
|
@@ -1014,7 +1016,6 @@
|
|
|
1014
1016
|
},
|
|
1015
1017
|
"separator":{
|
|
1016
1018
|
"newLine": true,
|
|
1017
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1018
1019
|
"type": "select",
|
|
1019
1020
|
"label": "separator",
|
|
1020
1021
|
"tooltip": "separatorTooltip",
|
|
@@ -1033,7 +1034,6 @@
|
|
|
1033
1034
|
},
|
|
1034
1035
|
"_spare1":{
|
|
1035
1036
|
"type": "staticText",
|
|
1036
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1037
1037
|
"label": "",
|
|
1038
1038
|
"xs": 12,
|
|
1039
1039
|
"sm": 1,
|
|
@@ -1043,7 +1043,6 @@
|
|
|
1043
1043
|
},
|
|
1044
1044
|
"_DeviceIdentifierConfiguredDiscription":{
|
|
1045
1045
|
"type": "staticText",
|
|
1046
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1047
1046
|
"label": "_DeviceIdentifierConfiguredDiscription",
|
|
1048
1047
|
"style": {"font-size":"16px", "font-weight":"bold"},
|
|
1049
1048
|
"xs": 12,
|
|
@@ -1054,7 +1053,6 @@
|
|
|
1054
1053
|
},
|
|
1055
1054
|
"_DeviceIdentifierConfigured":{
|
|
1056
1055
|
"type": "textSendTo",
|
|
1057
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1058
1056
|
"style": {"font-size":"16px", "font-weight":"bold", "color":"blue"},
|
|
1059
1057
|
"jsonData": "{\"DeviceIdentifiers\":${JSON.stringify(data.DeviceIdentifiers)},\"separator\":\"${data.separator}\"}",
|
|
1060
1058
|
"command": "getTopicConfigured",
|
|
@@ -1071,7 +1069,6 @@
|
|
|
1071
1069
|
"_spare2":{
|
|
1072
1070
|
"newLine": true,
|
|
1073
1071
|
"type": "staticText",
|
|
1074
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1075
1072
|
"label": "",
|
|
1076
1073
|
"xs": 12,
|
|
1077
1074
|
"sm": 3,
|
|
@@ -1081,7 +1078,6 @@
|
|
|
1081
1078
|
},
|
|
1082
1079
|
"_DeviceIdentifierExampleDiscription":{
|
|
1083
1080
|
"type": "staticText",
|
|
1084
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1085
1081
|
"label": "_DeviceIdentifierExampleDiscription",
|
|
1086
1082
|
"style": {"font-size":"16px", "font-weight":"bold"},
|
|
1087
1083
|
"xs": 12,
|
|
@@ -1092,7 +1088,6 @@
|
|
|
1092
1088
|
},
|
|
1093
1089
|
"_DeviceIdentifierExample":{
|
|
1094
1090
|
"type": "textSendTo",
|
|
1095
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1096
1091
|
"style": {"font-size":"16px", "font-weight":"bold", "color":"blue"},
|
|
1097
1092
|
"jsonData": "{\"DeviceIdentifiers\":${JSON.stringify(data.DeviceIdentifiers)},\"separator\":\"${data.separator}\"}",
|
|
1098
1093
|
"command": "getTopicExample",
|
|
@@ -1108,7 +1103,6 @@
|
|
|
1108
1103
|
},
|
|
1109
1104
|
"_BridgeStateHeader":{
|
|
1110
1105
|
"newLine": true,
|
|
1111
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1112
1106
|
"type": "header",
|
|
1113
1107
|
"text": "BridgeStateHeader",
|
|
1114
1108
|
"size": 3,
|
|
@@ -1120,7 +1114,6 @@
|
|
|
1120
1114
|
},
|
|
1121
1115
|
"_BridgeStateInformation":{
|
|
1122
1116
|
"newLine":true,
|
|
1123
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1124
1117
|
"type": "staticText",
|
|
1125
1118
|
"label": "BridgeStateInformation",
|
|
1126
1119
|
"xs": 12,
|
|
@@ -1131,7 +1124,6 @@
|
|
|
1131
1124
|
},
|
|
1132
1125
|
"BridgeStateConfig":{
|
|
1133
1126
|
"newLine": true,
|
|
1134
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1135
1127
|
"type":"table",
|
|
1136
1128
|
"allowAddByFilter": true,
|
|
1137
1129
|
"clone": true,
|
|
@@ -1214,7 +1206,6 @@
|
|
|
1214
1206
|
},
|
|
1215
1207
|
"_ClimateHeader":{
|
|
1216
1208
|
"newLine": true,
|
|
1217
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1218
1209
|
"type": "header",
|
|
1219
1210
|
"text": "ClimateHeader",
|
|
1220
1211
|
"size": 3,
|
|
@@ -1226,7 +1217,6 @@
|
|
|
1226
1217
|
},
|
|
1227
1218
|
"_ClimateInformation":{
|
|
1228
1219
|
"newLine":true,
|
|
1229
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1230
1220
|
"type": "staticText",
|
|
1231
1221
|
"label": "ClimateInformation",
|
|
1232
1222
|
"xs": 12,
|
|
@@ -1237,7 +1227,6 @@
|
|
|
1237
1227
|
},
|
|
1238
1228
|
"ClimateConfig":{
|
|
1239
1229
|
"newLine": true,
|
|
1240
|
-
"hidden": "data.BridgeType === 'off'",
|
|
1241
1230
|
"type":"accordion",
|
|
1242
1231
|
"titleAttr": "ClimateName",
|
|
1243
1232
|
"clone": true,
|
|
@@ -1251,6 +1240,9 @@
|
|
|
1251
1240
|
"type": "text",
|
|
1252
1241
|
"attr": "ClimateName",
|
|
1253
1242
|
"label": "ClimateNameText",
|
|
1243
|
+
"validator": "if(data.ClimateName === ''){return false;}else{return true;}",
|
|
1244
|
+
"validatorNoSaveOnError": true,
|
|
1245
|
+
"default": "Climate Name",
|
|
1254
1246
|
"xs": 12,
|
|
1255
1247
|
"sm": 4,
|
|
1256
1248
|
"md": 4,
|
|
@@ -1435,7 +1427,6 @@
|
|
|
1435
1427
|
"default": "*",
|
|
1436
1428
|
"jsonData": "{\"application\":\"${data.ModeApplication}\"}",
|
|
1437
1429
|
"command": "getDevicesForClimateConfig",
|
|
1438
|
-
"hidden": "data.ModeApplication === 'NotPresent'",
|
|
1439
1430
|
"alsoDependsOn":[
|
|
1440
1431
|
"ModeApplication"
|
|
1441
1432
|
],
|
|
@@ -1453,7 +1444,6 @@
|
|
|
1453
1444
|
"options": [
|
|
1454
1445
|
{"label":"uplink.decoded","value":"uplink.decoded"}
|
|
1455
1446
|
],
|
|
1456
|
-
"hidden": "data.ModeApplication === 'NotPresent'",
|
|
1457
1447
|
"xs": 12,
|
|
1458
1448
|
"sm": 2,
|
|
1459
1449
|
"md": 2,
|
|
@@ -1473,7 +1463,136 @@
|
|
|
1473
1463
|
"ModeDevice",
|
|
1474
1464
|
"ModeFolder"
|
|
1475
1465
|
],
|
|
1476
|
-
"
|
|
1466
|
+
"xs": 12,
|
|
1467
|
+
"sm": 4,
|
|
1468
|
+
"md": 4,
|
|
1469
|
+
"lg": 4,
|
|
1470
|
+
"xl": 4
|
|
1471
|
+
}
|
|
1472
|
+
]
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
"_BridgeForeignPanel":{
|
|
1477
|
+
"type": "panel",
|
|
1478
|
+
"label": "BridgeForeignPanel",
|
|
1479
|
+
"hidden": "data.BridgeType === 'off'",
|
|
1480
|
+
"items": {
|
|
1481
|
+
"_BridgeForeignConfigHeader":{
|
|
1482
|
+
"newLine": true,
|
|
1483
|
+
"type": "header",
|
|
1484
|
+
"text": "BridgeForeignHeader",
|
|
1485
|
+
"size": 3,
|
|
1486
|
+
"xs": 12,
|
|
1487
|
+
"sm": 12,
|
|
1488
|
+
"md": 12,
|
|
1489
|
+
"lg": 12,
|
|
1490
|
+
"xl": 12
|
|
1491
|
+
},
|
|
1492
|
+
"_BridgeEnumDiscription":{
|
|
1493
|
+
"newLine":true,
|
|
1494
|
+
"type": "staticText",
|
|
1495
|
+
"label": "_BridgeEnumDiscription",
|
|
1496
|
+
"xs": 12,
|
|
1497
|
+
"sm": 12,
|
|
1498
|
+
"md": 12,
|
|
1499
|
+
"lg": 12,
|
|
1500
|
+
"xl": 12
|
|
1501
|
+
},
|
|
1502
|
+
"BridgeEnum": {
|
|
1503
|
+
"newLine": true,
|
|
1504
|
+
"type": "selectSendTo",
|
|
1505
|
+
"label": "BridgeEnum",
|
|
1506
|
+
"tooltip": "BridgeEnumTooltip",
|
|
1507
|
+
"default": "",
|
|
1508
|
+
"jsonData": "{}",
|
|
1509
|
+
"command": "getEnums",
|
|
1510
|
+
"xs": 12,
|
|
1511
|
+
"sm": 5,
|
|
1512
|
+
"md": 5,
|
|
1513
|
+
"lg": 5,
|
|
1514
|
+
"xl": 5
|
|
1515
|
+
},
|
|
1516
|
+
"_ClimateForeignHeader":{
|
|
1517
|
+
"newLine": true,
|
|
1518
|
+
"type": "header",
|
|
1519
|
+
"text": "ClimateForeignHeader",
|
|
1520
|
+
"size": 3,
|
|
1521
|
+
"xs": 12,
|
|
1522
|
+
"sm": 12,
|
|
1523
|
+
"md": 12,
|
|
1524
|
+
"lg": 12,
|
|
1525
|
+
"xl": 12
|
|
1526
|
+
},
|
|
1527
|
+
"_ClimateForeignInformation":{
|
|
1528
|
+
"newLine":true,
|
|
1529
|
+
"type": "staticText",
|
|
1530
|
+
"label": "ClimateForeignInformation",
|
|
1531
|
+
"xs": 12,
|
|
1532
|
+
"sm": 12,
|
|
1533
|
+
"md": 12,
|
|
1534
|
+
"lg": 12,
|
|
1535
|
+
"xl": 12
|
|
1536
|
+
},
|
|
1537
|
+
"ClimateForeignConfig":{
|
|
1538
|
+
"newLine": true,
|
|
1539
|
+
"type":"accordion",
|
|
1540
|
+
"titleAttr": "ClimateName",
|
|
1541
|
+
"clone": true,
|
|
1542
|
+
"xs": 12,
|
|
1543
|
+
"sm": 12,
|
|
1544
|
+
"md": 12,
|
|
1545
|
+
"lg": 12,
|
|
1546
|
+
"xl": 12,
|
|
1547
|
+
"items":[
|
|
1548
|
+
{
|
|
1549
|
+
"type": "text",
|
|
1550
|
+
"attr": "ClimateName",
|
|
1551
|
+
"label": "ClimateNameText",
|
|
1552
|
+
"validator": "if(data.ClimateName === ''){return false;}else{return true;}",
|
|
1553
|
+
"validatorNoSaveOnError": true,
|
|
1554
|
+
"default": "Climate Name",
|
|
1555
|
+
"xs": 12,
|
|
1556
|
+
"sm": 4,
|
|
1557
|
+
"md": 4,
|
|
1558
|
+
"lg": 4,
|
|
1559
|
+
"xl": 4
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
"newLine": true,
|
|
1563
|
+
"type": "staticText",
|
|
1564
|
+
"attr": "_statciTextTarget",
|
|
1565
|
+
"label": "ClimateTargetTemperatureText",
|
|
1566
|
+
"xs": 12,
|
|
1567
|
+
"sm": 12,
|
|
1568
|
+
"md": 12,
|
|
1569
|
+
"lg": 12,
|
|
1570
|
+
"xl": 12
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
"type": "objectId",
|
|
1574
|
+
"attr": "TargetId",
|
|
1575
|
+
"label": "TargetId",
|
|
1576
|
+
"xs": 12,
|
|
1577
|
+
"sm": 4,
|
|
1578
|
+
"md": 4,
|
|
1579
|
+
"lg": 4,
|
|
1580
|
+
"xl": 4
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
"type": "objectId",
|
|
1584
|
+
"attr": "ActId",
|
|
1585
|
+
"label": "ActId",
|
|
1586
|
+
"xs": 12,
|
|
1587
|
+
"sm": 4,
|
|
1588
|
+
"md": 4,
|
|
1589
|
+
"lg": 4,
|
|
1590
|
+
"xl": 4
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"type": "objectId",
|
|
1594
|
+
"attr": "ModeId",
|
|
1595
|
+
"label": "ModeId",
|
|
1477
1596
|
"xs": 12,
|
|
1478
1597
|
"sm": 4,
|
|
1479
1598
|
"md": 4,
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.17.1",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.17.1": {
|
|
7
|
+
"en": "Bugfix xs in jsonconfig",
|
|
8
|
+
"de": "Fehlerbehebung bei xs in jsonconfig",
|
|
9
|
+
"ru": "Исправлена ошибка xs в jsonconfig",
|
|
10
|
+
"pt": "Correção de bug xs no jsonconfig",
|
|
11
|
+
"nl": "Bugfix xs in jsonconfig",
|
|
12
|
+
"fr": "Correction de bug xs dans jsonconfig",
|
|
13
|
+
"it": "Corretto bug xs in jsonconfig",
|
|
14
|
+
"es": "Corrección de error xs en jsonconfig",
|
|
15
|
+
"pl": "Poprawiony błąd xs w jsonconfig",
|
|
16
|
+
"uk": "Виправлено помилку xs в jsonconfig",
|
|
17
|
+
"zh-cn": "修复jsonconfig中的xs bug"
|
|
18
|
+
},
|
|
19
|
+
"1.17.0": {
|
|
20
|
+
"en": "Add Climate Entity configuration to foreign states",
|
|
21
|
+
"de": "Fügen Sie die Konfiguration der Klima-Entität für externe Zustände hinzu",
|
|
22
|
+
"ru": "Добавлена конфигурация Climate Entity для внешних состояний",
|
|
23
|
+
"pt": "Adicionar configuração da entidade climática para estados estrangeiros",
|
|
24
|
+
"nl": "Voeg configuratie toe voor Klimaat Entiteit voor externe staten",
|
|
25
|
+
"fr": "Ajouter la configuration de l'entité de climatisation pour les états étrangers",
|
|
26
|
+
"it": "Aggiunta configurazione dell'entità Clima agli stati stranieri",
|
|
27
|
+
"es": "Agregar configuración de entidad de clima para estados extranjeros",
|
|
28
|
+
"pl": "Dodaj konfigurację encji klimatycznych do stanów obcych.",
|
|
29
|
+
"uk": "Додати конфігурацію сутності клімату до зовнішніх станів.",
|
|
30
|
+
"zh-cn": "将\"Climate Entity\"配置添加到外部状态。"
|
|
31
|
+
},
|
|
6
32
|
"1.16.12": {
|
|
7
33
|
"en": "delete devices in bridge (discover empty) after changing the device_identifier",
|
|
8
34
|
"de": "Löschen Sie Geräte in der Brücke (entdecken leer), nachdem die Gerätekennung geändert wurde.",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Przynieś wybór enum w konfiguracji",
|
|
68
94
|
"uk": "Додано вибір типу даних \"enum\" в налаштуваннях (config).",
|
|
69
95
|
"zh-cn": "在配置中添加枚举选择"
|
|
70
|
-
},
|
|
71
|
-
"1.16.7": {
|
|
72
|
-
"en": "Bugfix deleting discovered devices\nbuild in devug logging to find bug in devicename",
|
|
73
|
-
"de": "Fehlerbehebung beim Löschen entdeckter Geräte\nFüge Debug-Logging hinzu, um Fehler im Gerätenamen zu finden.",
|
|
74
|
-
"ru": "Исправлена ошибка удаления обнаруженных устройств.\nДобавлена отладочная запись для поиска ошибок в имени устройства.",
|
|
75
|
-
"pt": "Correção de bug ao excluir dispositivos descobertos\nAdicionar registro de depuração para encontrar bugs no nome do dispositivo",
|
|
76
|
-
"nl": "Bugfix voor het verwijderen van ontdekte apparaten\nBouw debug logging in om bugs in apparaatnaam te vinden",
|
|
77
|
-
"fr": "Correction de bug suppression des périphériques découverts\nIntégration du journal de débogage pour trouver des bugs dans le nom du périphérique",
|
|
78
|
-
"it": "Correzione bug eliminazione dispositivi scoperti\nImplementare il logging di debug per trovare bug nel nome del dispositivo",
|
|
79
|
-
"es": "Corrección de errores al eliminar dispositivos descubiertos.\nImplementación de registro de depuración para encontrar errores en el nombre del dispositivo",
|
|
80
|
-
"pl": "Naprawiono błąd usuwania odkrytych urządzeń.\nZaimplementowano logowanie debugowania w celu znalezienia błędu w nazwie urządzenia.",
|
|
81
|
-
"uk": "Виправлено помилку видалення виявлених пристроїв.\nВбудоване відлагодження для пошуку помилки в імені пристрою.",
|
|
82
|
-
"zh-cn": "修复删除已发现设备时出现的问题\n构建调试日志以查找设备名称中的错误"
|
|
83
|
-
},
|
|
84
|
-
"1.16.6": {
|
|
85
|
-
"en": "Change detection of new Discovery from LoRaWAN devices",
|
|
86
|
-
"de": "Änderung der Erkennung neuer Entdeckungen von LoRaWAN-Geräten",
|
|
87
|
-
"ru": "Обнаружение изменений новых устройств LoRaWAN",
|
|
88
|
-
"pt": "Detecção de novos dispositivos LoRaWAN na Descoberta",
|
|
89
|
-
"nl": "Wijziging in detectie van nieuwe Discovery van LoRaWAN apparaten",
|
|
90
|
-
"fr": "Détection des nouvelles découvertes des dispositifs LoRaWAN",
|
|
91
|
-
"it": "Rilevamento delle nuove scoperte dei dispositivi LoRaWAN",
|
|
92
|
-
"es": "Detección de cambios de nuevos dispositivos de descubrimiento de LoRaWAN",
|
|
93
|
-
"pl": "Wykrywanie zmian w nowym Discovery urządzeń LoRaWAN",
|
|
94
|
-
"uk": "Виявлення нових пристроїв Discovery з LoRaWAN",
|
|
95
|
-
"zh-cn": "更改LoRaWAN设备的新发现检测"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -456,7 +456,8 @@
|
|
|
456
456
|
"exclude": false
|
|
457
457
|
}
|
|
458
458
|
],
|
|
459
|
-
"ClimateConfig": []
|
|
459
|
+
"ClimateConfig": [],
|
|
460
|
+
"ClimateForeignConfig": []
|
|
460
461
|
},
|
|
461
462
|
"objects": [],
|
|
462
463
|
"instanceObjects": [
|
package/lib/modules/bridge.js
CHANGED
|
@@ -661,9 +661,12 @@ class bridgeClass {
|
|
|
661
661
|
},
|
|
662
662
|
},
|
|
663
663
|
});
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
664
|
+
// Delay for publish new entity
|
|
665
|
+
setTimeout(async () => {
|
|
666
|
+
await this.publishId(config.climateIds.target, undefined, {});
|
|
667
|
+
await this.publishId(config.climateIds.act, undefined, {});
|
|
668
|
+
await this.publishId(config.climateIds.mode, modeval, {});
|
|
669
|
+
}, 1000);
|
|
667
670
|
}
|
|
668
671
|
}
|
|
669
672
|
} catch (error) {
|
|
@@ -764,7 +767,7 @@ class bridgeClass {
|
|
|
764
767
|
try {
|
|
765
768
|
if (this.PublishedIds[id]) {
|
|
766
769
|
if (val === undefined) {
|
|
767
|
-
const State = await this.adapter.
|
|
770
|
+
const State = await this.adapter.getForeignStateAsync(id);
|
|
768
771
|
if (State) {
|
|
769
772
|
val = State.val;
|
|
770
773
|
}
|
|
@@ -1493,6 +1496,7 @@ class bridgeClass {
|
|
|
1493
1496
|
await this.discoverClimate();
|
|
1494
1497
|
await this.discoverGeneralNotification();
|
|
1495
1498
|
await this.getForeignStatesForStandardEntities();
|
|
1499
|
+
await this.getForeignClimateConfig();
|
|
1496
1500
|
await this.checkDiscoveries();
|
|
1497
1501
|
} catch (error) {
|
|
1498
1502
|
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
@@ -1574,6 +1578,232 @@ class bridgeClass {
|
|
|
1574
1578
|
/*****************************************************************
|
|
1575
1579
|
* *********************** Foreign functions *********************
|
|
1576
1580
|
* **************************************************************/
|
|
1581
|
+
/**
|
|
1582
|
+
* get Foreign states for Bridge
|
|
1583
|
+
*/
|
|
1584
|
+
async getForeignClimateConfig() {
|
|
1585
|
+
const activeFunction = 'bridge.js - getForeignClimateEntities';
|
|
1586
|
+
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
1587
|
+
try {
|
|
1588
|
+
for (const config of this.adapter.config.ClimateForeignConfig) {
|
|
1589
|
+
await this.discoverForeignClimate(config);
|
|
1590
|
+
}
|
|
1591
|
+
} catch (error) {
|
|
1592
|
+
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
* get Foreign states for Bridge
|
|
1598
|
+
*
|
|
1599
|
+
* @param config config of the climate entity
|
|
1600
|
+
*/
|
|
1601
|
+
async discoverForeignClimate(config) {
|
|
1602
|
+
const activeFunction = 'bridge.js - discoverForeignClimateEntities';
|
|
1603
|
+
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
1604
|
+
try {
|
|
1605
|
+
// Assign the Ids (use the codenameing of discoverClimate)
|
|
1606
|
+
if (!(await this.generateClimateIds(config))) {
|
|
1607
|
+
this.adapter.log.warn(
|
|
1608
|
+
`The Foreign Climate config is not complete, or has error(s): ${config.ClimateName}`,
|
|
1609
|
+
);
|
|
1610
|
+
return;
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
// Target
|
|
1614
|
+
const target = {};
|
|
1615
|
+
target.changeInfo = await this.adapter.getChangeInfo(config.climateIds.target);
|
|
1616
|
+
target.DeviceIdentifier = (await this.getParentNameing(config.climateIds.target))?.parentName;
|
|
1617
|
+
target.normalizedDeficeIdentifier = this.normalizeString(target.DeviceIdentifier);
|
|
1618
|
+
target.Topic =
|
|
1619
|
+
`${this.bridgeMqttClient.BridgePrefix}${target.normalizedDeficeIdentifier}/${target.changeInfo.changedState}`.toLowerCase();
|
|
1620
|
+
|
|
1621
|
+
//Min und Max holen
|
|
1622
|
+
const targetObject = await this.adapter.getForeignObjectAsync(config.climateIds.target);
|
|
1623
|
+
if (targetObject.common.min) {
|
|
1624
|
+
target.min = targetObject.common.min;
|
|
1625
|
+
}
|
|
1626
|
+
if (targetObject.common.max) {
|
|
1627
|
+
target.max = targetObject.common.max;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
// Act
|
|
1631
|
+
const act = {};
|
|
1632
|
+
act.changeInfo = await this.adapter.getChangeInfo(config.climateIds.act);
|
|
1633
|
+
act.DeviceIdentifier = (await this.getParentNameing(config.climateIds.act))?.parentName;
|
|
1634
|
+
act.normalizedDeficeIndetifier = this.normalizeString(act.DeviceIdentifier);
|
|
1635
|
+
act.Topic =
|
|
1636
|
+
`${this.bridgeMqttClient.BridgePrefix}${act.normalizedDeficeIndetifier}/${act.changeInfo.changedState}`.toLowerCase();
|
|
1637
|
+
|
|
1638
|
+
// Mode
|
|
1639
|
+
const mode = {};
|
|
1640
|
+
mode.changeInfo = await this.adapter.getChangeInfo(config.climateIds.mode);
|
|
1641
|
+
mode.DeviceIdentifier = (await this.getParentNameing(config.climateIds.mode))?.parentName;
|
|
1642
|
+
mode.normalizedDeviceIdentifier = this.normalizeString(mode.DeviceIdentifier);
|
|
1643
|
+
mode.Topic =
|
|
1644
|
+
`${this.bridgeMqttClient.BridgePrefix}${mode.normalizedDeviceIdentifier}/${mode.changeInfo.changedState}`.toLowerCase();
|
|
1645
|
+
|
|
1646
|
+
const normalizedClimateName = this.normalizeString(config.ClimateName);
|
|
1647
|
+
const DiscoveryTopic =
|
|
1648
|
+
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${target.normalizedDeficeIdentifier}/${normalizedClimateName}/config`.toLowerCase();
|
|
1649
|
+
const indexLastDotTarget = config.climateIds.target.lastIndexOf('.');
|
|
1650
|
+
const Id = config.climateIds.target.substring(0, indexLastDotTarget) + this.EndingVirtualClimate;
|
|
1651
|
+
const DiscoveryPayload = {
|
|
1652
|
+
name: config.ClimateName,
|
|
1653
|
+
unique_id: `${target.normalizedDeficeIdentifier}_${normalizedClimateName}`.toLowerCase(),
|
|
1654
|
+
device: {
|
|
1655
|
+
identifiers: [target.normalizedDeficeIdentifier.toLowerCase()],
|
|
1656
|
+
name: target.DeviceIdentifier,
|
|
1657
|
+
},
|
|
1658
|
+
mode_state_topic: `${mode.Topic}${this.EndingState}`,
|
|
1659
|
+
mode_command_topic: `${mode.Topic}${this.EndingSet}`,
|
|
1660
|
+
temperature_state_topic: `${target.Topic}${this.EndingState}`,
|
|
1661
|
+
temperature_command_topic: `${target.Topic}${this.EndingSet}`,
|
|
1662
|
+
current_temperature_topic: `${act.Topic}${this.EndingState}`,
|
|
1663
|
+
min_temp: target.min ? target.min : 0,
|
|
1664
|
+
max_temp: target.max ? target.max : 40,
|
|
1665
|
+
modes: ['auto', 'heat', 'off'],
|
|
1666
|
+
precision: 0.1,
|
|
1667
|
+
temp_step: 0.1,
|
|
1668
|
+
};
|
|
1669
|
+
|
|
1670
|
+
// Assign Subscribed Topics
|
|
1671
|
+
// Target
|
|
1672
|
+
this.assignTopicStructure(
|
|
1673
|
+
this.SubscribedTopics,
|
|
1674
|
+
`${target.Topic}${this.EndingSet}`,
|
|
1675
|
+
{
|
|
1676
|
+
deviceId: target.DeviceIdentifier,
|
|
1677
|
+
},
|
|
1678
|
+
DiscoveryTopic,
|
|
1679
|
+
DiscoveryPayload,
|
|
1680
|
+
config.climateIds.target,
|
|
1681
|
+
);
|
|
1682
|
+
|
|
1683
|
+
// Mode
|
|
1684
|
+
this.assignTopicStructure(
|
|
1685
|
+
this.SubscribedTopics,
|
|
1686
|
+
`${mode.Topic}${this.EndingSet}`,
|
|
1687
|
+
{
|
|
1688
|
+
deviceId: mode.DeviceIdentifier,
|
|
1689
|
+
},
|
|
1690
|
+
DiscoveryTopic,
|
|
1691
|
+
DiscoveryPayload,
|
|
1692
|
+
config.climateIds.mode,
|
|
1693
|
+
);
|
|
1694
|
+
|
|
1695
|
+
// Assign published Topics
|
|
1696
|
+
// Target
|
|
1697
|
+
this.assignIdStructure(
|
|
1698
|
+
this.PublishedIds,
|
|
1699
|
+
config.climateIds.target,
|
|
1700
|
+
{
|
|
1701
|
+
deviceId: target.DeviceIdentifier,
|
|
1702
|
+
},
|
|
1703
|
+
DiscoveryTopic,
|
|
1704
|
+
DiscoveryPayload,
|
|
1705
|
+
`${target.Topic}${this.EndingState}`,
|
|
1706
|
+
);
|
|
1707
|
+
|
|
1708
|
+
// Act
|
|
1709
|
+
this.assignIdStructure(
|
|
1710
|
+
this.PublishedIds,
|
|
1711
|
+
config.climateIds.act,
|
|
1712
|
+
{
|
|
1713
|
+
deviceId: act.DeviceIdentifier,
|
|
1714
|
+
},
|
|
1715
|
+
DiscoveryTopic,
|
|
1716
|
+
DiscoveryPayload,
|
|
1717
|
+
`${act.Topic}${this.EndingState}`,
|
|
1718
|
+
);
|
|
1719
|
+
|
|
1720
|
+
// Mode
|
|
1721
|
+
this.assignIdStructure(
|
|
1722
|
+
this.PublishedIds,
|
|
1723
|
+
config.climateIds.mode,
|
|
1724
|
+
{
|
|
1725
|
+
deviceId: mode.DeviceIdentifier,
|
|
1726
|
+
},
|
|
1727
|
+
DiscoveryTopic,
|
|
1728
|
+
DiscoveryPayload,
|
|
1729
|
+
`${mode.Topic}${this.EndingState}`,
|
|
1730
|
+
);
|
|
1731
|
+
|
|
1732
|
+
// State to publish for Mode
|
|
1733
|
+
let modeval = undefined;
|
|
1734
|
+
if (config.climateIds.mode.endsWith(this.EndingVirtualMode)) {
|
|
1735
|
+
modeval = 'auto';
|
|
1736
|
+
}
|
|
1737
|
+
// Publishing the discover message
|
|
1738
|
+
await this.publishDiscovery(Id, {
|
|
1739
|
+
topic: DiscoveryTopic,
|
|
1740
|
+
payload: structuredClone(DiscoveryPayload),
|
|
1741
|
+
informations: {
|
|
1742
|
+
target: {
|
|
1743
|
+
deviceId: target.DeviceIdentifier,
|
|
1744
|
+
},
|
|
1745
|
+
act: {
|
|
1746
|
+
deviceId: act.DeviceIdentifier,
|
|
1747
|
+
},
|
|
1748
|
+
mode: {
|
|
1749
|
+
deviceId: mode.DeviceIdentifier,
|
|
1750
|
+
},
|
|
1751
|
+
},
|
|
1752
|
+
});
|
|
1753
|
+
// Delay for publish new entity
|
|
1754
|
+
setTimeout(async () => {
|
|
1755
|
+
await this.publishId(config.climateIds.target, undefined, {});
|
|
1756
|
+
await this.publishId(config.climateIds.act, undefined, {});
|
|
1757
|
+
await this.publishId(config.climateIds.mode, modeval, {});
|
|
1758
|
+
// Subscribe state for onStatechange mathode
|
|
1759
|
+
await this.adapter.subscribeForeignStatesAsync(config.climateIds.target);
|
|
1760
|
+
await this.adapter.subscribeForeignStatesAsync(config.climateIds.act);
|
|
1761
|
+
await this.adapter.subscribeForeignStatesAsync(config.climateIds.mode);
|
|
1762
|
+
}, 1000);
|
|
1763
|
+
} catch (error) {
|
|
1764
|
+
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/*********************************************************************
|
|
1769
|
+
* ****************** generate Climate Ids ***************************
|
|
1770
|
+
* ******************************************************************/
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* @param config Configuration of the climate entity, wich is to genereate
|
|
1774
|
+
*/
|
|
1775
|
+
async generateForeignClimateIds(config) {
|
|
1776
|
+
const activeFunction = 'generateForeignClimateIds';
|
|
1777
|
+
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
1778
|
+
try {
|
|
1779
|
+
const climateIds = { target: '', act: '', mode: '' };
|
|
1780
|
+
climateIds.target = config.TargetId;
|
|
1781
|
+
climateIds.act = config.ActId;
|
|
1782
|
+
climateIds.mode = config.ModeId;
|
|
1783
|
+
/*if (config.ModeApplication === 'NotPresent') {
|
|
1784
|
+
climateIds.mode = `${this.adapter.namespace}.${config.TargetApplication}.devices.${config.TargetDevice}.${config.TargetFolder}${this.EndingVirtualMode}`;
|
|
1785
|
+
} else {
|
|
1786
|
+
climateIds.mode = `${this.adapter.namespace}.${config.ModeApplication}.devices.${config.ModeDevice}.${config.ModeFolder}.${config.ModeState}`;
|
|
1787
|
+
}*/
|
|
1788
|
+
for (const id of Object.values(climateIds)) {
|
|
1789
|
+
if (!(await this.adapter.objectExists(id)) && !id.endsWith(this.EndingVirtualMode)) {
|
|
1790
|
+
return false;
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
if (config.ClimateName === '') {
|
|
1794
|
+
return false;
|
|
1795
|
+
}
|
|
1796
|
+
const indexOfSpace = config.ClimateName.indexOf(' -- ');
|
|
1797
|
+
if (indexOfSpace > 0) {
|
|
1798
|
+
config.ClimateName = config.ClimateName.substring(0, indexOfSpace);
|
|
1799
|
+
}
|
|
1800
|
+
config.climateIds = climateIds;
|
|
1801
|
+
return true;
|
|
1802
|
+
} catch (error) {
|
|
1803
|
+
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1577
1807
|
/**
|
|
1578
1808
|
* get Foreign states for Bridge
|
|
1579
1809
|
*/
|
|
@@ -1646,15 +1876,13 @@ class bridgeClass {
|
|
|
1646
1876
|
}
|
|
1647
1877
|
|
|
1648
1878
|
/**
|
|
1649
|
-
* @param id id to
|
|
1650
|
-
* @param options options of foreign state
|
|
1879
|
+
* @param id id to get ParentNameing
|
|
1651
1880
|
*/
|
|
1652
|
-
async
|
|
1653
|
-
const activeFunction = 'bridge.js -
|
|
1881
|
+
async getParentNameing(id) {
|
|
1882
|
+
const activeFunction = 'bridge.js - getParentNameing';
|
|
1654
1883
|
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
1655
1884
|
try {
|
|
1656
|
-
|
|
1657
|
-
let partentId = '';
|
|
1885
|
+
let parentId = '';
|
|
1658
1886
|
let parentName = '';
|
|
1659
1887
|
const parentDevice = await this.getParentDevice(id);
|
|
1660
1888
|
if (typeof parentDevice !== 'object') {
|
|
@@ -1664,34 +1892,51 @@ class bridgeClass {
|
|
|
1664
1892
|
if (parentChannel === undefined) {
|
|
1665
1893
|
const indexOfFistDot = id.indexOf('.');
|
|
1666
1894
|
const indexOfSecondDot = id.indexOf('.', indexOfFistDot);
|
|
1667
|
-
|
|
1895
|
+
parentId = id.substring(0, indexOfSecondDot);
|
|
1668
1896
|
} else {
|
|
1669
|
-
|
|
1897
|
+
parentId = parentChannel;
|
|
1670
1898
|
}
|
|
1671
|
-
parentName =
|
|
1899
|
+
parentName = parentId;
|
|
1672
1900
|
} else {
|
|
1673
1901
|
this.adapter.log.debug(`Parentchannel: ${JSON.stringify(parentChannel)}`);
|
|
1674
|
-
|
|
1902
|
+
parentId = parentChannel._id;
|
|
1675
1903
|
if (typeof parentChannel.common.name === 'string') {
|
|
1676
1904
|
parentName = parentChannel.common.name;
|
|
1677
1905
|
} else {
|
|
1678
1906
|
parentName = parentChannel.common.name.de;
|
|
1679
1907
|
}
|
|
1680
1908
|
if (parentName === '') {
|
|
1681
|
-
parentName =
|
|
1909
|
+
parentName = parentId;
|
|
1682
1910
|
}
|
|
1683
1911
|
}
|
|
1684
1912
|
} else {
|
|
1685
1913
|
this.adapter.log.debug(`Parentdevice: ${JSON.stringify(parentDevice)}`);
|
|
1686
|
-
|
|
1914
|
+
parentId = parentDevice._id;
|
|
1687
1915
|
if (typeof parentDevice.common.name === 'string') {
|
|
1688
1916
|
parentName = parentDevice.common.name;
|
|
1689
1917
|
} else {
|
|
1690
1918
|
parentName = parentDevice.common.name.de;
|
|
1691
1919
|
}
|
|
1692
1920
|
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1921
|
+
return { parentId: parentId, parentName: parentName };
|
|
1922
|
+
} catch (error) {
|
|
1923
|
+
this.adapter.log.error(`error at ${activeFunction}: ${error} - id: ${id}`);
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* @param id id to discover foreign state
|
|
1929
|
+
* @param options options of foreign state
|
|
1930
|
+
*/
|
|
1931
|
+
async discoverForeignStandardEntity(id, options) {
|
|
1932
|
+
const activeFunction = 'bridge.js - discoverForeignStandardEntity';
|
|
1933
|
+
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
1934
|
+
try {
|
|
1935
|
+
const state = await this.adapter.getForeignStateAsync(id);
|
|
1936
|
+
|
|
1937
|
+
const parentNameing = await this.getParentNameing(id);
|
|
1938
|
+
const deviceIdentifier = parentNameing?.parentName;
|
|
1939
|
+
const statename = id.substring(parentNameing?.partentId.length + 1, id.length);
|
|
1695
1940
|
this.adapter.log.debug(`Assigned - deviceIdentifier: ${deviceIdentifier} - statename: ${statename}`);
|
|
1696
1941
|
options.Bridgestate = {
|
|
1697
1942
|
publish: options.common.read,
|