iobroker.lorawan 1.18.0 → 1.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/admin/i18n/de/translations.json +1 -0
- package/admin/i18n/en/translations.json +1 -0
- package/admin/i18n/es/translations.json +1 -0
- package/admin/i18n/fr/translations.json +1 -0
- package/admin/i18n/it/translations.json +1 -0
- package/admin/i18n/nl/translations.json +1 -0
- package/admin/i18n/pl/translations.json +1 -0
- package/admin/i18n/pt/translations.json +1 -0
- package/admin/i18n/ru/translations.json +1 -0
- package/admin/i18n/uk/translations.json +1 -0
- package/admin/i18n/zh-cn/translations.json +1 -0
- package/admin/jsonConfig.json +2 -1
- package/io-package.json +28 -28
- package/lib/modules/bridge.js +30 -25
- package/lib/modules/bridgeMqttclient.js +1 -1
- package/lib/modules/directorieshandler.js +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -23,6 +23,14 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
|
|
|
23
23
|
Placeholder for the next version (at the beginning of the line):
|
|
24
24
|
### **WORK IN PROGRESS**
|
|
25
25
|
-->
|
|
26
|
+
### 1.18.2 (2025-11-04)
|
|
27
|
+
* (BenAhrdt) Change Topicformat from device_state to device/state
|
|
28
|
+
|
|
29
|
+
### 1.18.1 (2025-11-03)
|
|
30
|
+
* (BenAhrdt) Add Bridge Type Smarthome
|
|
31
|
+
* (BenAhrdt) Bugfix subscribed Topics
|
|
32
|
+
* (BenAhrdt) Bugfix on case of objectid starts with '.'
|
|
33
|
+
|
|
26
34
|
### 1.18.0 (2025-10-19)
|
|
27
35
|
* (BenAhrdt) New NPM Auorisation
|
|
28
36
|
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Bridge Typ",
|
|
23
23
|
"BridgeTypeHA": "Home Assistant",
|
|
24
24
|
"BridgeTypeOff": "aus",
|
|
25
|
+
"BridgeTypeSH": "Smart Home",
|
|
25
26
|
"BridgeTypeTooltip": "Wählen Sie den Typ des Fremdsystems aus",
|
|
26
27
|
"BridgenotificationActivation": "Benachrichtigungsaktivierung",
|
|
27
28
|
"BridgenotificationTooltip": "Aktivieren oder deaktivieren Sie die Benachrichtigung",
|
|
@@ -127,6 +127,7 @@
|
|
|
127
127
|
"BridgeTypeTooltip": "Select the Type of the foreign System",
|
|
128
128
|
"BridgeTypeOff": "off",
|
|
129
129
|
"BridgeTypeHA": "Home Assistant",
|
|
130
|
+
"BridgeTypeSH": "Smart Home",
|
|
130
131
|
"RefreshDiscoveryCronJob": "Discover Cycle",
|
|
131
132
|
"RefreshDiscoveryCronJobTooltip": "insert the cronjob for refreshing the discovery",
|
|
132
133
|
"ClimateHeader": "Define States for Climate Entity",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Tipo de puente",
|
|
23
23
|
"BridgeTypeHA": "Asistente de casa",
|
|
24
24
|
"BridgeTypeOff": "apagado",
|
|
25
|
+
"BridgeTypeSH": "Hogar inteligente",
|
|
25
26
|
"BridgeTypeTooltip": "Seleccione el tipo de sistema extranjero",
|
|
26
27
|
"BridgenotificationActivation": "activación de notificación",
|
|
27
28
|
"BridgenotificationTooltip": "activar o desactivar la notificación",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Type de pont",
|
|
23
23
|
"BridgeTypeHA": "Assistant à domicile",
|
|
24
24
|
"BridgeTypeOff": "désactivé",
|
|
25
|
+
"BridgeTypeSH": "Maison intelligente",
|
|
25
26
|
"BridgeTypeTooltip": "Sélectionnez le type de système étranger",
|
|
26
27
|
"BridgenotificationActivation": "activation de la notification",
|
|
27
28
|
"BridgenotificationTooltip": "activer ou désactiver la notification",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Tipo di ponte",
|
|
23
23
|
"BridgeTypeHA": "Assistente di casa",
|
|
24
24
|
"BridgeTypeOff": "spento",
|
|
25
|
+
"BridgeTypeSH": "Casa intelligente",
|
|
25
26
|
"BridgeTypeTooltip": "Seleziona il tipo di sistema estero",
|
|
26
27
|
"BridgenotificationActivation": "Attivazione della notifica",
|
|
27
28
|
"BridgenotificationTooltip": "attivare o disattivare la notifica",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Brug -type",
|
|
23
23
|
"BridgeTypeHA": "Thuisassistent",
|
|
24
24
|
"BridgeTypeOff": "uit",
|
|
25
|
+
"BridgeTypeSH": "Slim huis",
|
|
25
26
|
"BridgeTypeTooltip": "Selecteer het type buitenlandse systeem",
|
|
26
27
|
"BridgenotificationActivation": "Activering van melding",
|
|
27
28
|
"BridgenotificationTooltip": "de melding activeren of deactiveren",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Typ mostu",
|
|
23
23
|
"BridgeTypeHA": "Asystent domu",
|
|
24
24
|
"BridgeTypeOff": "wyłączony",
|
|
25
|
+
"BridgeTypeSH": "Inteligentny dom",
|
|
25
26
|
"BridgeTypeTooltip": "Wybierz rodzaj systemu zagranicznego",
|
|
26
27
|
"BridgenotificationActivation": "Aktywacja powiadomienia",
|
|
27
28
|
"BridgenotificationTooltip": "aktywuj lub dezaktywuj powiadomienie",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Tipo de ponte",
|
|
23
23
|
"BridgeTypeHA": "Assistente de casa",
|
|
24
24
|
"BridgeTypeOff": "desligado",
|
|
25
|
+
"BridgeTypeSH": "Casa inteligente",
|
|
25
26
|
"BridgeTypeTooltip": "Selecione o tipo do sistema estranho",
|
|
26
27
|
"BridgenotificationActivation": "Ativação de notificação",
|
|
27
28
|
"BridgenotificationTooltip": "ativar ou desativar a notificação",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Тип моста",
|
|
23
23
|
"BridgeTypeHA": "Домашний помощник",
|
|
24
24
|
"BridgeTypeOff": "выключенный",
|
|
25
|
+
"BridgeTypeSH": "Умный дом",
|
|
25
26
|
"BridgeTypeTooltip": "Выберите тип иностранной системы",
|
|
26
27
|
"BridgenotificationActivation": "активация уведомления",
|
|
27
28
|
"BridgenotificationTooltip": "активировать или деактивировать уведомление",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"BridgeType": "Тип мосту",
|
|
23
23
|
"BridgeTypeHA": "Домашній помічник",
|
|
24
24
|
"BridgeTypeOff": "не вистачати",
|
|
25
|
+
"BridgeTypeSH": "Розумний будинок",
|
|
25
26
|
"BridgeTypeTooltip": "Виберіть тип іноземної системи",
|
|
26
27
|
"BridgenotificationActivation": "Активація сповіщень",
|
|
27
28
|
"BridgenotificationTooltip": "активуйте або деактивувати повідомлення",
|
package/admin/jsonConfig.json
CHANGED
|
@@ -750,7 +750,8 @@
|
|
|
750
750
|
"tooltip": "BridgeTypeTooltip",
|
|
751
751
|
"options": [
|
|
752
752
|
{"label":"BridgeTypeOff","value":"off"},
|
|
753
|
-
{"label":"BridgeTypeHA","value":"HA"}
|
|
753
|
+
{"label":"BridgeTypeHA","value":"HA"},
|
|
754
|
+
{"label":"BridgeTypeSH","value":"SH"}
|
|
754
755
|
],
|
|
755
756
|
"default": "off",
|
|
756
757
|
"xs": 12,
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.2",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.18.2": {
|
|
7
|
+
"en": "Change Topicformat from device_state to device/state",
|
|
8
|
+
"de": "Topicformat von device_state zu device/state ändern",
|
|
9
|
+
"ru": "Изменить Тематический формат с device_state на device/state",
|
|
10
|
+
"pt": "Alterar o formato do tópico do dispositivo_ estado para o dispositivo/estado",
|
|
11
|
+
"nl": "Topicformat van device_state naar apparaat/staat wijzigen",
|
|
12
|
+
"fr": "Changer le format du sujet de device_state vers device/state",
|
|
13
|
+
"it": "Cambia formato di argomento da dispositivo_stato a dispositivo/stato",
|
|
14
|
+
"es": "Cambiar Topicformat de dispositivo_state a dispositivo/estado",
|
|
15
|
+
"pl": "Zmień format tematu z urządzenia _ state na urządzenie / stan",
|
|
16
|
+
"uk": "Зміна Themeformat від device_state до пристрою/state",
|
|
17
|
+
"zh-cn": "将主题格式从设备_状态更改为设备/状态"
|
|
18
|
+
},
|
|
19
|
+
"1.18.1": {
|
|
20
|
+
"en": "Add Bridge Type Smarthome\nBugfix subscribed Topics\nBugfix on case of objectid starts with '.'",
|
|
21
|
+
"de": "Bridge Type Smarthome hinzufügen\nBugfix abonniert Themen\nBugfix auf Fall von objectid beginnt mit '. '",
|
|
22
|
+
"ru": "Обновление Bridge Type Smarthome\nBugfix подписался на Topics\nБагфикс на случай объектидов начинается с '. \"",
|
|
23
|
+
"pt": "Adicionar tipo de ponte Smarthome\nTópicos subscritos por Bugfix\nBugfix no caso do objeto começa com '. '",
|
|
24
|
+
"nl": "Brugtype Smarthome toevoegen\nBugfix-geabonneerde onderwerpen\nBugfix op geval objectid begint met '. '",
|
|
25
|
+
"fr": "Ajouter le type de pont Smarthome\nSujets souscrits Bugfix\nBugfix sur le cas de l'objet commence par '. '",
|
|
26
|
+
"it": "Aggiungi Bridge Type Smarthome\nBugfix sottoscritto Argomenti\nBugfix su caso di oggetto inizia con '. '",
|
|
27
|
+
"es": "Agregar Bridge Type Smarthome\nBugfix suscrito Temas\nBugfix en caso de objetado comienza con '. '",
|
|
28
|
+
"pl": "Dodaj typ mostu Smarthome\nBugfix subskrybowane tematy\nBugfix w przypadku obiektów zaczyna się od \". '",
|
|
29
|
+
"uk": "Додати Bridge Type Smarthome\nВиправлено помилку\nВиправлення помилок при об'єктиві починається з '. Р",
|
|
30
|
+
"zh-cn": "添加桥型 Smarthome\nBugfix 已订阅主题\n对象大小写上的错误fix 开始于 。 '"
|
|
31
|
+
},
|
|
6
32
|
"1.18.0": {
|
|
7
33
|
"en": "New NPM Auorisation",
|
|
8
34
|
"de": "Neue NPM-Versteigerung",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "przynieść state _ off temat do nawilżacza",
|
|
68
94
|
"uk": "принести стан_вимкнути тему для зволоження",
|
|
69
95
|
"zh-cn": "将状态切换为潮湿器"
|
|
70
|
-
},
|
|
71
|
-
"1.17.15": {
|
|
72
|
-
"en": "notifi new discover in case of oldDiscoveredDevices\nbugfix debug logging",
|
|
73
|
-
"de": "notifi neu entdecken bei oldDiscoveredDevices\nbugfix debug protokollierung",
|
|
74
|
-
"ru": "уведомить новое открытие в случае старых обнаруженных устройств\nрегистрация отладчиков",
|
|
75
|
-
"pt": "notifi nova descoberta no caso de dispositivos antigosdescoberta\nregistro de depuração de bugfix",
|
|
76
|
-
"nl": "notifi nieuwe ontdekking in het geval van oudeDiscoverdDevices\nbugfix debug logging",
|
|
77
|
-
"fr": "notifi nouveau découverte en cas d'ancienDiscoveredDevices\nbugfix debug loging",
|
|
78
|
-
"it": "notifi nuova scoperta in caso di vecchiDiscoveredDevices\nbugfix debug logging",
|
|
79
|
-
"es": "notifi new discover in case of oldDiscoveredDevices\nbugfix debug logging",
|
|
80
|
-
"pl": "notifi nowe odkrycie w przypadku old DiscoveredDevices\nlogowanie debugfix",
|
|
81
|
-
"uk": "неідентифікувати нове відкриття у разі виникнення застарілих\nзареєструватися",
|
|
82
|
-
"zh-cn": "旧发现器的新发现\n调试日志"
|
|
83
|
-
},
|
|
84
|
-
"1.17.14": {
|
|
85
|
-
"en": "add humidifier to foreign States",
|
|
86
|
-
"de": "fügen Sie Befeuchter für ausländische Staaten hinzu",
|
|
87
|
-
"ru": "добавить увлажнитель воздуха в иностранные государства",
|
|
88
|
-
"pt": "adicionar umidificador a estados estrangeiros",
|
|
89
|
-
"nl": "luchtbevochtiger toevoegen aan buitenlandse staten",
|
|
90
|
-
"fr": "ajouter l'humidificateur aux États étrangers",
|
|
91
|
-
"it": "aggiungere umidificatore agli Stati esteri",
|
|
92
|
-
"es": "añadir humidificador a Estados extranjeros",
|
|
93
|
-
"pl": "dodać nawilżacz do obcych państw",
|
|
94
|
-
"uk": "додати зволожувач до іноземних держав",
|
|
95
|
-
"zh-cn": "向外国添加增湿剂"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
"password": "",
|
|
411
411
|
"ssl": true,
|
|
412
412
|
"origin": "ttn",
|
|
413
|
-
"notificationActivation": "allNotifications,
|
|
413
|
+
"notificationActivation": "allNotifications, bridgeConnection, newDiscover, deviceState",
|
|
414
414
|
"downlinkConfig": [],
|
|
415
415
|
"customDecodedJsonActive": false,
|
|
416
416
|
"customConfigurationJsonActive": false,
|
package/lib/modules/bridge.js
CHANGED
|
@@ -29,6 +29,7 @@ class bridgeClass {
|
|
|
29
29
|
this.Notifications = {};
|
|
30
30
|
this.BridgeDiscoveryPrefix = {
|
|
31
31
|
HA: 'homeassistant/',
|
|
32
|
+
SH: 'smarthome/',
|
|
32
33
|
};
|
|
33
34
|
this.ForeignBridgeMembers = {};
|
|
34
35
|
this.MinTime = 100; // ms between publish and subscribe same value
|
|
@@ -220,7 +221,7 @@ class bridgeClass {
|
|
|
220
221
|
} else {
|
|
221
222
|
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].id, message);
|
|
222
223
|
}
|
|
223
|
-
await this.adapter.setState('info.subscribedTopics', JSON.stringify(this.
|
|
224
|
+
await this.adapter.setState('info.subscribedTopics', JSON.stringify(this.SubscribedTopics), true);
|
|
224
225
|
} else {
|
|
225
226
|
this.adapter.log.debug(`The received Topic ${topic} is not subscribed`);
|
|
226
227
|
}
|
|
@@ -370,7 +371,7 @@ class bridgeClass {
|
|
|
370
371
|
);
|
|
371
372
|
target.normalizedDeficeIdentifier = this.normalizeString(target.DeviceIdentifier);
|
|
372
373
|
target.uniqueString = await this.getUniqueString(config.climateIds.target, target.DeviceIdentifier);
|
|
373
|
-
target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString}`.toLowerCase();
|
|
374
|
+
target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString?.path}`.toLowerCase();
|
|
374
375
|
|
|
375
376
|
//Min und Max holen
|
|
376
377
|
const targetObject = await this.adapter.getObjectAsync(config.climateIds.target);
|
|
@@ -390,7 +391,7 @@ class bridgeClass {
|
|
|
390
391
|
);
|
|
391
392
|
act.normalizedDeficeIndetifier = this.normalizeString(act.DeviceIdentifier);
|
|
392
393
|
act.uniqueString = await this.getUniqueString(config.climateIds.act, act.DeviceIdentifier);
|
|
393
|
-
act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString}`.toLowerCase();
|
|
394
|
+
act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString?.path}`.toLowerCase();
|
|
394
395
|
|
|
395
396
|
// Mode
|
|
396
397
|
const mode = {};
|
|
@@ -401,19 +402,19 @@ class bridgeClass {
|
|
|
401
402
|
);
|
|
402
403
|
mode.normalizedDeviceIdentifier = this.normalizeString(mode.DeviceIdentifier);
|
|
403
404
|
mode.uniqueString = await this.getUniqueString(config.climateIds.mode, mode.DeviceIdentifier);
|
|
404
|
-
mode.Topic = `${this.bridgeMqttClient.BridgePrefix}${mode.uniqueString}`.toLowerCase();
|
|
405
|
+
mode.Topic = `${this.bridgeMqttClient.BridgePrefix}${mode.uniqueString?.path}`.toLowerCase();
|
|
405
406
|
|
|
406
|
-
const
|
|
407
|
+
const climateUniqueString = await this.getUniqueString(
|
|
407
408
|
`${this.adapter.namespace}.${config.ClimateName}`,
|
|
408
409
|
target.DeviceIdentifier,
|
|
409
410
|
);
|
|
410
411
|
const DiscoveryTopic =
|
|
411
|
-
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${
|
|
412
|
+
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${climateUniqueString?.path}/config`.toLowerCase();
|
|
412
413
|
const indexLastDotTarget = config.climateIds.target.lastIndexOf('.');
|
|
413
414
|
const Id = config.climateIds.target.substring(0, indexLastDotTarget) + this.EndingVirtualClimate;
|
|
414
415
|
const DiscoveryPayload = {
|
|
415
416
|
name: config.ClimateName,
|
|
416
|
-
unique_id: `${
|
|
417
|
+
unique_id: `${climateUniqueString?.flat}`.toLowerCase(),
|
|
417
418
|
device: {
|
|
418
419
|
identifiers: [target.normalizedDeficeIdentifier.toLowerCase()],
|
|
419
420
|
name: target.DeviceIdentifier,
|
|
@@ -915,12 +916,12 @@ class bridgeClass {
|
|
|
915
916
|
`${this.adapter.namespace}.${changeInfo.id}`,
|
|
916
917
|
DeviceIdentifier,
|
|
917
918
|
);
|
|
918
|
-
const Topic = `${this.bridgeMqttClient.BridgePrefix}${uniqueString}`.toLowerCase();
|
|
919
|
+
const Topic = `${this.bridgeMqttClient.BridgePrefix}${uniqueString?.path}`.toLowerCase();
|
|
919
920
|
|
|
920
921
|
const EntityType = await this.getEntityType(options);
|
|
921
922
|
const AdditionalAttributes = await this.getStateAttributes(options.common, EntityType);
|
|
922
923
|
const DiscoveryTopic =
|
|
923
|
-
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${uniqueString}/config`.toLowerCase();
|
|
924
|
+
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${uniqueString?.path}/config`.toLowerCase();
|
|
924
925
|
const DiscoveryPayload = {
|
|
925
926
|
name: StateName,
|
|
926
927
|
unique_id: `${normalizedDeviceIdentifier}_${normalizedStateName}`.toLowerCase(),
|
|
@@ -1572,7 +1573,7 @@ class bridgeClass {
|
|
|
1572
1573
|
const target = {};
|
|
1573
1574
|
target.DeviceIdentifier = (await this.getParentNameing(config.climateIds.target))?.parentName;
|
|
1574
1575
|
target.uniqueString = await this.getUniqueString(config.climateIds.target, target.DeviceIdentifier);
|
|
1575
|
-
target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString}`.toLowerCase();
|
|
1576
|
+
target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString?.path}`.toLowerCase();
|
|
1576
1577
|
|
|
1577
1578
|
//Min und Max holen
|
|
1578
1579
|
const targetObject = await this.adapter.getForeignObjectAsync(config.climateIds.target);
|
|
@@ -1587,26 +1588,26 @@ class bridgeClass {
|
|
|
1587
1588
|
const act = {};
|
|
1588
1589
|
act.DeviceIdentifier = (await this.getParentNameing(config.climateIds.act))?.parentName;
|
|
1589
1590
|
act.uniqueString = await this.getUniqueString(config.climateIds.act, act.DeviceIdentifier);
|
|
1590
|
-
act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString}`.toLowerCase();
|
|
1591
|
+
act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString?.path}`.toLowerCase();
|
|
1591
1592
|
|
|
1592
1593
|
// Mode
|
|
1593
1594
|
const mode = {};
|
|
1594
1595
|
mode.DeviceIdentifier = (await this.getParentNameing(config.climateIds.mode))?.parentName;
|
|
1595
1596
|
mode.uniqueString = await this.getUniqueString(config.climateIds.mode, mode.DeviceIdentifier);
|
|
1596
|
-
mode.Topic = `${this.bridgeMqttClient.BridgePrefix}${mode.uniqueString}`.toLowerCase();
|
|
1597
|
+
mode.Topic = `${this.bridgeMqttClient.BridgePrefix}${mode.uniqueString?.path}`.toLowerCase();
|
|
1597
1598
|
|
|
1598
|
-
const
|
|
1599
|
+
const climateUniqueString = await this.getUniqueString(
|
|
1599
1600
|
`${this.adapter.namespace}.${config.ClimateName}`,
|
|
1600
1601
|
target.DeviceIdentifier,
|
|
1601
1602
|
);
|
|
1602
1603
|
const DiscoveryTopic =
|
|
1603
|
-
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${
|
|
1604
|
+
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${climateUniqueString?.path}/config`.toLowerCase();
|
|
1604
1605
|
const indexLastDotTarget = config.climateIds.target.lastIndexOf('.');
|
|
1605
1606
|
const Id = config.climateIds.target.substring(0, indexLastDotTarget) + this.EndingVirtualClimate;
|
|
1606
1607
|
|
|
1607
1608
|
const DiscoveryPayload = {
|
|
1608
1609
|
name: config.ClimateName,
|
|
1609
|
-
unique_id: `${
|
|
1610
|
+
unique_id: `${climateUniqueString?.flat}`.toLowerCase(),
|
|
1610
1611
|
device: {
|
|
1611
1612
|
identifiers: [this.normalizeString(target.DeviceIdentifier).toLowerCase()],
|
|
1612
1613
|
name: target.DeviceIdentifier,
|
|
@@ -1800,13 +1801,13 @@ class bridgeClass {
|
|
|
1800
1801
|
const onOff = {};
|
|
1801
1802
|
onOff.DeviceIdentifier = (await this.getParentNameing(config.HumidifierIds.onOff))?.parentName;
|
|
1802
1803
|
onOff.uniqueString = await this.getUniqueString(config.HumidifierIds.onOff, onOff.DeviceIdentifier);
|
|
1803
|
-
onOff.Topic = `${this.bridgeMqttClient.BridgePrefix}${onOff.uniqueString}`.toLowerCase();
|
|
1804
|
+
onOff.Topic = `${this.bridgeMqttClient.BridgePrefix}${onOff.uniqueString?.path}`.toLowerCase();
|
|
1804
1805
|
|
|
1805
1806
|
// Target
|
|
1806
1807
|
const target = {};
|
|
1807
1808
|
target.DeviceIdentifier = (await this.getParentNameing(config.HumidifierIds.target))?.parentName;
|
|
1808
1809
|
target.uniqueString = await this.getUniqueString(config.HumidifierIds.target, target.DeviceIdentifier);
|
|
1809
|
-
target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString}`.toLowerCase();
|
|
1810
|
+
target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString?.path}`.toLowerCase();
|
|
1810
1811
|
|
|
1811
1812
|
//Min und Max holen
|
|
1812
1813
|
const targetObject = await this.adapter.getForeignObjectAsync(config.HumidifierIds.target);
|
|
@@ -1821,21 +1822,21 @@ class bridgeClass {
|
|
|
1821
1822
|
const act = {};
|
|
1822
1823
|
act.DeviceIdentifier = (await this.getParentNameing(config.HumidifierIds.act))?.parentName;
|
|
1823
1824
|
act.uniqueString = await this.getUniqueString(config.HumidifierIds.act, act.DeviceIdentifier);
|
|
1824
|
-
act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString}`.toLowerCase();
|
|
1825
|
+
act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString?.path}`.toLowerCase();
|
|
1825
1826
|
|
|
1826
|
-
const
|
|
1827
|
+
const humidifierUniqueString = await this.getUniqueString(
|
|
1827
1828
|
`${this.adapter.namespace}.${config.HumidifierName}`,
|
|
1828
1829
|
target.DeviceIdentifier,
|
|
1829
1830
|
);
|
|
1830
1831
|
const entityType = config.Humidifier ? this.HumidifierEntityType : this.DeHumidifierEntityType;
|
|
1831
1832
|
const DiscoveryTopic =
|
|
1832
|
-
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.HumidifierEntityType}/${
|
|
1833
|
+
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.HumidifierEntityType}/${humidifierUniqueString?.path}/config`.toLowerCase();
|
|
1833
1834
|
const indexLastDotTarget = config.HumidifierIds.target.lastIndexOf('.');
|
|
1834
1835
|
const Id = config.HumidifierIds.target.substring(0, indexLastDotTarget) + this.EndingVirtualHumidifier;
|
|
1835
1836
|
|
|
1836
1837
|
const DiscoveryPayload = {
|
|
1837
1838
|
name: config.HumidifierName,
|
|
1838
|
-
unique_id: `${
|
|
1839
|
+
unique_id: `${humidifierUniqueString?.flat}`.toLowerCase(),
|
|
1839
1840
|
device: {
|
|
1840
1841
|
identifiers: [this.normalizeString(target.DeviceIdentifier).toLowerCase()],
|
|
1841
1842
|
name: target.DeviceIdentifier,
|
|
@@ -2137,16 +2138,16 @@ class bridgeClass {
|
|
|
2137
2138
|
const uniqueString = await this.getUniqueString(id, deviceIdentifier);
|
|
2138
2139
|
/*const topic =
|
|
2139
2140
|
`${this.bridgeMqttClient.BridgePrefix}${normalizedDeviceIdentifier}/${normalizedStateName}`.toLowerCase();*/
|
|
2140
|
-
const topic = `${this.bridgeMqttClient.BridgePrefix}${uniqueString}`.toLowerCase();
|
|
2141
|
+
const topic = `${this.bridgeMqttClient.BridgePrefix}${uniqueString?.path}`.toLowerCase();
|
|
2141
2142
|
const EntityType = await this.getEntityType(options);
|
|
2142
2143
|
const AdditionalAttributes = await this.getStateAttributes(options.common, EntityType);
|
|
2143
2144
|
/*const discoveryTopic =
|
|
2144
2145
|
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${normalizedDeviceIdentifier}/${normalizedStateName}/config`.toLowerCase();*/
|
|
2145
2146
|
const discoveryTopic =
|
|
2146
|
-
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${uniqueString}/config`.toLowerCase();
|
|
2147
|
+
`${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${uniqueString?.path}/config`.toLowerCase();
|
|
2147
2148
|
const discoveryPayload = {
|
|
2148
2149
|
name: statename,
|
|
2149
|
-
unique_id: `${uniqueString}`.toLowerCase(),
|
|
2150
|
+
unique_id: `${uniqueString?.flat}`.toLowerCase(),
|
|
2150
2151
|
device: { identifiers: [normalizedDeviceIdentifier.toLowerCase()], name: deviceIdentifier },
|
|
2151
2152
|
};
|
|
2152
2153
|
// Add Topics
|
|
@@ -2210,7 +2211,11 @@ class bridgeClass {
|
|
|
2210
2211
|
const activeFunction = 'bridge.js - getUniqueString';
|
|
2211
2212
|
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
2212
2213
|
try {
|
|
2213
|
-
|
|
2214
|
+
const unique = {
|
|
2215
|
+
flat: `${this.normalizeString(deviceidentifier)}_${this.normalizeString(id)}`,
|
|
2216
|
+
path: `${this.normalizeString(deviceidentifier)}/${this.normalizeString(id)}`,
|
|
2217
|
+
};
|
|
2218
|
+
return unique;
|
|
2214
2219
|
} catch (error) {
|
|
2215
2220
|
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
2216
2221
|
}
|
|
@@ -131,7 +131,7 @@ class bridgeMqttClientClass {
|
|
|
131
131
|
*/
|
|
132
132
|
getSubscribtionArray() {
|
|
133
133
|
// Subscribe to the ending of set (with different counts of sublevels 2 -10)
|
|
134
|
-
return [`${this.BridgePrefix}+/set`];
|
|
134
|
+
return [`${this.BridgePrefix}+/set`, `${this.BridgePrefix}+/+/set`];
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -448,7 +448,7 @@ class directorieshandlerClass {
|
|
|
448
448
|
|
|
449
449
|
// Check for id dont starts with "."
|
|
450
450
|
if (objectId.indexOf('.') === 0) {
|
|
451
|
-
objectId.substring(1, objectId.length);
|
|
451
|
+
objectId = objectId.substring(1, objectId.length);
|
|
452
452
|
}
|
|
453
453
|
// Check for an assign definition (calculation and / or role assignment)
|
|
454
454
|
if (this.assigns[elementName] && !options?.dontAssign) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.lorawan",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.2",
|
|
4
4
|
"description": "converts the desired lora gateway data to a ioBroker structure",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "BenAhrdt",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
"node-schedule": "^2.1.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@alcalzone/release-script": "^
|
|
36
|
-
"@alcalzone/release-script-plugin-iobroker": "^
|
|
37
|
-
"@alcalzone/release-script-plugin-license": "^
|
|
38
|
-
"@alcalzone/release-script-plugin-manual-review": "^
|
|
35
|
+
"@alcalzone/release-script": "^5.0.0",
|
|
36
|
+
"@alcalzone/release-script-plugin-iobroker": "^4.0.0",
|
|
37
|
+
"@alcalzone/release-script-plugin-license": "^4.0.0",
|
|
38
|
+
"@alcalzone/release-script-plugin-manual-review": "^4.0.0",
|
|
39
39
|
"@iobroker/adapter-dev": "^1.5.0",
|
|
40
40
|
"@iobroker/eslint-config": "^2.2.0",
|
|
41
41
|
"@iobroker/testing": "^5.1.1",
|
|
42
42
|
"@tsconfig/node20": "^20.1.6",
|
|
43
43
|
"@types/lodash": "^4.17.20",
|
|
44
|
-
"@types/node": "^24.
|
|
44
|
+
"@types/node": "^24.9.2",
|
|
45
45
|
"typescript": "~5.9.3"
|
|
46
46
|
},
|
|
47
47
|
"main": "main.js",
|