iobroker.lorawan 1.17.8 → 1.17.10

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.10 (2025-09-23)
27
+ * (BenAhrdt) Update topics und qnique ids
28
+
29
+ ### 1.17.9 (2025-09-20)
30
+ * (BenAhrdt) setdefault defiveidentifier for lorawan bridge function to used Device Id
31
+
26
32
  ### 1.17.8 (2025-09-20)
27
33
  * (BenAhrdt) normalize [] () & {} into _
28
34
 
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Nicht vorhanden (virtuell)",
146
146
  "BridgenotificationActivation": "Benachrichtigungsaktivierung",
147
147
  "BridgenotificationTooltip": "Aktivieren oder deaktivieren Sie die Benachrichtigung",
148
- "BridgeDevicenotificationActivation": "Gerätebenachrichtigungsaktivierung",
149
- "BridgeDevicenotificationTooltip": "Aktivieren oder deaktivieren Sie die Benachrichtigung für Geräte",
150
148
  "all notifications": "Alle Benachrichtigungen",
151
149
  "bridge connection": "Verbindungsbenachrichtigungen",
152
150
  "new discover": "Discover Benachrichtigungen",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Not Present (Virtual)",
146
146
  "BridgenotificationActivation": "notification activation",
147
147
  "BridgenotificationTooltip": "activate or deactivate the notification",
148
- "BridgeDevicenotificationActivation": "device notification activation",
149
- "BridgeDevicenotificationTooltip": "activate or deactivate the notification for devices",
150
148
  "all notifications": "all notifications",
151
149
  "bridge connection": "connection notifications",
152
150
  "new discover": "discover notifications",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* No presente (virtual)",
146
146
  "BridgenotificationActivation": "activación de notificación",
147
147
  "BridgenotificationTooltip": "activar o desactivar la notificación",
148
- "BridgeDevicenotificationActivation": "activación de notificación del dispositivo",
149
- "BridgeDevicenotificationTooltip": "activar o desactivar la notificación de dispositivos",
150
148
  "all notifications": "Todas las notificaciones",
151
149
  "bridge connection": "Notificaciones de conexión",
152
150
  "new discover": "Descubrir notificaciones",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "Puente extranjero",
172
170
  "BridgeForeignConfigHeader": "Configuración para los estados extranjeros",
173
171
  "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",
172
+ "BridgeForeignHeader": "Seleccione el puente enum",
173
+ "_BridgeEnumDiscription": "Seleccione un enum que se use 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
174
  "ClimateForeignHeader": "Definir estados para la entidad climática",
177
175
  "ClimateForeignInformation": "Aquí puedes definir una variedad de definiciones climáticas",
178
176
  "VirtualMode": "Modo virtual",
@@ -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": "Insérez le nom du type de périphérique, cette configuration est valide. (par exemple, Dragino Xy correspond également à Dragino)",
54
+ "deviceTypeTooltip": "insert the name of the device type, this config is valid. (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": "Ajouter un objet personnalisé spécifique à chaque état décodé",
80
+ "customConfigHeader": "Ajoutez 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. Vous pouvez sélectionner plusieurs identificateurs d'appareils, séparés par le séparateur.",
115
+ "_DeviceIdentifierDiscription": "Configurez les identifiants pour créer un sujet MQTT pour un état. You can select multiple device identifiers, separated by the separator.",
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",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Pas présent (virtuel)",
146
146
  "BridgenotificationActivation": "activation de la notification",
147
147
  "BridgenotificationTooltip": "activer ou désactiver la notification",
148
- "BridgeDevicenotificationActivation": "Activation de la notification de l'appareil",
149
- "BridgeDevicenotificationTooltip": "activer ou désactiver la notification des appareils",
150
148
  "all notifications": "Toutes les notifications",
151
149
  "bridge connection": "Notifications de connexion",
152
150
  "new discover": "Découvrez les notifications",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "Pont à l'étranger",
172
170
  "BridgeForeignConfigHeader": "Paramètres pour les États étrangers",
173
171
  "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",
172
+ "BridgeForeignHeader": "Sélection de Bridge Enum",
173
+ "_BridgeEnumDiscription": "Sélectionnez une enum Tha est utilisée pour établir des é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
174
  "ClimateForeignHeader": "Définir les États de l'entité climatique",
177
175
  "ClimateForeignInformation": "Ici, vous pouvez définir un tableau de définitions climatiques",
178
176
  "VirtualMode": "Mode virtuel",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Non presente (virtuale)",
146
146
  "BridgenotificationActivation": "Attivazione della notifica",
147
147
  "BridgenotificationTooltip": "attivare o disattivare la notifica",
148
- "BridgeDevicenotificationActivation": "Attivazione della notifica del dispositivo",
149
- "BridgeDevicenotificationTooltip": "attivare o disattivare la notifica per i dispositivi",
150
148
  "all notifications": "tutte le notifiche",
151
149
  "bridge connection": "Notifiche di connessione",
152
150
  "new discover": "Scopri le notifiche",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "Ponte straniero",
172
170
  "BridgeForeignConfigHeader": "Impostazioni per gli stati stranieri",
173
171
  "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",
172
+ "BridgeForeignHeader": "Seleziona il ponte enum",
173
+ "_BridgeEnumDiscription": "Selezionare un enum tha viene utilizzato per l'impostazione degli stati nel ponte.\nIl nome del dispositivo sta seguendo queste priorità:\n1. Devicename\n2. CANALENAME\n3. Spazio dei nomi di stato",
176
174
  "ClimateForeignHeader": "Definire gli stati per l'entità climatica",
177
175
  "ClimateForeignInformation": "Qui puoi definire una serie di definizioni climatiche",
178
176
  "VirtualMode": "Modalità virtuale",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Niet aanwezig (virtueel)",
146
146
  "BridgenotificationActivation": "Activering van melding",
147
147
  "BridgenotificationTooltip": "de melding activeren of deactiveren",
148
- "BridgeDevicenotificationActivation": "Activering van apparaatmeldingen",
149
- "BridgeDevicenotificationTooltip": "de melding voor apparaten activeren of deactiveren",
150
148
  "all notifications": "Alle meldingen",
151
149
  "bridge connection": "Verbindingsmeldingen",
152
150
  "new discover": "Ontdek meldingen",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "Brug buitenlands",
172
170
  "BridgeForeignConfigHeader": "Instellingen voor de buitenlandse staten",
173
171
  "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",
172
+ "BridgeForeignHeader": "Selecteer van Bridge Enum",
173
+ "_BridgeEnumDiscription": "Selecteer 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
174
  "ClimateForeignHeader": "Definieer staten voor klimaat entiteit",
177
175
  "ClimateForeignInformation": "Hier kunt u een scala aan klimaatdefinities definiëren",
