iobroker.lorawan 1.17.13 → 1.17.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,6 +23,9 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
23
23
  Placeholder for the next version (at the beginning of the line):
24
24
  ### **WORK IN PROGRESS**
25
25
  -->
26
+ ### 1.17.14 (2025-09-24)
27
+ * (BenAhrdt) add humidifier to foreign States
28
+
26
29
  ### 1.17.13 (2025-09-24)
27
30
  * (BenAhrdt) Bugfix discover new devices
28
31
 
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Definieren Sie Zustände für eine Klima Entität",
175
175
  "ClimateForeignInformation": "Hier können Sie ein Array von Klimaentitäten definieren",
176
176
  "VirtualMode": "Virtueller Modus",
177
- "VirtualModeTooltip": "Aktivieren Sie diese Option, wenn kein Modus als State vorhanden ist."
177
+ "VirtualModeTooltip": "Aktivieren Sie diese Option, wenn kein Modus als State vorhanden ist.",
178
+ "HumidifierHeader": "Definieren Sie Zustände für eine Luftbefeuchterentität",
179
+ "HumidifierInformation": "Hier können Sie eine Reihe von Luftbefeuchterdefinitionen definieren",
180
+ "HumidifierNameText": "Entitätsname",
181
+ "Humidifier": "Luftbefeuchter",
182
+ "WithAct": "mit Act-State",
183
+ "HumidifierOnOffText": "Ein / Aus",
184
+ "HumidifierTargetText": "Zielfeuchtigkeit",
185
+ "HumidifierActText": "Tatsächliche Luftfeuchtigkeit"
178
186
  }
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Define States for Climate Entity",
175
175
  "ClimateForeignInformation": "Here you can define an array of Climate definitions",
176
176
  "VirtualMode": "Virtual Mode",
177
- "VirtualModeTooltip": "Activate, if a mode id is not present"
177
+ "VirtualModeTooltip": "Activate, if a mode id is not present",
178
+ "HumidifierHeader": "Define States for a Humidifier Entity",
179
+ "HumidifierInformation": "Here you can define an array of Humidifier definitions",
180
+ "HumidifierNameText": "Entityname",
181
+ "Humidifier": "Humidifier",
182
+ "WithAct": "with Act-State",
183
+ "HumidifierOnOffText": "On / Off",
184
+ "HumidifierTargetText": "Target humidity",
185
+ "HumidifierActText": "Actual humidity"
178
186
  }
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Definir estados para la entidad climática",
175
175
  "ClimateForeignInformation": "Aquí puedes definir una variedad de definiciones climáticas",
176
176
  "VirtualMode": "Modo virtual",
177
- "VirtualModeTooltip": "Activar, si no está presente una identificación de modo"
177
+ "VirtualModeTooltip": "Activar, si no está presente una identificación de modo",
178
+ "HumidifierHeader": "Definir estados para la entidad humidificador",
179
+ "HumidifierInformation": "Aquí puede definir una variedad de definiciones de humidificadores",
180
+ "HumidifierNameText": "Entidad",
181
+ "Humidifier": "Humidificador",
182
+ "WithAct": "con estado de acto",
183
+ "HumidifierOnOffText": "Encendido / apagado",
184
+ "HumidifierTargetText": "Humedad objetivo",
185
+ "HumidifierActText": "Humedad real"
178
186
  }
@@ -51,7 +51,7 @@
51
51
  "deviceType": "type d'appareil",
52
52
  "expertSettings": "Sets d'experts",
53
53
  "enabled & collect": "activé et collecté",
54
- "deviceTypeTooltip": "insert the name of the device type, this config is valid. (par exemple, Dragino Xy correspond également à Dragino)",
54
+ "deviceTypeTooltip": "Insérez le nom du type de périphérique, cette configuration est valide. (par exemple, Dragino Xy correspond également à Dragino)",
55
55
  "sendWithUplink": "Envoyer avec la liaison montante",
56
56
  "sendWithUplinkTooltip": "Choisissez votre mode d'envoi pour les configurations avec le deviceType souhaité",
57
57
  "decimalPlaces": "décimal",
@@ -77,7 +77,7 @@
77
77
  "unused": "inutilisé",
78
78
  "downlinkConfigHeader": "Ajoutez les liaisons descendantes de votre appareil spécifiques",
79
79
  "customConfig": "\"Custom\" -konfiguation",
80
- "customConfigHeader": "Ajoutez un objet personnalisé spécifique à chaque état décodé",
80
+ "customConfigHeader": "Ajouter un objet personnalisé spécifique à chaque état décodé",
81
81
  "customJson": "Objekt für den \"Custom\" -Bereich im \"commun\" objekt",
