iobroker.lorawan 1.15.0 → 1.15.1
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/io-package.json +14 -14
- package/lib/modules/bridge.js +13 -11
- package/main.js +1 -1
- 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.15.1 (2025-09-14)
|
|
27
|
+
* (BenAhrdt) Send Trigger retain = false
|
|
28
|
+
|
|
26
29
|
### 1.15.0 (2025-09-14)
|
|
27
30
|
* (BenAhrdt) Bring notification for Bridge in Admin
|
|
28
31
|
* (BenAhrdt) Notify different trigger to Bridge
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.15.
|
|
4
|
+
"version": "1.15.1",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.15.1": {
|
|
7
|
+
"en": "Send trigger with retain = false",
|
|
8
|
+
"de": "Trigger mit retain = false senden",
|
|
9
|
+
"ru": "Отправка триггера с retain = false",
|
|
10
|
+
"pt": "Enviar trigger com retain = false",
|
|
11
|
+
"nl": "Verzend trigger met retain = false",
|
|
12
|
+
"fr": "Envoyer le trigger avec retain = false",
|
|
13
|
+
"it": "Invia trigger con retain = false",
|
|
14
|
+
"es": "Enviar trigger con retain = false",
|
|
15
|
+
"pl": "Wyślij trigger z retain = false",
|
|
16
|
+
"uk": "Надіслати тригер з retain = false",
|
|
17
|
+
"zh-cn": "发送带有 retain = false 的触发器"
|
|
18
|
+
},
|
|
6
19
|
"1.15.0": {
|
|
7
20
|
"en": "Bring notification for bridge in admin\nNotify different triggers to bridge",
|
|
8
21
|
"de": "Benachrichtigung für Bridge im Admin hinzufügen\nUnterschiedliche Trigger an Bridge melden",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Zapisz ostatnie 10 opublikowanych i subskrybowanych wartości",
|
|
81
94
|
"uk": "Зберігати останні 10 опублікованих і підписаних значень",
|
|
82
95
|
"zh-cn": "保存最近 10 个已发布和已订阅的值"
|
|
83
|
-
},
|
|
84
|
-
"1.14.4": {
|
|
85
|
-
"en": "Return the virtual mode",
|
|
86
|
-
"de": "Rückkehr des Virtual Mode",
|
|
87
|
-
"ru": "Возврат виртуального режима",
|
|
88
|
-
"pt": "Retornar o modo virtual",
|
|
89
|
-
"nl": "Herstel de virtuele modus",
|
|
90
|
-
"fr": "Rétablir le mode virtuel",
|
|
91
|
-
"it": "Ripristino della modalità virtuale",
|
|
92
|
-
"es": "Restaurar el modo virtual",
|
|
93
|
-
"pl": "Przywrócenie trybu wirtualnego",
|
|
94
|
-
"uk": "Повернення віртуального режиму",
|
|
95
|
-
"zh-cn": "恢复虚拟模式"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/lib/modules/bridge.js
CHANGED
|
@@ -204,7 +204,7 @@ class bridgeClass {
|
|
|
204
204
|
);
|
|
205
205
|
this.VitualIds[this.SubscribedTopics[topic].id] = message;
|
|
206
206
|
// Return the virtual mode
|
|
207
|
-
await this.publishId(this.SubscribedTopics[topic].id, message);
|
|
207
|
+
await this.publishId(this.SubscribedTopics[topic].id, message, {});
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
210
|
await this.adapter.setState(this.SubscribedTopics[topic].id, message);
|
|
@@ -243,7 +243,7 @@ class bridgeClass {
|
|
|
243
243
|
this.adapter.bridge?.Notificationlevel.deviceState,
|
|
244
244
|
false,
|
|
245
245
|
);
|
|
246
|
-
await this.publishId(id, Stateval);
|
|
246
|
+
await this.publishId(id, Stateval, {});
|
|
247
247
|
}
|
|
248
248
|
} else {
|
|
249
249
|
this.adapter.log.debug(`work called with id ${id}, but Bridge is not connected yet.`);
|
|
@@ -611,9 +611,9 @@ class bridgeClass {
|
|
|
611
611
|
},
|
|
612
612
|
},
|
|
613
613
|
});
|
|
614
|
-
await this.publishId(config.climateIds.target, undefined);
|
|
615
|
-
await this.publishId(config.climateIds.act, undefined);
|
|
616
|
-
await this.publishId(config.climateIds.mode, modeval);
|
|
614
|
+
await this.publishId(config.climateIds.target, undefined, {});
|
|
615
|
+
await this.publishId(config.climateIds.act, undefined, {});
|
|
616
|
+
await this.publishId(config.climateIds.mode, modeval, {});
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
} catch (error) {
|
|
@@ -676,7 +676,7 @@ class bridgeClass {
|
|
|
676
676
|
if (this.adapter.bridge.Notifications[id]) {
|
|
677
677
|
if (device) {
|
|
678
678
|
if (this.adapter.config.BridgeDevicenotificationActivation.includes(level)) {
|
|
679
|
-
await this.
|
|
679
|
+
await this.publishId(id, message, { retain: false });
|
|
680
680
|
} else {
|
|
681
681
|
this.adapter.log.debug(
|
|
682
682
|
`the level ${level} is not reached. Actual level: ${this.adapter.config.BridgeDevicenotificationActivation}`,
|
|
@@ -684,7 +684,7 @@ class bridgeClass {
|
|
|
684
684
|
}
|
|
685
685
|
} else {
|
|
686
686
|
if (this.adapter.config.BridgenotificationActivation.includes(level)) {
|
|
687
|
-
await this.
|
|
687
|
+
await this.publishId(id, message, { retain: false });
|
|
688
688
|
} else {
|
|
689
689
|
this.adapter.log.debug(
|
|
690
690
|
`the level ${level} is not reached. Actual level: ${this.adapter.config.BridgenotificationActivation}`,
|
|
@@ -706,8 +706,9 @@ class bridgeClass {
|
|
|
706
706
|
/**
|
|
707
707
|
* @param id Id, wich is to discover
|
|
708
708
|
* @param val Value of the used Id
|
|
709
|
+
* @param options options for special values
|
|
709
710
|
*/
|
|
710
|
-
async publishId(id, val) {
|
|
711
|
+
async publishId(id, val, options) {
|
|
711
712
|
const activeFunction = 'bridge.js - publishId';
|
|
712
713
|
this.adapter.log.debug(`Function ${activeFunction} started.`);
|
|
713
714
|
try {
|
|
@@ -742,9 +743,10 @@ class bridgeClass {
|
|
|
742
743
|
if (typeof val !== 'string') {
|
|
743
744
|
val = JSON.stringify(val);
|
|
744
745
|
}
|
|
745
|
-
|
|
746
|
-
retain
|
|
747
|
-
}
|
|
746
|
+
if (options && !options.reatin === false) {
|
|
747
|
+
options.retain = true;
|
|
748
|
+
}
|
|
749
|
+
await this.bridgeMqttClient.publish(this.PublishedIds[id].state_topic, val, options);
|
|
748
750
|
await this.adapter.setState('info.publishedIds', JSON.stringify(this.PublishedIds), true);
|
|
749
751
|
} else {
|
|
750
752
|
this.adapter.log.debug(`Id ${id} is not set for publish.`);
|
package/main.js
CHANGED
|
@@ -559,7 +559,7 @@ class Lorawan extends utils.Adapter {
|
|
|
559
559
|
this.setState(id, state.val, true);
|
|
560
560
|
}
|
|
561
561
|
} else {
|
|
562
|
-
await this.bridge?.publishId(await this.removeNamespace(id), state.val);
|
|
562
|
+
await this.bridge?.publishId(await this.removeNamespace(id), state.val, {});
|
|
563
563
|
}
|
|
564
564
|
} else {
|
|
565
565
|
// The state was deleted
|