178
176
  "VirtualMode": "Virtuele modus",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Nie obecne (wirtualne)",
146
146
  "BridgenotificationActivation": "Aktywacja powiadomienia",
147
147
  "BridgenotificationTooltip": "aktywuj lub dezaktywuj powiadomienie",
148
- "BridgeDevicenotificationActivation": "Aktywacja powiadomienia urządzenia",
149
- "BridgeDevicenotificationTooltip": "aktywuj lub dezaktywuj powiadomienie o urządzeniach",
150
148
  "all notifications": "wszystkie powiadomienia",
151
149
  "bridge connection": "Powiadomienia połączeń",
152
150
  "new discover": "Odkryj powiadomienia",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "Most zagraniczny",
172
170
  "BridgeForeignConfigHeader": "Ustawienia dla obcych państw",
173
171
  "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",
172
+ "BridgeForeignHeader": "Wybierz Enum mostu",
173
+ "_BridgeEnumDiscription": "Wybierz enum THA służy 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
174
  "ClimateForeignHeader": "Zdefiniuj stany dla jednostki klimatycznej",
177
175
  "ClimateForeignInformation": "Tutaj możesz zdefiniować szereg definicji klimatycznych",
178
176
  "VirtualMode": "Tryb wirtualny",
@@ -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",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Não presente (virtual)",
146
146
  "BridgenotificationActivation": "Ativação de notificação",
147
147
  "BridgenotificationTooltip": "ativar ou desativar a notificação",
148
- "BridgeDevicenotificationActivation": "Ativação de notificação do dispositivo",
149
- "BridgeDevicenotificationTooltip": "ativar ou desativar a notificação para dispositivos",
150
148
  "all notifications": "todas as notificações",
151
149
  "bridge connection": "notificações de conexão",
152
150
  "new discover": "Descubra notificações",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "Ponte estrangeira",
172
170
  "BridgeForeignConfigHeader": "Configurações para os estados estrangeiros",
173
171
  "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",
172
+ "BridgeForeignHeader": "Selecione o enum da ponte",
173
+ "_BridgeEnumDiscription": "Selecione um enum tha é usado para definir estados na ponte.\nO nome do dispositivo está seguindo essas prioridades:\n1. DeviceName\n2. Nome do canal\n3. Namespace of State",
176
174
  "ClimateForeignHeader": "Definir estados para a entidade climática",
177
175
  "ClimateForeignInformation": "Aqui você pode definir uma variedade de definições climáticas",
178
176
  "VirtualMode": "Modo virtual",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Нет присутствующего (виртуально)",
146
146
  "BridgenotificationActivation": "активация уведомления",
147
147
  "BridgenotificationTooltip": "активировать или деактивировать уведомление",
148
- "BridgeDevicenotificationActivation": "Активация уведомления устройства",
149
- "BridgeDevicenotificationTooltip": "активировать или деактивировать уведомление для устройств",
150
148
  "all notifications": "все уведомления",
151
149
  "bridge connection": "Уведомления об соединении",
152
150
  "new discover": "Откройте для себя уведомления",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "Мост иностранный",
172
170
  "BridgeForeignConfigHeader": "Настройки для иностранных государств",
173
171
  "BridgeLoRaHeader": "Определение устройства Indetifier",
174
- "BridgeForeignHeader": "Определение мостового перечисления",
175
- "_BridgeEnumDiscription": "Определите enum THA, используется для положения состояний в мост.\nНазвание устройства следует этим приоритетам:\n1. DeviceName\n2. ChannelName\n3. Пространство государства имен",
172
+ "BridgeForeignHeader": "Выберите мостовой перевод",
173
+ "_BridgeEnumDiscription": "Выберите Enum THA, используется для установки состояний в мост.\nНазвание устройства следует этим приоритетам:\n1. DeviceName\n2. ChannelName\n3. Пространство государства имен",
176
174
  "ClimateForeignHeader": "Определить состояния для климатической сущности",
177
175
  "ClimateForeignInformation": "Здесь вы можете определить множество климатических определений",
178
176
  "VirtualMode": "Виртуальный режим",
@@ -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",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "* Немає (віртуальний)",
146
146
  "BridgenotificationActivation": "Активація сповіщень",
147
147
  "BridgenotificationTooltip": "активуйте або деактивувати повідомлення",
148
- "BridgeDevicenotificationActivation": "Активація сповіщень пристрою",
149
- "BridgeDevicenotificationTooltip": "Активуйте або деактивувати сповіщення про пристрої",
150
148
  "all notifications": "Всі сповіщення",
151
149
  "bridge connection": "Повідомлення про з'єднання",
152
150
  "new discover": "Відкрийте сповіщення",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "Міст іноземний",
172
170
  "BridgeForeignConfigHeader": "Налаштування іноземних держав",
173
171
  "BridgeLoRaHeader": "Визначення пристроюіндерифікатора",
174
- "BridgeForeignHeader": "Визначення мосту Enum",
175
- "_BridgeEnumDiscription": "Визначте Enum tha використовується для встановлення станів у міст.\nНазва пристрою виконує ці пріоритети:\n1.\n2.\n3. Державний простір імен",
172
+ "BridgeForeignHeader": "Вибір мосту Enum",
173
+ "_BridgeEnumDiscription": "Виберіть Enum Tha використовується для встановлення станів у міст.\nНазва пристрою виконує ці пріоритети:\n1.\n2.\n3. Державний простір імен",
176
174
  "ClimateForeignHeader": "Визначте стани клімату",
177
175
  "ClimateForeignInformation": "Тут ви можете визначити безліч визначення клімату",
178
176
  "VirtualMode": "Віртуальний режим",
@@ -119,7 +119,7 @@
119
119
  "subscribeTooltip": "从桥梁订阅州",
120
120
  "BridgeStateHeader": "定义发现主题的状态",
121
121
  "BridgeStateInformation": "在这里,您可以定义一系列状态,这些状态将设置为发现的主题。 (通配符也是可能的)",
122
- "Application": "应用",
122
+ "Application": "Application",
123
123
  "Device": "设备",
124
124
  "Folder": "文件夹",
125
125
  "State": "状态",
@@ -145,8 +145,6 @@
145
145
  "* Not Present (Virtual)": "*不存在(虚拟)",
146
146
  "BridgenotificationActivation": "通知激活",
147
147
  "BridgenotificationTooltip": "激活或停用通知",
148
- "BridgeDevicenotificationActivation": "设备通知激活",
149
- "BridgeDevicenotificationTooltip": "激活或停用设备的通知",
150
148
  "all notifications": "所有通知",
151
149
  "bridge connection": "连接通知",
152
150
  "new discover": "发现通知",