82
82
  "customJsonTooltip": "Fügen Sie Ein objekt Hinzu, Welches en commun. Custom Geschrieben Wird.",
83
83
  "customJsonInformation": "Avec cette fonction, il est possible d'ajouter vos propres entrées personnalisées aux états décodés. Entrez simplement le contenu JSON souhaité en fonction active.",
@@ -112,7 +112,7 @@
112
112
  "minus": "moins",
113
113
  "BridgeHeader": "Pont vers un système étranger",
114
114
  "_DeviceIdentifierConfiguredDiscription": "Résultat d'un sujet configuré:",
115
- "_DeviceIdentifierDiscription": "Configurez les identifiants pour créer un sujet MQTT pour un état. You can select multiple device identifiers, separated by the separator.",
115
+ "_DeviceIdentifierDiscription": "Configurez les identifiants pour créer un sujet MQTT pour un état. Vous pouvez sélectionner plusieurs identificateurs d'appareils, séparés par le séparateur.",
116
116
  "_DeviceIdentifierExampleDiscription": "Exemple de sujet configuré:",
117
117
  "_NoLoRaWAN": "L'État n'est pas dans l'instance de Lorawan droite",
118
118
  "publishTooltip": "Publier l'État sur le pont",
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Définir les États de l'entité climatique",
175
175
  "ClimateForeignInformation": "Ici, vous pouvez définir un tableau de définitions climatiques",
176
176
  "VirtualMode": "Mode virtuel",
177
- "VirtualModeTooltip": "Activer, si un ID de mode n'est pas présent"
177
+ "VirtualModeTooltip": "Activer, si un ID de mode n'est pas présent",
178
+ "HumidifierHeader": "Définir les états de l'entité humidificateur",
179
+ "HumidifierInformation": "Ici, vous pouvez définir un éventail de définitions d'humidificateur",
180
+ "HumidifierNameText": "Entité",
181
+ "Humidifier": "Humidificateur",
182
+ "WithAct": "avec ACT-State",
183
+ "HumidifierOnOffText": "En marche / arrêt",
184
+ "HumidifierTargetText": "Humidité cible",
185
+ "HumidifierActText": "Humidité réelle"
178
186
  }
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Definire gli stati per l'entità climatica",
175
175
  "ClimateForeignInformation": "Qui puoi definire una serie di definizioni climatiche",
176
176
  "VirtualMode": "Modalità virtuale",
177
- "VirtualModeTooltip": "Attivare, se un ID modalità non è presente"
177
+ "VirtualModeTooltip": "Attivare, se un ID modalità non è presente",
178
+ "HumidifierHeader": "Definisci gli stati per l'entità dell'umidificatore",
179
+ "HumidifierInformation": "Qui puoi definire una serie di definizioni di umidificatore",
180
+ "HumidifierNameText": "EntityName",
181
+ "Humidifier": "Umidificatore",
182
+ "WithAct": "con Act-State",
183
+ "HumidifierOnOffText": "ON / OFF",
184
+ "HumidifierTargetText": "Umidità target",
185
+ "HumidifierActText": "Umidità reale"
178
186
  }
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Definieer staten voor klimaat entiteit",
175
175
  "ClimateForeignInformation": "Hier kunt u een scala aan klimaatdefinities definiëren",
176
176
  "VirtualMode": "Virtuele modus",
177
- "VirtualModeTooltip": "Activeer, als een modus -ID niet aanwezig is"
177
+ "VirtualModeTooltip": "Activeer, als een modus -ID niet aanwezig is",
178
+ "HumidifierHeader": "Definieer staten voor de luchtbevochtiger",
179
+ "HumidifierInformation": "Hier kunt u een scala aan definities voor luchtbevochtigers definiëren",
180
+ "HumidifierNameText": "EntityName",
181
+ "Humidifier": "Luchtbevochtiger",
182
+ "WithAct": "met Act-State",
183
+ "HumidifierOnOffText": "Aan / uit",
184
+ "HumidifierTargetText": "Richt de luchtvochtigheid",
185
+ "HumidifierActText": "Werkelijke vochtigheid"
178
186
  }
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Zdefiniuj stany dla jednostki klimatycznej",
175
175
  "ClimateForeignInformation": "Tutaj możesz zdefiniować szereg definicji klimatycznych",
176
176
  "VirtualMode": "Tryb wirtualny",
