iobroker.lorawan 1.16.11 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,6 +23,12 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
23
23
  Placeholder for the next version (at the beginning of the line):
24
24
  ### **WORK IN PROGRESS**
25
25
  -->
26
+ ### 1.17.0 (2025-09-19)
27
+ * (BenAhrdt) Add Climate Entity configuration to foreign states
28
+
29
+ ### 1.16.12 (2025-09-18)
30
+ * (BenAhrdt) delete devices in bridge (discover empty) after changing the device_identifier
31
+
26
32
  ### 1.16.11 (2025-09-18)
27
33
  * (BenAhrdt) dont use bridge enum within namespace of adapter
28
34
  * (BenAhrdt) Improve Namebuilding of foreign states to bridge
@@ -103,7 +103,7 @@
103
103
  "applicationId": "Applikations Id",
104
104
  "applicationName": "Applikationsname",
105
105
  "usedApplicationName": "Benutzter Applikationsname (common.name)",
106
- "deviceEUI": "Gerät EUI",
106
+ "deviceEUI": "Geräte EUI",
107
107
  "deviceId": "Geräte Id",
108
108
  "usedDeviceId": "Benutzte Geräte Id (common.name)",
109
109
  "underline": "Unterstrich",
@@ -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": "Insérez la valeur avant, qui sera réglée sur la liaison descendante (la valeur doit être en chaîne de type hexadécimal)",
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": "EntityName",
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": "Вставьте переднюю ценность, Wich будет установлена ​​на нисходящую линию (значение должно быть в строке Hex - Exept Type)",
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
  }
@@ -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",
@@ -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
- "hidden": "data.ModeApplication === 'NotPresent'",
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,
@@ -29,6 +29,7 @@
29
29
  "label": "_PublishedIds",