@@ -171,8 +169,8 @@
171
169
  "BridgeForeignPanel": "外国桥梁",
172
170
  "BridgeForeignConfigHeader": "外国的设置",
173
171
  "BridgeLoRaHeader": "设备Indetifier的定义",
174
- "BridgeForeignHeader": "桥梁枚举的定义",
175
- "_BridgeEnumDiscription": "定义枚举用于将状态设置为桥梁。\n该设备的名称遵循此优先级:\n1。devicename\n2。频道名称\n3。状态名称空间",
172
+ "BridgeForeignHeader": "选择桥梁枚举",
173
+ "_BridgeEnumDiscription": "选择一个枚举,用于将状态设置为桥梁。\n该设备的名称遵循此优先级:\n1。devicename\n2。频道名称\n3。状态名称空间",
176
174
  "ClimateForeignHeader": "定义气候实体的国家",
177
175
  "ClimateForeignInformation": "在这里您可以定义一系列气候定义",
178
176
  "VirtualMode": "虚拟模式",
@@ -804,23 +804,6 @@
804
804
  "lg": 3,
805
805
  "xl": 3
806
806
  },
807
- "BridgeDevicenotificationActivation":{
808
- "type": "select",
809
- "label": "BridgeDevicenotificationActivation",
810
- "hidden": "data.BridgeType === 'off'",
811
- "tooltip": "BridgeDevicenotificationActivationTooltip",
812
- "options": [
813
- {"label":"all notifications","value":"allNotifications, bridgeConnection, newDiscover, deviceState"},
814
- {"label":"device online offline","value":"deviceState"},
815
- {"label":"no notifications","value":"noNotifications"}
816
- ],
817
- "default": "allNotifications, bridgeConnection, newDiscover, deviceState",
818
- "xs": 12,
819
- "sm": 3,
820
- "md": 3,
821
- "lg": 3,
822
- "xl": 3
823
- },
824
807
  "_BridgeServersettingsHeader": {
825
808
  "newLine": true,
826
809
  "type": "header",
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.17.8",
4
+ "version": "1.17.10",
5
5
  "news": {
6
+ "1.17.10": {
7
+ "en": "Update topics und qnique ids",
8
+ "de": "Update-Themen und qnique ids",
9
+ "ru": "Обновление тем und qnique ids",
10
+ "pt": "Atualizar tópicos e IDs do qnique",
11
+ "nl": "Onderwerpen en qnique-id's bijwerken",
12
+ "fr": "Mettre à jour les sujets et les ids qnique",
13
+ "it": "Aggiornare gli argomenti und qnique ids",
14
+ "es": "Actualizar temas und qnique ids",
15
+ "pl": "Aktualizacja tematów i idów qnique",
16
+ "uk": "Оновлення тем und qnique ids",
17
+ "zh-cn": "更新主题 und qnique ids"
18
+ },
19
+ "1.17.9": {
20
+ "en": "setdefault defiveidentifier for lorawan bridge function to used Device Id",
21
+ "de": "Setzen Sie den Standardgerätekennzeichner für die LoRaWAN-Bridge-Funktion auf die Verwendung der Geräte-ID.",
22
+ "ru": "Установите идентификатор устройства по умолчанию для функции моста LoRaWAN, чтобы использовать идентификатор устройства.",
23
+ "pt": "Defina o identificador padrão do dispositivo para a função de ponte LoRaWAN usando o ID do dispositivo.",
24
+ "nl": "Stel standaard apparaatidentificatie in voor LoRaWAN Bridge-functie om het apparaat-ID te gebruiken",
25
+ "fr": "Définir l'identifiant par défaut du périphérique pour la fonction de pont LoRaWAN pour utiliser l'identifiant du périphérique.",
26
+ "it": "Impostare l'identificatore predefinito del dispositivo per la funzione del ponte LoRaWAN in modo da utilizzare l'ID del dispositivo.",
27
+ "es": "Establecer el identificador predeterminado del dispositivo para la función de puente LoRaWAN para usar el ID del dispositivo",
28
+ "pl": "Ustaw domyślny identyfikator urządzenia dla funkcji mostka LoRaWAN na użyty identyfikator urządzenia",
29
+ "uk": "Встановлено значення за замовчуванням ідентифікатора пристрою для функції моста LoRaWAN на Device Id.",
30
+ "zh-cn": "将LoRaWAN桥接功能的setdefault设备标识符设置为使用设备ID。"
31
+ },
6
32
  "1.17.8": {
7
33
  "en": "normalize [] () & {} into _",
8
34
  "de": "normalize [] () & {} into _",
@@ -67,32 +93,6 @@
67
93
  "pl": "Więcej debugowania dla błędu Foreign Climate",
68
94
  "uk": "Більше відладки для помилки зовнішнього клімату",
69
95
  "zh-cn": "为外部气候错误添加更多的调试日志记录"
70
- },
71
- "1.17.3": {
72
- "en": "Bugfix calling Foreign climate ids",
73
- "de": "Fehlerbehebung beim Aufrufen von Fremdklima-IDs.",
74
- "ru": "Исправлена ошибка при вызове иностранных идентификаторов климата",
75
- "pt": "Correção de bug ao chamar ids de clima estrangeiros",
76
- "nl": "Bugfix voor het oproepen van vreemde klimaat-id's",
77
- "fr": "Correction de bug pour l'appel des identifiants de climatisation étrangers",
78
- "it": "Correzione bug nella chiamata degli ID di climi stranieri",
79
- "es": "Corregido el problema al llamar a los identificadores climáticos extranjeros",
80
- "pl": "Naprawiono błąd związany z wywoływaniem identyfikatorów obcych dla klimatyzacji.",
81
- "uk": "Виправлена помилка при виклику іноземних ідентифікаторів клімату",
82
- "zh-cn": "修复调用Foreign climate ids时的错误"
83
- },
84
- "1.17.2": {
85
- "en": "Bugfix nameing of foreign states",
86
- "de": "Behebung der Benennung von ausländischen Bundesländern",
87
- "ru": "Исправлена ошибка в именовании иностранных государств.",
88
- "pt": "Correção de nomeação de estados estrangeiros",
89
- "nl": "Bugfix benoemen van buitenlandse staten",
90
- "fr": "Correction de la dénomination des états étrangers",
91
- "it": "Correzione bug nel nome dei stati stranieri",
92
- "es": "Corrección de nombres de estados extranjeros",
93
- "pl": "Naprawiono nazewnictwo stanów obcych.",
94
- "uk": "Виправлено назву іноземних країн",
95
- "zh-cn": "修复外州命名错误"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -426,11 +426,7 @@
426
426
  "RefreshDiscoveryCronJob": "0 * * * *",
427
427
  "BridgeEnum": "",
428
428
  "BridgenotificationActivation": "allNotifications, brdigeConnection, newDiscover, deviceState",
429
- "BridgeDevicenotificationActivation": "allNotifications, brdigeConnection, newDiscover, deviceState",
430
429
  "DeviceIdentifiers": [
431
- {
432
- "DeviceIdentifier": "usedApplicationName"
433
- },
434
430
  {
435
431
  "DeviceIdentifier": "usedDeviceId"
436
432
  }
@@ -560,6 +556,26 @@
560
556
  "def": "{}"
561
557
  },
562
558
  "native": {}
559
+ },
560
+ {
561
+ "_id": "bridge",
562
+ "type": "channel",
563
+ "common": {
564
+ "name": "Bridge messaging"
565
+ },
566
+ "native": {}
567
+ },
568
+ {
569
+ "_id": "bridge.notification",
570
+ "type": "state",
571
+ "common": {
572
+ "type": "string",
573
+ "name": "message to bridge",
574
+ "read": true,
575
+ "write": true,
576
+ "def": ""
577
+ },
578
+ "native": {}
563
579
  }
564
580
  ]
565
581
  }