177
- "VirtualModeTooltip": "Aktywuj, jeśli identyfikator trybu nie jest obecny"
177
+ "VirtualModeTooltip": "Aktywuj, jeśli identyfikator trybu nie jest obecny",
178
+ "HumidifierHeader": "Zdefiniuj stany dla jednostki nawilżacza",
179
+ "HumidifierInformation": "Tutaj możesz zdefiniować szereg definicji nawilżaczy",
180
+ "HumidifierNameText": "Nazwa EntityName",
181
+ "Humidifier": "Nawilżacz",
182
+ "WithAct": "Z ACT-State",
183
+ "HumidifierOnOffText": "Włącz / wyłączony",
184
+ "HumidifierTargetText": "Docelowa wilgotność",
185
+ "HumidifierActText": "Faktyczna wilgotność"
178
186
  }
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Definir estados para a entidade climática",
175
175
  "ClimateForeignInformation": "Aqui você pode definir uma variedade de definições climáticas",
176
176
  "VirtualMode": "Modo virtual",
177
- "VirtualModeTooltip": "Ative, se um ID de modo não estiver presente"
177
+ "VirtualModeTooltip": "Ative, se um ID de modo não estiver presente",
178
+ "HumidifierHeader": "Defina estados para entidade umidificador",
179
+ "HumidifierInformation": "Aqui você pode definir uma variedade de definições de umidificador",
180
+ "HumidifierNameText": "EntityName",
181
+ "Humidifier": "Umidificador",
182
+ "WithAct": "com o estado do ACT",
183
+ "HumidifierOnOffText": "ON / OFF",
184
+ "HumidifierTargetText": "Umidade alvo",
185
+ "HumidifierActText": "Umidade real"
178
186
  }
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Определить состояния для климатической сущности",
175
175
  "ClimateForeignInformation": "Здесь вы можете определить множество климатических определений",
176
176
  "VirtualMode": "Виртуальный режим",
177
- "VirtualModeTooltip": "Активируйте, если идентификатор режима отсутствует"
177
+ "VirtualModeTooltip": "Активируйте, если идентификатор режима отсутствует",
178
+ "HumidifierHeader": "Определите государства для увлажнительного сущности",
179
+ "HumidifierInformation": "Здесь вы можете определить массив определений увлажнителя",
180
+ "HumidifierNameText": "EntityName",
181
+ "Humidifier": "Увлажнитель",
182
+ "WithAct": "с Act-государством",
183
+ "HumidifierOnOffText": "ВКЛ / OFF",
184
+ "HumidifierTargetText": "Целевая влажность",
185
+ "HumidifierActText": "Фактическая влажность"
178
186
  }
@@ -75,7 +75,7 @@
75
75
  "keepalive": "зберігати",
76
76
  "keepaliveTooltip": "Введіть час у секундах для функції Keepalive",
77
77
  "unused": "невикористаний",
78
- "downlinkConfigHeader": "Додайте пристрій конкретні низки",
78
+ "downlinkConfigHeader": "Додайте свій пристрій конкретні низки",
79
79
  "customConfig": "\"Custom\" -konfitiguation",
80
80
  "customConfigHeader": "Додайте конкретний спеціальний об’єкт до кожного декодованого стану",
81
81
  "customJson": "Objekt für den \"custom\" -bereich im \"common\" objekt",
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "Визначте стани клімату",
175
175
  "ClimateForeignInformation": "Тут ви можете визначити безліч визначення клімату",
176
176
  "VirtualMode": "Віртуальний режим",
177
- "VirtualModeTooltip": "Активуйте, якщо ідентифікатор режиму немає"
177
+ "VirtualModeTooltip": "Активуйте, якщо ідентифікатор режиму немає",
178
+ "HumidifierHeader": "Визначте стани для зволожувача",
179
+ "HumidifierInformation": "Тут ви можете визначити безліч визначення зволожувача",
180
+ "HumidifierNameText": "EntityName",
181
+ "Humidifier": "Зволожувач",
182
+ "WithAct": "з акт-станом",
183
+ "HumidifierOnOffText": "Увімкнення / вимкнення",
184
+ "HumidifierTargetText": "Цільова вологість",
185
+ "HumidifierActText": "Фактична вологість"
178
186
  }
@@ -119,7 +119,7 @@
119
119
  "subscribeTooltip": "从桥梁订阅州",
120
120
  "BridgeStateHeader": "定义发现主题的状态",
121
121
  "BridgeStateInformation": "在这里,您可以定义一系列状态,这些状态将设置为发现的主题。 (通配符也是可能的)",
122
- "Application": "Application",
122
+ "Application": "应用",
123
123
  "Device": "设备",
124
124
  "Folder": "文件夹",
125
125
  "State": "状态",
@@ -174,5 +174,13 @@
174
174
  "ClimateForeignHeader": "定义气候实体的国家",
175
175
  "ClimateForeignInformation": "在这里您可以定义一系列气候定义",