30
30
  "items": {
31
31
  "_PublishedIds":{
32
+ "newLine": true,
32
33
  "type": "text",
33
34
  "defaultSendTo": "getPublishedIds",
34
35
  "minRows": 10,
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.16.11",
4
+ "version": "1.17.0",
5
5
  "news": {
6
+ "1.17.0": {
7
+ "en": "Add Climate Entity configuration to foreign states",
8
+ "de": "Fügen Sie die Konfiguration der Klima-Entität für externe Zustände hinzu",
9
+ "ru": "Добавлена конфигурация Climate Entity для внешних состояний",
10
+ "pt": "Adicionar configuração da entidade climática para estados estrangeiros",
11
+ "nl": "Voeg configuratie toe voor Klimaat Entiteit voor externe staten",
12
+ "fr": "Ajouter la configuration de l'entité de climatisation pour les états étrangers",
13
+ "it": "Aggiunta configurazione dell'entità Clima agli stati stranieri",
14
+ "es": "Agregar configuración de entidad de clima para estados extranjeros",
15
+ "pl": "Dodaj konfigurację encji klimatycznych do stanów obcych.",
16
+ "uk": "Додати конфігурацію сутності клімату до зовнішніх станів.",
17
+ "zh-cn": "将\"Climate Entity\"配置添加到外部状态。"
18
+ },
19
+ "1.16.12": {
20
+ "en": "delete devices in bridge (discover empty) after changing the device_identifier",
21
+ "de": "Löschen Sie Geräte in der Brücke (entdecken leer), nachdem die Gerätekennung geändert wurde.",
22
+ "ru": "Удаление устройств в мосту (обнаружить пустоту) после изменения идентификатора устройства",
23
+ "pt": "excluir dispositivos na ponte (descoberta vazia) após alterar o device_identifier",
24
+ "nl": "Verwijder apparaten in de brug (ontdek leeg) na het wijzigen van de apparaat_identifier.",
25
+ "fr": "Supprimer les appareils dans le bridge (découverte vide) après avoir modifié l'identifiant de l'appareil",
26
+ "it": "Eliminare i dispositivi nel bridge (scoprire vuoto) dopo aver cambiato l'identificatore del dispositivo.",
27
+ "es": "eliminar dispositivos en el puente (descubrir vacío) después de cambiar el device_identifier",
28
+ "pl": "Usuń urządzenia z mostka (odkryj puste) po zmianie identyfikatora urządzenia",
29
+ "uk": "видалити пристрої у мості (відкрити порожнечу) після зміни ідентифікатора пристрою",
30
+ "zh-cn": "更改设备标识符后,在桥接器中删除设备(发现为空)。"
31
+ },
6
32
  "1.16.11": {
7
33
  "en": "dont use bridge enum within namespace of adapter\nImprove Namebuilding of foreign states to bridge",
8
34
  "de": "Verwenden Sie keine Bridge-Enum innerhalb des Namensraums des Adapters.\nVerbessern Sie den Namensaufbau ausländischer Staaten auf Bridging",
@@ -67,32 +93,6 @@
67
93
  "pl": "Naprawiono błąd usuwania odkrytych urządzeń.\nZaimplementowano logowanie debugowania w celu znalezienia błędu w nazwie urządzenia.",
68
94
  "uk": "Виправлено помилку видалення виявлених пристроїв.\nВбудоване відлагодження для пошуку помилки в імені пристрою.",
69
95
  "zh-cn": "修复删除已发现设备时出现的问题\n构建调试日志以查找设备名称中的错误"
70
- },
71
- "1.16.6": {
72
- "en": "Change detection of new Discovery from LoRaWAN devices",
73
- "de": "Änderung der Erkennung neuer Entdeckungen von LoRaWAN-Geräten",
74
- "ru": "Обнаружение изменений новых устройств LoRaWAN",
75
- "pt": "Detecção de novos dispositivos LoRaWAN na Descoberta",
76
- "nl": "Wijziging in detectie van nieuwe Discovery van LoRaWAN apparaten",
77
- "fr": "Détection des nouvelles découvertes des dispositifs LoRaWAN",
78
- "it": "Rilevamento delle nuove scoperte dei dispositivi LoRaWAN",
79
- "es": "Detección de cambios de nuevos dispositivos de descubrimiento de LoRaWAN",
80
- "pl": "Wykrywanie zmian w nowym Discovery urządzeń LoRaWAN",
81
- "uk": "Виявлення нових пристроїв Discovery з LoRaWAN",
82
- "zh-cn": "更改LoRaWAN设备的新发现检测"
83
- },
84
- "1.16.5": {
85
- "en": "Bugfix in notifications to Bridge (new device dicovered) => namespace not set",
86
- "de": "Fehlerbehebung bei Benachrichtigungen an Bridge (neues Gerät erkannt) => Namespace nicht festgelegt",
87
- "ru": "Исправлена ошибка в уведомлениях для моста (обнаружение нового устройства) => пространство имен не установлено",
88
- "pt": "Correção de bug nas notificações para Bridge (novo dispositivo descoberto) => espaço de nomes não definido",
89
- "nl": "Bugfix in meldingen naar Bridge (nieuw apparaat ontdekt) => namespace niet ingesteld",
90
- "fr": "Correction de bug dans les notifications vers le pont (nouveau périphérique découvert) => espace de noms non défini",
91
- "it": "Correzione di un bug nelle notifiche al Bridge (nuovo dispositivo scoperto) => namespace non impostato",
92
- "es": "Corrección de error en las notificaciones al puente (nuevo dispositivo descubierto) => espacio de nombres no establecido",
93
- "pl": "Poprawiono błąd w powiadomieniach do Bridge (nowe urządzenie zostało znalezione) => nie ustawiona przestrzeń nazw",
94
- "uk": "Виправлено помилку у сповіщеннях до мосту (виявлено новий пристрій) => не встановлений простір імен",
95
- "zh-cn": "修复了通知到桥接器的bug(发现新设备)=>命名空间未设置"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -402,6 +402,8 @@
402
402
  "Bridgepassword"
403
403
  ],
404
404
  "native": {
405
+ "TopicToSend": "lora",
406
+ "MessageToSend": "lora",
405
407
  "ipUrl": "eu1.cloud.thethings.network",
406
408
  "port": 8883,
407
409
  "username": "",
@@ -454,7 +456,8 @@
454
456
  "exclude": false
455
457
  }
456
458
  ],
457
- "ClimateConfig": []
459
+ "ClimateConfig": [],
460
+ "ClimateForeignConfig": []
458
461
  },
459
462
  "objects": [],
460
463
  "instanceObjects": [
@@ -661,9 +661,12 @@ class bridgeClass {
661
661
  },
662
662
  },
663
663
  });
