iobroker.lorawan 1.16.11 → 1.16.12
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 +3 -0
- package/admin/i18n/de/translations.json +1 -1
- package/admin/jsonTab.json +1 -0
- package/io-package.json +16 -14
- package/lib/modules/bridge.js +10 -0
- package/lib/modules/directorieshandler.js +0 -2
- package/main.js +10 -3
- package/package.json +1 -1
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.16.12 (2025-09-18)
|
|
27
|
+
* (BenAhrdt) delete devices in bridge (discover empty) after changing the device_identifier
|
|
28
|
+
|
|
26
29
|
### 1.16.11 (2025-09-18)
|
|
27
30
|
* (BenAhrdt) dont use bridge enum within namespace of adapter
|
|
28
31
|
* (BenAhrdt) Improve Namebuilding of foreign states to bridge
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"applicationId": "Applikations Id",
|
|
104
104
|
"applicationName": "Applikationsname",
|
|
105
105
|
"usedApplicationName": "Benutzter Applikationsname (common.name)",
|
|
106
|
-
"deviceEUI": "
|
|
106
|
+
"deviceEUI": "Geräte EUI",
|
|
107
107
|
"deviceId": "Geräte Id",
|
|
108
108
|
"usedDeviceId": "Benutzte Geräte Id (common.name)",
|
|
109
109
|
"underline": "Unterstrich",
|
package/admin/jsonTab.json
CHANGED
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.12",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.16.12": {
|
|
7
|
+
"en": "delete devices in bridge (discover empty) after changing the device_identifier",
|
|
8
|
+
"de": "Löschen Sie Geräte in der Brücke (entdecken leer), nachdem die Gerätekennung geändert wurde.",
|
|
9
|
+
"ru": "Удаление устройств в мосту (обнаружить пустоту) после изменения идентификатора устройства",
|
|
10
|
+
"pt": "excluir dispositivos na ponte (descoberta vazia) após alterar o device_identifier",
|
|
11
|
+
"nl": "Verwijder apparaten in de brug (ontdek leeg) na het wijzigen van de apparaat_identifier.",
|
|
12
|
+
"fr": "Supprimer les appareils dans le bridge (découverte vide) après avoir modifié l'identifiant de l'appareil",
|
|
13
|
+
"it": "Eliminare i dispositivi nel bridge (scoprire vuoto) dopo aver cambiato l'identificatore del dispositivo.",
|
|
14
|
+
"es": "eliminar dispositivos en el puente (descubrir vacío) después de cambiar el device_identifier",
|
|
15
|
+
"pl": "Usuń urządzenia z mostka (odkryj puste) po zmianie identyfikatora urządzenia",
|
|
16
|
+
"uk": "видалити пристрої у мості (відкрити порожнечу) після зміни ідентифікатора пристрою",
|
|
17
|
+
"zh-cn": "更改设备标识符后,在桥接器中删除设备(发现为空)。"
|
|
18
|
+
},
|
|
6
19
|
"1.16.11": {
|
|
7
20
|
"en": "dont use bridge enum within namespace of adapter\nImprove Namebuilding of foreign states to bridge",
|
|
8
21
|
"de": "Verwenden Sie keine Bridge-Enum innerhalb des Namensraums des Adapters.\nVerbessern Sie den Namensaufbau ausländischer Staaten auf Bridging",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Wykrywanie zmian w nowym Discovery urządzeń LoRaWAN",
|
|
81
94
|
"uk": "Виявлення нових пристроїв Discovery з LoRaWAN",
|
|
82
95
|
"zh-cn": "更改LoRaWAN设备的新发现检测"
|
|
83
|
-
},
|
|
84
|
-
"1.16.5": {
|
|
85
|
-
"en": "Bugfix in notifications to Bridge (new device dicovered) => namespace not set",
|
|
86
|
-
"de": "Fehlerbehebung bei Benachrichtigungen an Bridge (neues Gerät erkannt) => Namespace nicht festgelegt",
|
|
87
|
-
"ru": "Исправлена ошибка в уведомлениях для моста (обнаружение нового устройства) => пространство имен не установлено",
|
|
88
|
-
"pt": "Correção de bug nas notificações para Bridge (novo dispositivo descoberto) => espaço de nomes não definido",
|
|
89
|
-
"nl": "Bugfix in meldingen naar Bridge (nieuw apparaat ontdekt) => namespace niet ingesteld",
|
|
90
|
-
"fr": "Correction de bug dans les notifications vers le pont (nouveau périphérique découvert) => espace de noms non défini",
|
|
91
|
-
"it": "Correzione di un bug nelle notifiche al Bridge (nuovo dispositivo scoperto) => namespace non impostato",
|
|
92
|
-
"es": "Corrección de error en las notificaciones al puente (nuevo dispositivo descubierto) => espacio de nombres no establecido",
|
|
93
|
-
"pl": "Poprawiono błąd w powiadomieniach do Bridge (nowe urządzenie zostało znalezione) => nie ustawiona przestrzeń nazw",
|
|
94
|
-
"uk": "Виправлено помилку у сповіщеннях до мосту (виявлено новий пристрій) => не встановлений простір імен",
|
|
95
|
-
"zh-cn": "修复了通知到桥接器的bug(发现新设备)=>命名空间未设置"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -402,6 +402,8 @@
|
|
|
402
402
|
"Bridgepassword"
|
|
403
403
|
],
|
|
404
404
|
"native": {
|
|
405
|
+
"TopicToSend": "lora",
|
|
406
|
+
"MessageToSend": "lora",
|
|
405
407
|
"ipUrl": "eu1.cloud.thethings.network",
|
|
406
408
|
"port": 8883,
|
|
407
409
|
"username": "",
|
package/lib/modules/bridge.js
CHANGED
|
@@ -1511,6 +1511,16 @@ class bridgeClass {
|
|
|
1511
1511
|
await this.publishDiscovery(id, this.DiscoveredIds[id]);
|
|
1512
1512
|
delete this.DiscoveredIds[id];
|
|
1513
1513
|
await this.adapter.setState('info.discoveredIds', JSON.stringify(this.DiscoveredIds), true);
|
|
1514
|
+
} else {
|
|
1515
|
+
if (this.DiscoveredIds[id].topic !== this.OldDiscoveredIds[id].topic) {
|
|
1516
|
+
this.adapter.log.debug(`The discovered topic: ${this.OldDiscoveredIds[id].topic} will be removed`);
|
|
1517
|
+
const safeCurrent = this.DiscoveredIds[id];
|
|
1518
|
+
this.DiscoveredIds[id] = this.OldDiscoveredIds[id];
|
|
1519
|
+
this.DiscoveredIds[id].payload = {};
|
|
1520
|
+
await this.publishDiscovery(id, this.DiscoveredIds[id]);
|
|
1521
|
+
this.DiscoveredIds[id] = safeCurrent;
|
|
1522
|
+
await this.publishDiscovery(id, this.DiscoveredIds[id]);
|
|
1523
|
+
}
|
|
1514
1524
|
}
|
|
1515
1525
|
}
|
|
1516
1526
|
}
|
package/main.js
CHANGED
|
@@ -1031,7 +1031,7 @@ class Lorawan extends utils.Adapter {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
result += element.DeviceIdentifier;
|
|
1033
1033
|
}
|
|
1034
|
-
result = `${this.
|
|
1034
|
+
result = `${this.bridge?.bridgeMqttClient.BridgePrefix}${result}/state`;
|
|
1035
1035
|
// Send response
|
|
1036
1036
|
if (obj.callback) {
|
|
1037
1037
|
this.sendTo(obj.from, obj.command, result, obj.callback);
|
|
@@ -1059,7 +1059,7 @@ class Lorawan extends utils.Adapter {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
result += this.messagehandler?.directoryhandler.HABridge.Dummy[element.DeviceIdentifier];
|
|
1061
1061
|
}
|
|
1062
|
-
result = `${this.
|
|
1062
|
+
result = `${this.bridge?.bridgeMqttClient.BridgePrefix}${result}/state`;
|
|
1063
1063
|
// Send response
|
|
1064
1064
|
if (obj.callback) {
|
|
1065
1065
|
this.sendTo(obj.from, obj.command, result, obj.callback);
|
|
@@ -1262,7 +1262,6 @@ class Lorawan extends utils.Adapter {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
} else if (obj.command === 'getBridgeConnection') {
|
|
1264
1264
|
try {
|
|
1265
|
-
this.log.error(typeof obj.message.Bridgessl);
|
|
1266
1265
|
let connection = false;
|
|
1267
1266
|
const mqttprefix = obj.message.Bridgessl ? 'mqtts://' : 'mqtt://';
|
|
1268
1267
|
const testclient = mqtt.connect(`${mqttprefix}${obj.message.BridgeipUrl}`, {
|
|
@@ -1290,6 +1289,14 @@ class Lorawan extends utils.Adapter {
|
|
|
1290
1289
|
} catch (error) {
|
|
1291
1290
|
this.log.error(error);
|
|
1292
1291
|
}
|
|
1292
|
+
} else if (obj.command === 'sendMQTTMessage') {
|
|
1293
|
+
try {
|
|
1294
|
+
this.log.error(typeof obj.message.Topic);
|
|
1295
|
+
this.log.error(typeof obj.message.Message);
|
|
1296
|
+
this.sendTo(obj.from, obj.command, { result: 'OK' }, obj.callback);
|
|
1297
|
+
} catch (error) {
|
|
1298
|
+
this.log.error(error);
|
|
1299
|
+
}
|
|
1293
1300
|
} else {
|
|
1294
1301
|
const result = { error: true, message: 'No message matched', received: obj.message };
|
|
1295
1302
|
if (obj.callback) {
|