176
176
  "VirtualMode": "虚拟模式",
177
- "VirtualModeTooltip": "激活,如果不存在模式ID"
177
+ "VirtualModeTooltip": "激活,如果不存在模式ID",
178
+ "HumidifierHeader": "定义加湿器实体的状态",
179
+ "HumidifierInformation": "在这里您可以定义一系列加湿器定义",
180
+ "HumidifierNameText": "EntityName",
181
+ "Humidifier": "加湿器",
182
+ "WithAct": "与行动状态",
183
+ "HumidifierOnOffText": "打开 /关",
184
+ "HumidifierTargetText": "目标湿度",
185
+ "HumidifierActText": "实际的湿度"
178
186
  }
@@ -1557,20 +1557,19 @@
1557
1557
  "xl": 2
1558
1558
  },
1559
1559
  {
1560
- "newLine": true,
1561
1560
  "type": "staticText",
1562
1561
  "attr": "_statciTextTarget",
1563
- "label": "ClimateTargetTemperatureText",
1562
+ "label": "",
1564
1563
  "xs": 12,
1565
- "sm": 12,
1566
- "md": 12,
1567
- "lg": 12,
1568
- "xl": 12
1564
+ "sm": 6,
1565
+ "md": 6,
1566
+ "lg": 6,
1567
+ "xl": 6
1569
1568
  },
1570
1569
  {
1571
1570
  "type": "objectId",
1572
1571
  "attr": "TargetId",
1573
- "label": "TargetId",
1572
+ "label": "ClimateTargetTemperatureText",
1574
1573
  "xs": 12,
1575
1574
  "sm": 4,
1576
1575
  "md": 4,
@@ -1580,7 +1579,7 @@
1580
1579
  {
1581
1580
  "type": "objectId",
1582
1581
  "attr": "ActId",
1583
- "label": "ActId",
1582
+ "label": "ClimateActTemperatureText",
1584
1583
  "xs": 12,
1585
1584
  "sm": 4,
1586
1585
  "md": 4,
@@ -1590,7 +1589,7 @@
1590
1589
  {
1591
1590
  "type": "objectId",
1592
1591
  "attr": "ModeId",
1593
- "label": "ModeId",
1592
+ "label": "ClimateModeTemperatureText",
1594
1593
  "hidden": "data.VirtualMode === true",
1595
1594
  "xs": 12,
1596
1595
  "sm": 4,
@@ -1599,6 +1598,121 @@
1599
1598
  "xl": 4
1600
1599
  }
1601
1600
  ]
1601
+ },
1602
+ "_HumidifierForeignHeader":{
1603
+ "newLine": true,
1604
+ "type": "header",
1605
+ "text": "HumidifierHeader",
1606
+ "size": 3,
1607
+ "xs": 12,
1608
+ "sm": 12,
1609
+ "md": 12,
1610
+ "lg": 12,
1611
+ "xl": 12
1612
+ },
1613
+ "_HumidifierForeignInformation":{
1614
+ "newLine":true,
1615
+ "type": "staticText",
1616
+ "label": "HumidifierInformation",
1617
+ "xs": 12,
1618
+ "sm": 12,
1619
+ "md": 12,
1620
+ "lg": 12,
1621
+ "xl": 12
1622
+ },
1623
+ "HumidifierForeignConfig":{
1624
+ "newLine": true,
1625
+ "type":"accordion",
1626
+ "titleAttr": "HumidifierName",
1627
+ "clone": true,
1628
+ "xs": 12,
1629
+ "sm": 12,
1630
+ "md": 12,
1631
+ "lg": 12,
1632
+ "xl": 12,
1633
+ "items":[
1634
+ {
1635
+ "type": "text",
1636
+ "attr": "HumidifierName",
1637
+ "label": "HumidifierNameText",
1638
+ "validator": "if(data.HumidifierName === ''){return false;}else{return true;}",
1639
+ "validatorNoSaveOnError": true,
1640
+ "default": "Humidifier Name",
1641
+ "xs": 12,
1642
+ "sm": 4,
1643
+ "md": 4,
1644
+ "lg": 4,
1645
+ "xl": 4
1646
+ },
1647
+ {
1648
+ "type": "checkbox",
1649
+ "attr": "Humidifier",
1650
+ "label": "Humidifier",
1651
+ "tooltip": "HumidifierTooltip",
1652
+ "default": true,
1653
+ "xs": 12,
1654
+ "sm": 2,
1655
+ "md": 2,
1656
+ "lg": 2,
1657
+ "xl": 2
1658
+ },
1659
+ {
1660
+ "type": "checkbox",
1661
+ "attr": "WithAct",
1662
+ "label": "WithAct",
1663
+ "tooltip": "HumidifierTooltip",
1664
+ "default": true,
1665
+ "xs": 12,
1666
+ "sm": 2,
1667
+ "md": 2,
1668
+ "lg": 2,
1669
+ "xl": 2
1670
+ },
1671
+ {
1672
+ "type": "staticText",
1673
+ "attr": "_staticTextTarget",
1674
+ "label": "",
1675
+ "xs": 12,
1676
+ "sm": 4,
1677
+ "md": 4,
1678
+ "lg": 4,
1679
+ "xl": 4
1680
+ },
1681
+ {
1682
+ "type": "objectId",
1683
+ "attr": "OnOffId",
1684
+ "label": "HumidifierOnOffText",
1685
+ "customFilter": "{common: {type: ['boolean']}",
1686
+ "xs": 12,
1687
+ "sm": 4,
1688
+ "md": 4,
1689
+ "lg": 4,
1690
+ "xl": 4
1691
+ },
1692
+ {
1693
+ "type": "objectId",
1694
+ "attr": "TargetId",
1695
+ "label": "HumidifierTargetText",
1696
+ "customFilter": "{common: {type: ['number']}",
1697
+ "xs": 12,
1698
+ "sm": 4,
1699
+ "md": 4,
1700
+ "lg": 4,
1701
+ "xl": 4
1702
+ },
1703
+ {
1704
+ "type": "objectId",
1705
+ "attr": "ActId",
1706
+ "label": "HumidifierActText",
1707
+ "hidden": "data.WithAct === false",
1708
+ "customFilter": "{common: {type: ['number']}",
1709
+ "xs": 12,
1710
+ "sm": 4,
1711
+ "md": 4,
1712
+ "lg": 4,
1713
+ "xl": 4
1714
+ }
1715
+ ]
1602
1716
  }