664
- await this.publishId(config.climateIds.target, undefined, {});
665
- await this.publishId(config.climateIds.act, undefined, {});
666
- await this.publishId(config.climateIds.mode, modeval, {});
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.getState(id);
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}`);
@@ -1511,6 +1515,16 @@ class bridgeClass {
1511
1515
  await this.publishDiscovery(id, this.DiscoveredIds[id]);
1512
1516
  delete this.DiscoveredIds[id];
1513
1517
  await this.adapter.setState('info.discoveredIds', JSON.stringify(this.DiscoveredIds), true);
1518
+ } else {
1519
+ if (this.DiscoveredIds[id].topic !== this.OldDiscoveredIds[id].topic) {
1520
+ this.adapter.log.debug(`The discovered topic: ${this.OldDiscoveredIds[id].topic} will be removed`);
1521
+ const safeCurrent = this.DiscoveredIds[id];
1522
+ this.DiscoveredIds[id] = this.OldDiscoveredIds[id];
1523
+ this.DiscoveredIds[id].payload = {};
1524
+ await this.publishDiscovery(id, this.DiscoveredIds[id]);
1525
+ this.DiscoveredIds[id] = safeCurrent;
1526
+ await this.publishDiscovery(id, this.DiscoveredIds[id]);
1527
+ }
1514
1528
  }
1515
1529
  }
1516
1530
  }
@@ -1564,6 +1578,232 @@ class bridgeClass {
1564
1578
  /*****************************************************************
1565
1579
  * *********************** Foreign functions *********************
1566
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
+
1567
1807
  /**
1568
1808
  * get Foreign states for Bridge
1569
1809
  */
@@ -1636,15 +1876,13 @@ class bridgeClass {
1636
1876
  }
1637
1877
 
1638
1878
  /**
1639
- * @param id id to discover foreign state
1640
- * @param options options of foreign state
1879
+ * @param id id to get ParentNameing
1641
1880
  */
1642
- async discoverForeignStandardEntity(id, options) {
1643
- const activeFunction = 'bridge.js - discoverForeignStandardEntity';
1881
+ async getParentNameing(id) {
1882
+ const activeFunction = 'bridge.js - getParentNameing';
1644
1883
  this.adapter.log.debug(`Function ${activeFunction} started.`);
1645
1884
  try {
1646
- const state = await this.adapter.getForeignStateAsync(id);
1647
- let partentId = '';
1885
+ let parentId = '';
1648
1886
  let parentName = '';
1649
1887
  const parentDevice = await this.getParentDevice(id);
1650
1888
  if (typeof parentDevice !== 'object') {
@@ -1654,34 +1892,51 @@ class bridgeClass {
1654
1892
  if (parentChannel === undefined) {
1655
1893
  const indexOfFistDot = id.indexOf('.');
1656
1894
  const indexOfSecondDot = id.indexOf('.', indexOfFistDot);
1657
- partentId = id.substring(0, indexOfSecondDot);
1895
+ parentId = id.substring(0, indexOfSecondDot);
1658
1896
  } else {
1659
- partentId = parentChannel;
1897
+ parentId = parentChannel;
1660
1898
  }
1661
- parentName = partentId;
1899
+ parentName = parentId;
1662
1900
  } else {
1663
1901
  this.adapter.log.debug(`Parentchannel: ${JSON.stringify(parentChannel)}`);
1664
- partentId = parentChannel._id;
1902
+ parentId = parentChannel._id;
1665
1903
  if (typeof parentChannel.common.name === 'string') {
1666
1904
  parentName = parentChannel.common.name;
1667
1905
  } else {
1668
1906
  parentName = parentChannel.common.name.de;
1669
1907
  }
1670
1908
  if (parentName === '') {
1671
- parentName = partentId;
1909
+ parentName = parentId;
1672
1910
  }
1673
1911
  }
1674
1912
  } else {
1675
1913
  this.adapter.log.debug(`Parentdevice: ${JSON.stringify(parentDevice)}`);
1676
- partentId = parentDevice._id;
1914
+ parentId = parentDevice._id;
1677
1915
  if (typeof parentDevice.common.name === 'string') {
1678
1916
  parentName = parentDevice.common.name;
1679
1917
  } else {
1680
1918
  parentName = parentDevice.common.name.de;
1681
1919
  }
1682
1920
  }
1683
- const deviceIdentifier = parentName;
1684
- const statename = id.substring(partentId.length + 1, id.length);
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);
1685
1940
  this.adapter.log.debug(`Assigned - deviceIdentifier: ${deviceIdentifier} - statename: ${statename}`);
1686
1941
  options.Bridgestate = {
1687
1942
  publish: options.common.read,
@@ -41,8 +41,6 @@ class directorieshandlerClass {
41
41
  this.customObject = {};
42
42
 
43
43
  this.HABridge = {
44
- Adaptername: 'mqtt-client',
45
- TopicPrefix: 'iobroker/',
46
44
  Dummy: {
47
45
  applicationId: '942ea85a-1ea8-4dff-8900-8141897f95b9',
48
46
  applicationName: 'Fenster',
package/main.js CHANGED
@@ -1031,7 +1031,7 @@ class Lorawan extends utils.Adapter {
1031
1031
  }
1032
1032
  result += element.DeviceIdentifier;
1033
1033
  }
1034
- result = `${this.messagehandler?.directoryhandler.HABridge.TopicPrefix}${result}/state`;
1034
+ result = `${this.bridge?.bridgeMqttClient.BridgePrefix}${result}/state`;
1035
1035
  // Send response
1036
1036
  if (obj.callback) {
1037
1037
  this.sendTo(obj.from, obj.command, result, obj.callback);
@@ -1059,7 +1059,7 @@ class Lorawan extends utils.Adapter {
1059
1059
  }
1060
1060
  result += this.messagehandler?.directoryhandler.HABridge.Dummy[element.DeviceIdentifier];
1061
1061
  }
1062
- result = `${this.messagehandler?.directoryhandler.HABridge.TopicPrefix}${result}/state`;
1062
+ result = `${this.bridge?.bridgeMqttClient.BridgePrefix}${result}/state`;
1063
1063
  // Send response
1064
1064
  if (obj.callback) {
1065
1065
  this.sendTo(obj.from, obj.command, result, obj.callback);
@@ -1262,7 +1262,6 @@ class Lorawan extends utils.Adapter {
1262
1262
  }
1263
1263
  } else if (obj.command === 'getBridgeConnection') {
1264
1264
  try {
1265
- this.log.error(typeof obj.message.Bridgessl);
1266
1265
  let connection = false;
1267
1266
  const mqttprefix = obj.message.Bridgessl ? 'mqtts://' : 'mqtt://';
1268
1267
  const testclient = mqtt.connect(`${mqttprefix}${obj.message.BridgeipUrl}`, {
@@ -1290,6 +1289,14 @@ class Lorawan extends utils.Adapter {
1290
1289
  } catch (error) {
1291
1290
  this.log.error(error);
1292
1291
  }
1292
+ } else if (obj.command === 'sendMQTTMessage') {
1293
+ try {
1294
+ this.log.error(typeof obj.message.Topic);
1295
+ this.log.error(typeof obj.message.Message);
1296
+ this.sendTo(obj.from, obj.command, { result: 'OK' }, obj.callback);
1297
+ } catch (error) {
1298
+ this.log.error(error);
1299
+ }
1293
1300
  } else {
1294
1301
  const result = { error: true, message: 'No message matched', received: obj.message };
1295
1302
  if (obj.callback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.16.11",
3
+ "version": "1.17.0",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",