@@ -72,7 +72,8 @@ class bridgeClass {
72
72
  second: '2-digit',
73
73
  },
74
74
  };
75
- this.ids = {};
75
+ this.discoveredDevices = {};
76
+
76
77
  // Unitmapping zur Zuweisung der passenden Unit, wenn diese falsch geschrieben ist
77
78
  this.unitMap = {
78
79
  '°C': { device_class: 'temperature' },
@@ -234,9 +235,9 @@ class bridgeClass {
234
235
  this.adapter.log.debug(`Function ${activeFunction} started.`);
235
236
  try {
236
237
  if (this.bridgeMqttClient.internalConnectionstate) {
237
- const newNotification = await this.discovery(id, options);
238
- // notify new discovered Devices (new notification)
239
- if (newNotification) {
238
+ const newDeviceDiscovered = await this.discovery(id, options);
239
+ // notify new discovered Devices (new deviceidentifier)
240
+ if (newDeviceDiscovered) {
240
241
  const device = this.DiscoveredIds[id].informations.usedDeviceId;
241
242
  const application = this.DiscoveredIds[id].informations.usedApplicationName;
242
243
  const message = `${this.adapter.i18nTranslation['new device discovered']}.\n${this.adapter.i18nTranslation['Device']}: ${device}\n${this.adapter.i18nTranslation['Application']}: ${application}`;
@@ -291,110 +292,14 @@ class bridgeClass {
291
292
  * ******************************************************************/
292
293
 
293
294
  /**
294
- * @param changeInfo changeInfo for the device
295
+ * @param normalizedDeficeIdentifier identifier od device
295
296
  */
296
- async discoverDeviceNotifications(changeInfo) {
297
- const activeFunction = 'discoverDeviceNotifications';
297
+ async checkNewDeviceDiscovered(normalizedDeficeIdentifier) {
298
+ const activeFunction = 'bridge.js checkNewDeviceDiscovered';
298
299
  this.adapter.log.debug(`Function ${activeFunction} started.`);
299
300
  try {
300
- const notificationId = `${this.adapter.namespace}.${changeInfo.objectStartDirectory}${this.NotificationId}${this.GeneralId}`;
301
- if (!this.Notifications[notificationId]) {
302
- const deviceIdentifier = this.getDeviceIdentifier(changeInfo, this.adapter.config.DeviceIdentifiers);
303
- const normalizedDeviceIdentifier = this.normalizeString(deviceIdentifier);
304
- const general = {
305
- topic: `${this.bridgeMqttClient.BridgePrefix}${normalizedDeviceIdentifier}/${this.Words.notification}_${this.Words.general}${this.EndingState}`.toLowerCase(),
306
- notificationId: notificationId,
307
- };
308
- let discoveryobject = this.getNotificationDiscoveryObject(deviceIdentifier, this.Words.general);
309
- this.Notifications[general.notificationId] = {};
310
- this.assignIdStructure(
311
- this.PublishedIds,
312
- general.notificationId,
313
- {
314
- applicationName: changeInfo.applicationName,
315
- usedApplicationName: changeInfo.usedApplicationName,
316
- deviceId: changeInfo.deviceId,
317
- usedDeviceId: changeInfo.usedDeviceId,
318
- },
319
- discoveryobject?.topic,
320
- discoveryobject?.payload,
321
- discoveryobject?.payload.topic,
322
- );
323
-
324
- await this.publishDiscovery(general.notificationId, {
325
- topic: discoveryobject?.topic,
326
- payload: structuredClone(discoveryobject?.payload),
327
- informations: {
328
- applicationName: changeInfo.applicationName,
329
- usedApplicationName: changeInfo.usedApplicationName,
330
- deviceId: changeInfo.deviceId,
331
- usedDeviceId: changeInfo.usedDeviceId,
332
- },
333
- });
334
-
335
- // offline
336
- const offline = {
337
- topic: `${this.bridgeMqttClient.BridgePrefix}${normalizedDeviceIdentifier}/${this.Words.notification}_${this.Words.offline}${this.EndingState}`.toLowerCase(),
338
- notificationId: `${this.adapter.namespace}.${changeInfo.objectStartDirectory}${this.NotificationId}${this.OfflineId}`,
339
- };
340
- discoveryobject = this.getNotificationDiscoveryObject(deviceIdentifier, this.Words.offline);
341
- this.Notifications[offline.notificationId] = {};
342
- this.assignIdStructure(
343
- this.PublishedIds,
344
- offline.notificationId,
345
- {
346
- applicationName: changeInfo.applicationName,
347
- usedApplicationName: changeInfo.usedApplicationName,
348
- deviceId: changeInfo.deviceId,
349
- usedDeviceId: changeInfo.usedDeviceId,
350
- },
351
- discoveryobject?.topic,
352
- discoveryobject?.payload,
353
- discoveryobject?.payload.topic,
354
- );
355
-
356
- await this.publishDiscovery(offline.notificationId, {
357
- topic: discoveryobject?.topic,
358
- payload: structuredClone(discoveryobject?.payload),
359
- informations: {
360
- applicationName: changeInfo.applicationName,
361
- usedApplicationName: changeInfo.usedApplicationName,
362
- deviceId: changeInfo.deviceId,
363
- usedDeviceId: changeInfo.usedDeviceId,
364
- },
365
- });
366
-
367
- // online
368
- const online = {
369
- topic: `${this.bridgeMqttClient.BridgePrefix}${normalizedDeviceIdentifier}/${this.Words.notification}_${this.Words.online}${this.EndingState}`.toLowerCase(),
370
- notificationId: `${this.adapter.namespace}.${changeInfo.objectStartDirectory}${this.NotificationId}${this.OnlineId}`,
371
- };
372
- discoveryobject = this.getNotificationDiscoveryObject(deviceIdentifier, this.Words.online);
373
- this.Notifications[online.notificationId] = {};
374
- this.assignIdStructure(
375
- this.PublishedIds,
376
- online.notificationId,
377
- {
378
- applicationName: changeInfo.applicationName,
379
- usedApplicationName: changeInfo.usedApplicationName,
380
- deviceId: changeInfo.deviceId,
381
- usedDeviceId: changeInfo.usedDeviceId,
382
- },
383
- discoveryobject?.topic,
384
- discoveryobject?.payload,
385
- discoveryobject?.payload.topic,
386
- );
387
-
388
- await this.publishDiscovery(online.notificationId, {
389
- topic: discoveryobject?.topic,
390
- payload: structuredClone(discoveryobject?.payload),
391
- informations: {
392
- applicationName: changeInfo.applicationName,
393
- usedApplicationName: changeInfo.usedApplicationName,
394
- deviceId: changeInfo.deviceId,
395
- usedDeviceId: changeInfo.usedDeviceId,
396
- },
397
- });
301
+ if (!this.discoveredDevices[normalizedDeficeIdentifier]) {
302
+ this.discoveredDevices[normalizedDeficeIdentifier] = {};
398
303
  return true;
399
304
  }
400
305
  return false;
@@ -496,8 +401,8 @@ class bridgeClass {
496
401
  this.adapter.config.DeviceIdentifiers,
497
402
  );
498
403
  target.normalizedDeficeIdentifier = this.normalizeString(target.DeviceIdentifier);
499
- target.Topic =
500
- `${this.bridgeMqttClient.BridgePrefix}${target.normalizedDeficeIdentifier}/${target.changeInfo.changedState}`.toLowerCase();
404
+ target.uniqueString = await this.getUniqueString(config.climateIds.target, target.DeviceIdentifier);
405
+ target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString}`.toLowerCase();
501
406
 
502
407
  //Min und Max holen
503
408
  const targetObject = await this.adapter.getObjectAsync(config.climateIds.target);
@@ -516,8 +421,8 @@ class bridgeClass {
516
421
  this.adapter.config.DeviceIdentifiers,
517
422
  );
518
423
  act.normalizedDeficeIndetifier = this.normalizeString(act.DeviceIdentifier);
519
- act.Topic =
520
- `${this.bridgeMqttClient.BridgePrefix}${act.normalizedDeficeIndetifier}/${act.changeInfo.changedState}`.toLowerCase();
424
+ act.uniqueString = await this.getUniqueString(config.climateIds.act, act.DeviceIdentifier);
425
+ act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString}`.toLowerCase();
521
426
 
522
427
  // Mode
523
428
  const mode = {};
@@ -527,17 +432,20 @@ class bridgeClass {
527
432
  this.adapter.config.DeviceIdentifiers,
528
433
  );
529
434
  mode.normalizedDeviceIdentifier = this.normalizeString(mode.DeviceIdentifier);
530
- mode.Topic =
531
- `${this.bridgeMqttClient.BridgePrefix}${mode.normalizedDeviceIdentifier}/${mode.changeInfo.changedState}`.toLowerCase();
435
+ mode.uniqueString = await this.getUniqueString(config.climateIds.mode, mode.DeviceIdentifier);
436
+ mode.Topic = `${this.bridgeMqttClient.BridgePrefix}${mode.uniqueString}`.toLowerCase();
532
437
 
533
- const normalizedClimateName = this.normalizeString(config.ClimateName);
438
+ const climateUniquString = await this.getUniqueString(
439
+ `${this.adapter.namespace}.${config.ClimateName}`,
440
+ target.DeviceIdentifier,
441
+ );
534
442
  const DiscoveryTopic =
535
- `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${target.normalizedDeficeIdentifier}/${normalizedClimateName}/config`.toLowerCase();
443
+ `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${climateUniquString}/config`.toLowerCase();
536
444
  const indexLastDotTarget = config.climateIds.target.lastIndexOf('.');
537
445
  const Id = config.climateIds.target.substring(0, indexLastDotTarget) + this.EndingVirtualClimate;
538
446
  const DiscoveryPayload = {
539
447
  name: config.ClimateName,
540
- unique_id: `${target.normalizedDeficeIdentifier}_${normalizedClimateName}`.toLowerCase(),
448
+ unique_id: `${climateUniquString}`.toLowerCase(),
541
449
  device: {
542
450
  identifiers: [target.normalizedDeficeIdentifier.toLowerCase()],
543
451
  name: target.DeviceIdentifier,
@@ -720,29 +628,18 @@ class bridgeClass {
720
628
  * @param id Id, for notification
721
629
  * @param message message for notification
722
630
  * @param level level, for notification
723
- * @param device notification isfor device
724
631
  */
725
- async publishNotification(id, message, level, device) {
632
+ async publishNotification(id, message, level) {
726
633
  const activeFunction = 'bridge.js - publishNotification';
727
634
  this.adapter.log.debug(`Function ${activeFunction} started.`);
728
635
  try {
729
636
  if (this.adapter.bridge.Notifications[id]) {
730
- if (device) {
731
- if (this.adapter.config.BridgeDevicenotificationActivation.includes(level)) {
732
- await this.publishId(id, message, { retain: false });
733
- } else {
734
- this.adapter.log.debug(
735
- `the level ${level} is not reached. Actual level: ${this.adapter.config.BridgeDevicenotificationActivation}`,
736
- );
737
- }
637
+ if (this.adapter.config.BridgenotificationActivation.includes(level)) {
638
+ await this.publishId(id, message, { retain: false });
738
639
  } else {
739
- if (this.adapter.config.BridgenotificationActivation.includes(level)) {
740
- await this.publishId(id, message, { retain: false });
741
- } else {
742
- this.adapter.log.debug(
743
- `the level ${level} is not reached. Actual level: ${this.adapter.config.BridgenotificationActivation}`,
744
- );
745
- }
640
+ this.adapter.log.debug(
641
+ `the level ${level} is not reached. Actual level: ${this.adapter.config.BridgenotificationActivation}`,
642
+ );
746
643
  }
747
644
  } else {
748
645
  this.adapter.log.debug(`the id ${id} is not set for Notifications`);
@@ -820,7 +717,7 @@ class bridgeClass {
820
717
  this.adapter.log.debug(`Function ${activeFunction} started.`);
821
718
  try {
822
719
  // Defaultvalue for discover
823
- let newNotification = false;
720
+ let newDeviceDiscovered = false;
824
721
  // Query for decoded Folder
825
722
  if (id.includes(`${this.adapter.messagehandler.directoryhandler.reachableSubfolders.uplinkDecoded}.`)) {
826
723
  const changeInfo = await this.adapter.getChangeInfo(id);
@@ -880,10 +777,10 @@ class bridgeClass {
880
777
  usedDeviceId: changeInfo.usedDeviceId,
881
778
  },
882
779
  });
883
- if (await this.discoverDeviceNotifications(changeInfo)) {
884
- newNotification = true;
780
+ if (await this.checkNewDeviceDiscovered(DiscoveryObject?.payload.device.identifiers[0])) {
781
+ newDeviceDiscovered = true;
885
782
  } else {
886
- newNotification = false;
783
+ newDeviceDiscovered = false;
887
784
  }
888
785
  }
889
786
  }
@@ -958,15 +855,15 @@ class bridgeClass {
958
855
  usedDeviceId: changeInfo.usedDeviceId,
959
856
  },
960
857
  });
961
- if (await this.discoverDeviceNotifications(changeInfo)) {
962
- newNotification = true;
858
+ if (await this.checkNewDeviceDiscovered(DiscoveryObject?.payload.device.identifiers[0])) {
859
+ newDeviceDiscovered = true;
963
860
  } else {
964
- newNotification = false;
861
+ newDeviceDiscovered = false;
965
862
  }
966
863
  }
967
864
  }
968
865
  }
969
- return newNotification;
866
+ return newDeviceDiscovered;
970
867
  } catch (error) {
971
868
  this.adapter.log.error(`error at ${activeFunction}: ${error}`);
972
869
  }
@@ -1047,21 +944,23 @@ class bridgeClass {
1047
944
  const normalizedStateName = this.normalizeString(StateName);
1048
945
  const DeviceIdentifier = this.getDeviceIdentifier(changeInfo, this.adapter.config.DeviceIdentifiers);
1049
946
  const normalizedDeviceIdentifier = this.normalizeString(DeviceIdentifier);
1050
- const Topic =
1051
- `${this.bridgeMqttClient.BridgePrefix}${normalizedDeviceIdentifier}/${normalizedStateName}`.toLowerCase();
947
+ const uniqueString = await this.getUniqueString(
948
+ `${this.adapter.namespace}.${changeInfo.id}`,
949
+ DeviceIdentifier,
950
+ );
951
+ const Topic = `${this.bridgeMqttClient.BridgePrefix}${uniqueString}`.toLowerCase();
952
+
1052
953
  const EntityType = await this.getEntityType(options);
1053
954
  const AdditionalAttributes = await this.getStateAttributes(options.common, EntityType);
1054
955
  const DiscoveryTopic =
1055
- `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${normalizedDeviceIdentifier}/${normalizedStateName}/config`.toLowerCase();
956
+ `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${uniqueString}/config`.toLowerCase();
1056
957
  const DiscoveryPayload = {
1057
958
  name: StateName,
1058
959
  unique_id: `${normalizedDeviceIdentifier}_${normalizedStateName}`.toLowerCase(),
1059
960
  device: { identifiers: [normalizedDeviceIdentifier.toLowerCase()], name: DeviceIdentifier },
1060
961
  };
1061
962
  // Add Topics
1062
- if (options.Bridgestate.publish) {
1063
- DiscoveryPayload.state_topic = `${Topic}${this.EndingState}`;
1064
- }
963
+ DiscoveryPayload.state_topic = `${Topic}${this.EndingState}`;
1065
964
  if (options.Bridgestate.subscribe) {
1066
965
  DiscoveryPayload.command_topic = `${Topic}${this.EndingSet}`;
1067
966
  }
@@ -1615,11 +1514,9 @@ class bridgeClass {
1615
1514
 
1616
1515
  // Target
1617
1516
  const target = {};
1618
- target.changeInfo = await this.adapter.getChangeInfo(config.climateIds.target);
1619
1517
  target.DeviceIdentifier = (await this.getParentNameing(config.climateIds.target))?.parentName;
1620
- target.normalizedDeficeIdentifier = this.normalizeString(target.DeviceIdentifier);
1621
- target.Topic =
1622
- `${this.bridgeMqttClient.BridgePrefix}${target.normalizedDeficeIdentifier}/${target.changeInfo.changedState}`.toLowerCase();
1518
+ target.uniqueString = await this.getUniqueString(config.climateIds.target, target.DeviceIdentifier);
1519
+ target.Topic = `${this.bridgeMqttClient.BridgePrefix}${target.uniqueString}`.toLowerCase();
1623
1520
 
1624
1521
  //Min und Max holen
1625
1522
  const targetObject = await this.adapter.getForeignObjectAsync(config.climateIds.target);
@@ -1632,30 +1529,30 @@ class bridgeClass {
1632
1529
 
1633
1530
  // Act
1634
1531
  const act = {};
1635
- act.changeInfo = await this.adapter.getChangeInfo(config.climateIds.act);
1636
1532
  act.DeviceIdentifier = (await this.getParentNameing(config.climateIds.act))?.parentName;
1637
- act.normalizedDeficeIndetifier = this.normalizeString(act.DeviceIdentifier);
1638
- act.Topic =
1639
- `${this.bridgeMqttClient.BridgePrefix}${act.normalizedDeficeIndetifier}/${act.changeInfo.changedState}`.toLowerCase();
1533
+ act.uniqueString = await this.getUniqueString(config.climateIds.act, act.DeviceIdentifier);
1534
+ act.Topic = `${this.bridgeMqttClient.BridgePrefix}${act.uniqueString}`.toLowerCase();
1640
1535
 
1641
1536
  // Mode
1642
1537
  const mode = {};
1643
- mode.changeInfo = await this.adapter.getChangeInfo(config.climateIds.mode);
1644
1538
  mode.DeviceIdentifier = (await this.getParentNameing(config.climateIds.mode))?.parentName;
1645
- mode.normalizedDeviceIdentifier = this.normalizeString(mode.DeviceIdentifier);
1646
- mode.Topic =
1647
- `${this.bridgeMqttClient.BridgePrefix}${mode.normalizedDeviceIdentifier}/${mode.changeInfo.changedState}`.toLowerCase();
1539
+ mode.uniqueString = await this.getUniqueString(config.climateIds.mode, mode.DeviceIdentifier);
1540
+ mode.Topic = `${this.bridgeMqttClient.BridgePrefix}${mode.uniqueString}`.toLowerCase();
1648
1541
 
1649
- const normalizedClimateName = this.normalizeString(config.ClimateName);
1542
+ const climateUniquString = await this.getUniqueString(
1543
+ `${this.adapter.namespace}.${config.ClimateName}`,
1544
+ target.DeviceIdentifier,
1545
+ );
1650
1546
  const DiscoveryTopic =
1651
- `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${target.normalizedDeficeIdentifier}/${normalizedClimateName}/config`.toLowerCase();
1547
+ `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${climateUniquString}/config`.toLowerCase();
1652
1548
  const indexLastDotTarget = config.climateIds.target.lastIndexOf('.');
1653
1549
  const Id = config.climateIds.target.substring(0, indexLastDotTarget) + this.EndingVirtualClimate;
1550
+
1654
1551
  const DiscoveryPayload = {
1655
1552
  name: config.ClimateName,
1656
- unique_id: `${target.normalizedDeficeIdentifier}_${normalizedClimateName}`.toLowerCase(),
1553
+ unique_id: `${climateUniquString}`.toLowerCase(),
1657
1554
  device: {
1658
- identifiers: [target.normalizedDeficeIdentifier.toLowerCase()],
1555
+ identifiers: [this.normalizeString(target.DeviceIdentifier).toLowerCase()],
1659
1556
  name: target.DeviceIdentifier,
1660
1557
  },
1661
1558
  mode_state_topic: `${mode.Topic}${this.EndingState}`,
@@ -1946,26 +1843,28 @@ class bridgeClass {
1946
1843
  const statename = id.substring((parentNameing?.parentId?.length ?? 0) + 1, id.length);
1947
1844
  this.adapter.log.debug(`Assigned - deviceIdentifier: ${deviceIdentifier} - statename: ${statename}`);
1948
1845
  options.Bridgestate = {
1949
- publish: options.common.read,
1846
+ publish: true,
1950
1847
  subscribe: options.common.write,
1951
1848
  };
1952
- const normalizedStateName = this.normalizeString(statename);
1849
+ //const normalizedStateName = this.normalizeString(statename);
1953
1850
  const normalizedDeviceIdentifier = this.normalizeString(deviceIdentifier);
1954
- const topic =
1955
- `${this.bridgeMqttClient.BridgePrefix}${normalizedDeviceIdentifier}/${normalizedStateName}`.toLowerCase();
1851
+ const uniqueString = await this.getUniqueString(id, deviceIdentifier);
1852
+ /*const topic =
1853
+ `${this.bridgeMqttClient.BridgePrefix}${normalizedDeviceIdentifier}/${normalizedStateName}`.toLowerCase();*/
1854
+ const topic = `${this.bridgeMqttClient.BridgePrefix}${uniqueString}`.toLowerCase();
1956
1855
  const EntityType = await this.getEntityType(options);
1957
1856
  const AdditionalAttributes = await this.getStateAttributes(options.common, EntityType);
1857
+ /*const discoveryTopic =
1858
+ `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${normalizedDeviceIdentifier}/${normalizedStateName}/config`.toLowerCase();*/
1958
1859
  const discoveryTopic =
1959
- `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${normalizedDeviceIdentifier}/${normalizedStateName}/config`.toLowerCase();
1860
+ `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${EntityType}/${uniqueString}/config`.toLowerCase();
1960
1861
  const discoveryPayload = {
1961
1862
  name: statename,
1962
- unique_id: `${normalizedDeviceIdentifier}_${normalizedStateName}`.toLowerCase(),
1863
+ unique_id: `${uniqueString}`.toLowerCase(),
1963
1864
  device: { identifiers: [normalizedDeviceIdentifier.toLowerCase()], name: deviceIdentifier },
1964
1865
  };
1965
1866
  // Add Topics
1966
- if (options.Bridgestate.publish) {
1967
- discoveryPayload.state_topic = `${topic}${this.EndingState}`;
1968
- }
1867
+ discoveryPayload.state_topic = `${topic}${this.EndingState}`;
1969
1868
  if (options.Bridgestate.subscribe) {
1970
1869
  discoveryPayload.command_topic = `${topic}${this.EndingSet}`;
1971
1870
  }
@@ -2017,6 +1916,20 @@ class bridgeClass {
2017
1916
  }
2018
1917
  }
2019
1918
 
1919
+ /**
1920
+ * @param id id of the state
1921
+ * @param deviceidentifier identifier to device
1922
+ */
1923
+ async getUniqueString(id, deviceidentifier) {
1924
+ const activeFunction = 'bridge.js - getUniqueString';
1925
+ this.adapter.log.debug(`Function ${activeFunction} started.`);
1926
+ try {
1927
+ return `${this.normalizeString(deviceidentifier)}_${this.normalizeString(id)}`;
1928
+ } catch (error) {
1929
+ this.adapter.log.error(`error at ${activeFunction}: ${error}`);
1930
+ }
1931
+ }
1932
+
2020
1933
  /**
2021
1934
  * @param id id to get parent Channel
2022
1935
  */
@@ -29,9 +29,11 @@ class bridgeMqttClientClass {
29
29
  if (!this.internalConnectionstate) {
30
30
  this.adapter.log.info(`Connection to Bridge is active.`);
31
31
  }
32
- this.adapter.setState('info.bridgeConnection', true, true);
33
- this.internalConnectionstate = true;
32
+ await this.adapter.setState('info.bridgeConnection', true, true);
34
33
  this.errorCountdown = this.numberOfErrorsToLog;
34
+ this.internalConnectionstate = true;
35
+ const connectionInfo = await this.adapter.getConnectionInfo();
36
+ await this.adapter.setState('info.connection', connectionInfo, true);
35
37
 
36
38
  // Start subscribing
37
39
  this.client.subscribe(this.getSubscribtionArray(), err => {
@@ -58,12 +60,13 @@ class bridgeMqttClientClass {
58
60
  );
59
61
  });
60
62
 
61
- this.client.on('disconnect', () => {
63
+ this.client.on('disconnect', async () => {
62
64
  if (this.internalConnectionstate) {
63
65
  this.adapter.setState('info.bridgeConnection', false, true);
64
66
  this.internalConnectionstate = false;
65
67
  this.adapter.log.info(`Bridge disconnected`);
66
68
  this.adapter.bridge.clearAllSchedules();
69
+ await this.adapter.setState('info.connection', false, true);
67
70
  }
68
71
  });
69
72
  this.client.on('error', err => {
@@ -128,7 +131,7 @@ class bridgeMqttClientClass {
128
131
  */
129
132
  getSubscribtionArray() {
130
133
  // Subscribe to the ending of set (with different counts of sublevels 2 -10)
131
- return [`${this.BridgePrefix}+/+/set`];
134
+ return [`${this.BridgePrefix}+/set`];
132
135
  }
133
136
  }
134
137
 
@@ -300,19 +300,11 @@ class directorieshandlerClass {
300
300
  'Lorawan device back online',
301
301
  message,
302
302
  );
303
- let notificationId = `${this.adapter.namespace}.${changeInfo.applicationId}.devices.${changeInfo.deviceEUI}${this.adapter.bridge.NotificationId}${this.adapter.bridge.OnlineId}`;
303
+ let notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
304
304
  await this.adapter.bridge?.publishNotification(
305
305
  notificationId,
306
306
  message,
307
307
  this.adapter.bridge?.Notificationlevel.deviceState,
308
- true,
309
- );
310
- notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
311
- await this.adapter.bridge?.publishNotification(
312
- notificationId,
313
- message,
314
- this.adapter.bridge?.Notificationlevel.deviceState,
315
- false,
316
308
  );
317
309
  }
318
310
  }
@@ -83,20 +83,11 @@ class messagehandlerClass {
83
83
  const message = `${this.adapter.i18nTranslation['LoRaWAN device is offline']}.\n${this.adapter.i18nTranslation['Device']}: ${changeInfo.usedDeviceId}\n${this.adapter.i18nTranslation['Application']}: ${changeInfo.usedApplicationName}`;
84
84
  this.adapter.registerNotification('lorawan', 'LoRaWAN device offline', message);
85
85
 
86
- // Notification to bridge
87
- let notificationId = `${this.adapter.namespace}.${changeInfo.applicationId}.devices.${changeInfo.deviceEUI}${this.adapter.bridge.NotificationId}${this.adapter.bridge.OfflineId}`;
86
+ let notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
88
87
  await this.adapter.bridge?.publishNotification(
89
88
  notificationId,
90
89
  message,
91
90
  this.adapter.bridge?.Notificationlevel.deviceState,
92
- true,
93
- );
94
- notificationId = `${this.adapter.namespace}.${this.adapter.bridge.Words.notification}${this.adapter.bridge.GeneralId}`;
95
- await this.adapter.bridge?.publishNotification(
96
- notificationId,
97
- message,
98
- this.adapter.bridge?.Notificationlevel.deviceState,
99
- false,
100
91
  );
101
92
  }
102
93
  }
@@ -542,7 +533,9 @@ class messagehandlerClass {
542
533
  }
543
534
  // Add Bridged Funktion (MQTT auto discovery) only in Message
544
535
  if (!options?.startup) {
545
- await this.adapter.bridge?.work(stateId, undefined, { common: common });
536
+ await this.adapter.bridge?.work(`${this.adapter.namespace}.${stateId}`, undefined, {
537
+ common: common,
538
+ });
546
539
  }
547
540
 
548
541
  //check for right type of data (after a possible change)
@@ -22,9 +22,9 @@ class mqttClientClass {
22
22
  this.errorCountdown = 0;
23
23
  this.numberOfErrorsToLog = 10;
24
24
 
25
- this.client.on('connect', () => {
25
+ this.client.on('connect', async () => {
26
26
  if (!this.internalConnectionstate) {
27
- this.adapter.log.info(`Connection is active.`);
27
+ this.adapter.log.info(`Connection to LoRaWAN is active.`);
28
28
  if (this.adapter.config.notificationActivation === 'notification') {
29
29
  this.adapter.registerNotification(
30
30
  'lorawan',
@@ -33,8 +33,10 @@ class mqttClientClass {
33
33
  );
34
34
  }
35
35
  }
36
- this.adapter.setState('info.connection', true, true);
37
36
  this.internalConnectionstate = true;
37
+ const connectionInfo = await this.adapter.getConnectionInfo();
38
+ await this.adapter.setState('info.connection', connectionInfo, true);
39
+
38
40
  this.errorCountdown = this.numberOfErrorsToLog;
39
41
  // @ts-expect-error overloadmessage from functoin getSubscribtionArray
40
42
  this.client.subscribe(this.getSubscribtionArray(), err => {
package/main.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
  const mqtt = require('mqtt');
3
+ const crypto = require('crypto');
3
4
 
4
5
  /*
5
6
  * Created with @iobroker/create-adapter v2.6.0
@@ -110,6 +111,13 @@ class Lorawan extends utils.Adapter {
110
111
  }
111
112
  }
112
113
 
114
+ createHash(plainText, salt) {
115
+ return crypto
116
+ .createHash('sha256')
117
+ .update(plainText + salt)
118
+ .digest('hex');
119
+ }
120
+
113
121
  async geti18nTranslation() {
114
122
  const systemConfig = await this.getForeignObjectAsync('system.config');
115
123
  if (systemConfig) {
@@ -397,7 +405,6 @@ class Lorawan extends utils.Adapter {
397
405
  notificationId,
398
406
  this.i18nTranslation['Adapter will be stoped'],
399
407
  this.bridge?.Notificationlevel.bridgeConnection,
400
- false,
401
408
  );
402
409
  // clear timeout (for simulation)
403
410
  if (this.simulation.timeout) {
@@ -621,6 +628,24 @@ class Lorawan extends utils.Adapter {
621
628
  }
622
629
  }
623
630
  await this.setState(id, state.val, true);
631
+ } else if (id.endsWith('.bridge.send')) {
632
+ const topic = await this.getStateAsync(`${this.namespace}.bridge.topic`);
633
+ const payload = await this.getStateAsync(`${this.namespace}.bridge.payload`);
634
+ if (topic && payload) {
635
+ await this.bridge?.bridgeMqttClient.publish(topic.val, payload.val, {});
636
+
637
+ await this.setState(`${this.namespace}.bridge.topic`, topic.val, true);
638
+ await this.setState(`${this.namespace}.bridge.payload`, payload.val, true);
639
+ }
640
+ await this.setState(id, state.val, true);
641
+ } else if (id.endsWith('.bridge.notification')) {
642
+ let notificationId = `${this.namespace}.${this.bridge?.Words.notification}${this.bridge?.GeneralId}`;
643
+ await this.bridge?.publishNotification(
644
+ notificationId,
645
+ state.val,
646
+ this.config.BridgenotificationActivation,
647
+ );
648
+ await this.setState(id, state.val, true);
624
649
  }
625
650
  } else {
626
651
  // Query for 0_userdata or alias => states also publish with ack = false
@@ -1315,6 +1340,15 @@ class Lorawan extends utils.Adapter {
1315
1340
  }
1316
1341
  return 1;
1317
1342
  }
1343
+
1344
+ async getConnectionInfo() {
1345
+ if (this.config.ipUrl === '' || this.mqttClient?.internalConnectionstate) {
1346
+ if (this.config.BridgeType === 'off' || this.bridge?.bridgeMqttClient?.internalConnectionstate) {
1347
+ return true;
1348
+ }
1349
+ }
1350
+ return false;
1351
+ }
1318
1352
  }
1319
1353
 
1320
1354
  if (require.main !== module) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.17.8",
3
+ "version": "1.17.10",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",