1603
1717
  }
1604
1718
  }
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.17.13",
4
+ "version": "1.17.14",
5
5
  "news": {
6
+ "1.17.14": {
7
+ "en": "add humidifier to foreign States",
8
+ "de": "fügen Sie Befeuchter für ausländische Staaten hinzu",
9
+ "ru": "добавить увлажнитель воздуха в иностранные государства",
10
+ "pt": "adicionar umidificador a estados estrangeiros",
11
+ "nl": "luchtbevochtiger toevoegen aan buitenlandse staten",
12
+ "fr": "ajouter l'humidificateur aux États étrangers",
13
+ "it": "aggiungere umidificatore agli Stati esteri",
14
+ "es": "añadir humidificador a Estados extranjeros",
15
+ "pl": "dodać nawilżacz do obcych państw",
16
+ "uk": "додати зволожувач до іноземних держав",
17
+ "zh-cn": "向外国添加增湿剂"
18
+ },
6
19
  "1.17.13": {
7
20
  "en": "Bugfix discover new devices",
8
21
  "de": "Bugfix neue Geräte entdecken",
@@ -80,19 +93,6 @@
80
93
  "pl": "zamień [] () & {} na _",
81
94
  "uk": "нормалізувати [] () & {} у _",
82
95
  "zh-cn": "将[]()和{}转换为_"
83
- },
84
- "1.17.7": {
85
- "en": "Virtal Mode for Foreign climate entities available",
86
- "de": "Virtueller Modus für externe Klima-Entitäten verfügbar",
87
- "ru": "Доступен виртуальный режим для иностранных сущностей климата",
88
- "pt": "Modo virtual para entidades de clima estrangeiras disponível.",
89
- "nl": "Virtuele Modus voor Externe klimaatentiteiten beschikbaar",
90
- "fr": "Mode virtuel pour les entités climatiques étrangères disponible",
91
- "it": "Modalità virtuale per le entità di clima estere disponibile",
92
- "es": "Modo virtual para entidades de clima extranjeras disponible.",
93
- "pl": "Dostępny tryb wirtualny dla zagranicznych jednostek klimatyzacyjnych.",
94
- "uk": "Доступний режим віртуальних сутностей для зовнішнього клімату",
95
- "zh-cn": "可用于外部气候实体的虚拟模式"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -453,7 +453,8 @@
453
453
  }
454
454
  ],
455
455
  "ClimateConfig": [],
456
- "ClimateForeignConfig": []
456
+ "ClimateForeignConfig": [],
457
+ "HumidifierForeignConfig": []
457
458
  },
458
459
  "objects": [],
459
460
  "instanceObjects": [
@@ -36,6 +36,7 @@ class bridgeClass {
36
36
  this.EndingSet = '/set';
37
37
  this.EndingState = '/state';
38
38
  this.EndingVirtualClimate = '.virtual_climate';
39
+ this.EndingVirtualHumidifier = '.virtual_humiditier';
39
40
  this.EndingVirtualMode = '.virtual_mode';
40
41
  this.NotificationId = '.notification';
41
42
  this.GeneralId = '.general';
@@ -43,6 +44,8 @@ class bridgeClass {
43
44
  this.OnlineId = '.online';
44
45
  this.EndingNotification = '.notification';
45
46
  this.ClimateEntityType = 'climate';
47
+ this.HumidifierEntityType = 'humidifier';
48
+ this.DeHumidifierEntityType = 'dehumidifier';
46
49
  this.NotificationEntityType = 'device_automation';
47
50
  this.MaxValueCount = 5;
48
51
  this.Words = {
@@ -1426,6 +1429,7 @@ class bridgeClass {
1426
1429
  await this.discoverClimate();
1427
1430
  await this.getForeignStatesForStandardEntities();
1428
1431
  await this.getForeignClimateConfig();
1432
+ await this.getForeignHumidifierConfig();
1429
1433
  await this.discoverGeneralNotification();
1430
1434
  await this.checkDiscoveries();
1431
1435
  } catch (error) {
@@ -1443,6 +1447,7 @@ class bridgeClass {
1443
1447
  this.DiscoveredIds[id] = this.OldDiscoveredIds[id];
1444
1448
  this.DiscoveredIds[id].payload = '';
1445
1449
  await this.publishDiscovery(id, this.DiscoveredIds[id]);
1450
+ this.adapter.log.error('Löschen 1');
1446
1451
  delete this.DiscoveredIds[id];
1447
1452
  await this.adapter.setState('info.discoveredIds', JSON.stringify(this.DiscoveredIds), true);
1448
1453
  } else {
@@ -1452,6 +1457,7 @@ class bridgeClass {
1452
1457
  this.DiscoveredIds[id] = this.OldDiscoveredIds[id];
1453
1458
  this.DiscoveredIds[id].payload = '';
1454
1459
  await this.publishDiscovery(id, this.DiscoveredIds[id]);
1460
+ this.adapter.log.error('Löschen 2');
1455
1461
  this.DiscoveredIds[id] = safeCurrent;
1456
1462
  await this.publishDiscovery(id, this.DiscoveredIds[id]);
1457
1463
  }
@@ -1694,7 +1700,7 @@ class bridgeClass {
1694
1700
  }
1695
1701
 
1696
1702
  /*********************************************************************
1697
- * ****************** generate Climate Ids ***************************
1703
+ * *************** generate Foreign Climate Ids **********************
1698
1704
  * ******************************************************************/
1699
1705
 
1700
1706
  /**
@@ -1713,7 +1719,7 @@ class bridgeClass {
1713
1719
  climateIds.mode = config.ModeId;
1714
1720
  }
1715
1721
  for (const id of Object.values(climateIds)) {
1716
- // Just lockto object, if it does not end with Virtual Mode
1722
+ // Just lock to object, if it does not end with Virtual Mode
1717
1723
  if (!id.endsWith(this.EndingVirtualMode)) {
1718
1724
  if (!(await this.adapter.getForeignObjectAsync(id))) {
1719
1725
  this.adapter.log.debug(`Id: ${id} does not exsit.`);
@@ -1736,6 +1742,231 @@ class bridgeClass {
1736
1742
  }
1737
1743
  }
1738
1744
 
1745
+ /**
1746
+ * get Foreign states for Bridge
1747
+ */
1748
+ async getForeignHumidifierConfig() {
1749
+ const activeFunction = 'bridge.js - getForeignHumidifierConfig';
1750
+ this.adapter.log.debug(`Function ${activeFunction} started.`);
1751
+ try {
1752
+ for (const config of this.adapter.config.HumidifierForeignConfig) {
1753
+ await this.discoverForeignHumidifier(config);
1754
+ }
1755
+ } catch (error) {
1756
+ this.adapter.log.error(`error at ${activeFunction}: ${error}`);
1757
+ }
1758
+ }
1759
+
1760
+ /**
1761
+ * get Foreign states for Bridge
1762
+ *
1763
+ * @param config config of the climate entity
1764
+ */
1765
+ async discoverForeignHumidifier(config) {
1766
+ const activeFunction = 'bridge.js - discoverForeignHumidifier';
1767
+ this.adapter.log.debug(`Function ${activeFunction} started.`);
1768
+ try {
1769
+ // Assign the Ids (use the codenameing of discoverClimate)
1770
+ if (!(await this.generateForeignHumidifierIds(config))) {
1771
+ this.adapter.log.warn(
1772
+ `The Foreign Humidifier config is not complete, or has error(s): ${config.ClimateName}`,
1773
+ );
1774
+ return;
1775
+ }
1776
+
1777
+ // On Off
1778
+ const onOff = {};
1779
+ onOff.DeviceIdentifier = (await this.getParentNameing(config.HumidifierIds.onOff))?.parentName;
1780
+ onOff.uniqueString = await this.getUniqueString(config.HumidifierIds.onOff, onOff.DeviceIdentifier);
1781
+ onOff.Topic = `${this.bridgeMqttClient.BridgePrefix}${onOff.uniqueString}`.toLowerCase();
1782
+
1783
+ // Target
1784
+ const target = {};
1785
+ target.DeviceIdentifier = (await this.getParentNameing(config.HumidifierIds.target))?.parentName;
1786
+ target.uniqueString = await this.getUniqueString(config.HumidifierIds.target, target.DeviceIdentifier);
1787
+ target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString}`.toLowerCase();
1788
+
1789
+ //Min und Max holen
1790
+ const targetObject = await this.adapter.getForeignObjectAsync(config.HumidifierIds.target);
1791
+ if (targetObject.common.min) {
1792
+ target.min = targetObject.common.min;
1793
+ }
1794
+ if (targetObject.common.max) {
1795
+ target.max = targetObject.common.max;
1796
+ }
1797
+
1798
+ // Act
1799
+ const act = {};
1800
+ act.DeviceIdentifier = (await this.getParentNameing(config.HumidifierIds.act))?.parentName;
1801
+ act.uniqueString = await this.getUniqueString(config.HumidifierIds.act, act.DeviceIdentifier);
1802
+ act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString}`.toLowerCase();
1803
+
1804
+ const humidifierUniquString = await this.getUniqueString(
1805
+ `${this.adapter.namespace}.${config.HumidifierName}`,
1806
+ target.DeviceIdentifier,
1807
+ );
1808
+ const entityType = config.Humidifier ? this.HumidifierEntityType : this.DeHumidifierEntityType;
1809
+ const DiscoveryTopic =
1810
+ `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.HumidifierEntityType}/${humidifierUniquString}/config`.toLowerCase();
1811
+ const indexLastDotTarget = config.HumidifierIds.target.lastIndexOf('.');
1812
+ const Id = config.HumidifierIds.target.substring(0, indexLastDotTarget) + this.EndingVirtualHumidifier;
1813
+
1814
+ const DiscoveryPayload = {
1815
+ name: config.HumidifierName,
1816
+ unique_id: `${humidifierUniquString}`.toLowerCase(),
1817
+ device: {
1818
+ identifiers: [this.normalizeString(target.DeviceIdentifier).toLowerCase()],
1819
+ name: target.DeviceIdentifier,
1820
+ },
1821
+ device_class: `${entityType}`,
1822
+ state_topic: `${onOff.Topic}${this.EndingState}`,
1823
+ command_topic: `${onOff.Topic}${this.EndingSet}`,
1824
+ payload_on: 'true',
1825
+ payload_off: 'false',
1826
+ min_humidity: target.min ? target.min : 0,
1827
+ max_humidity: target.max ? target.max : 100,
1828
+ target_humidity_state_topic: `${target.Topic}${this.EndingState}`,
1829
+ target_humidity_command_topic: `${target.Topic}${this.EndingSet}`,
1830
+ };
1831
+ if (config.WithAct) {
1832
+ DiscoveryPayload.current_humidity_topic = `${act.Topic}${this.EndingState}`;
1833
+ }
1834
+ // Assign Subscribed Topics
1835
+ // On Off
1836
+ this.assignTopicStructure(
1837
+ this.SubscribedTopics,
1838
+ `${onOff.Topic}${this.EndingSet}`,
1839
+ {
1840
+ deviceId: onOff.DeviceIdentifier,
1841
+ },
1842
+ DiscoveryTopic,
1843
+ DiscoveryPayload,
1844
+ config.HumidifierIds.onOff,
1845
+ );
1846
+
1847
+ // Target
1848
+ this.assignTopicStructure(
1849
+ this.SubscribedTopics,
1850
+ `${target.Topic}${this.EndingSet}`,
1851
+ {
1852
+ deviceId: target.DeviceIdentifier,
1853
+ },
1854
+ DiscoveryTopic,
1855
+ DiscoveryPayload,
1856
+ config.HumidifierIds.target,
1857
+ );
1858
+
1859
+ // Assign published Topics
1860
+ // On Off
1861
+ this.assignIdStructure(
1862
+ this.PublishedIds,
1863
+ config.HumidifierIds.onOff,
1864
+ {
1865
+ deviceId: onOff.DeviceIdentifier,
1866
+ },
1867
+ DiscoveryTopic,
1868
+ DiscoveryPayload,
1869
+ `${onOff.Topic}${this.EndingState}`,
1870
+ );
1871
+
1872
+ // Target
1873
+ this.assignIdStructure(
1874
+ this.PublishedIds,
1875
+ config.HumidifierIds.target,
1876
+ {
1877
+ deviceId: target.DeviceIdentifier,
1878
+ },
1879
+ DiscoveryTopic,
1880
+ DiscoveryPayload,
1881
+ `${target.Topic}${this.EndingState}`,
1882
+ );
1883
+
1884
+ // Act
1885
+ this.assignIdStructure(
1886
+ this.PublishedIds,
1887
+ config.HumidifierIds.act,
1888
+ {
1889
+ deviceId: act.DeviceIdentifier,
1890
+ },
1891
+ DiscoveryTopic,
1892
+ DiscoveryPayload,
1893
+ `${act.Topic}${this.EndingState}`,
1894
+ );
1895
+ const informations = {
1896
+ onOff: {
1897
+ deviceId: onOff.DeviceIdentifier,
1898
+ },
1899
+ target: {
1900
+ deviceId: target.DeviceIdentifier,
1901
+ },
1902
+ };
1903
+ if (config.WithAct) {
1904
+ informations.act = { deviceId: act.DeviceIdentifier };
1905
+ }
1906
+ // Publishing the discover message
1907
+ await this.publishDiscovery(Id, {
1908
+ topic: DiscoveryTopic,
1909
+ payload: structuredClone(DiscoveryPayload),
1910
+ informations: informations,
1911
+ });
1912
+ // Delay for publish new entity
1913
+ setTimeout(async () => {
1914
+ await this.publishId(config.HumidifierIds.onOff, undefined, {});
1915
+ await this.publishId(config.HumidifierIds.target, undefined, {});
1916
+ if (config.WithAct) {
1917
+ await this.publishId(config.HumidifierIds.act, undefined, {});
1918
+ }
1919
+ // Subscribe state for onStatechange mathode
1920
+ await this.adapter.subscribeForeignStatesAsync(config.HumidifierIds.onOff);
1921
+ await this.adapter.subscribeForeignStatesAsync(config.HumidifierIds.target);
1922
+ if (config.WithAct) {
1923
+ await this.adapter.subscribeForeignStatesAsync(config.HumidifierIds.act);
1924
+ }
1925
+ }, 1000);
1926
+ } catch (error) {
1927
+ this.adapter.log.error(`error at ${activeFunction}: ${error}`);
1928
+ }
1929
+ }
1930
+
1931
+ /*********************************************************************
1932
+ * *************** generate Foreign Climate Ids **********************
1933
+ * ******************************************************************/
1934
+
1935
+ /**
1936
+ * @param config Configuration of the climate entity, wich is to genereate
1937
+ */
1938
+ async generateForeignHumidifierIds(config) {
1939
+ const activeFunction = 'generateForeignHumidifierIds';
1940
+ this.adapter.log.debug(`Function ${activeFunction} started.`);
1941
+ try {
1942
+ const HumidifierIds = { onOff: '', target: '', act: '' };
1943
+ HumidifierIds.onOff = config.OnOffId;
1944
+ HumidifierIds.target = config.TargetId;
1945
+ HumidifierIds.act = config.ActId;
1946
+ for (const id of Object.values(HumidifierIds)) {
1947
+ // Just lock to object, if it does not end with Virtual Mode
1948
+ if (!id.endsWith(this.EndingVirtualMode)) {
1949
+ if (!(await this.adapter.getForeignObjectAsync(id))) {
1950
+ this.adapter.log.debug(`Id: ${id} does not exsit.`);
1951
+ return false;
1952
+ }
1953
+ }
1954
+ }
1955
+ if (config.HumidifierName === '') {
1956
+ this.adapter.log.debug(`Humidifier name is empty`);
1957
+ return false;
1958
+ }
1959
+ const indexOfSpace = config.HumidifierName.indexOf(' -- ');
1960
+ if (indexOfSpace > 0) {
1961
+ config.HumidifierName = config.HumidifierName.substring(0, indexOfSpace);
1962
+ }
1963
+ config.HumidifierIds = HumidifierIds;
1964
+ return true;
1965
+ } catch (error) {
1966
+ this.adapter.log.error(`error at ${activeFunction}: ${error}`);
1967
+ }
1968
+ }
1969
+
1739
1970
  /**
1740
1971
  * get Foreign states for Bridge
1741
1972
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.17.13",
3
+ "version": "1.17.14",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",