iobroker.lorawan 1.18.27 → 1.18.28
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 +48 -28
- 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.18.28 (2025-11-27)
|
|
27
|
+
* (BenAhrdt) assign comment 'from bridge' to state, if the value is set by bridge
|
|
28
|
+
|
|
26
29
|
### 1.18.27 (2025-11-27)
|
|
27
30
|
* (BenAhrdt) wright incomming dataexchange with ack = true
|
|
28
31
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.18.
|
|
4
|
+
"version": "1.18.28",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.18.28": {
|
|
7
|
+
"en": "assign comment 'from bridge' to state, if the value is set by bridge",
|
|
8
|
+
"de": "kommentar 'von der brücke' zum zustand zuordnen, wenn der wert von der brücke gesetzt wird",
|
|
9
|
+
"ru": "присвоить комментарий «от моста» государству, если значение установлено мостом",
|
|
10
|
+
"pt": "atribuir o comentário 'da ponte' ao estado, se o valor for definido pela ponte",
|
|
11
|
+
"nl": "commentaar 'van brug' toewijzen aan status, als de waarde door brug wordt ingesteld",
|
|
12
|
+
"fr": "assigner le commentaire 'from bridge' à l'état, si la valeur est définie par bridge",
|
|
13
|
+
"it": "assegnare commento 'da ponte' a stato, se il valore è impostato da ponte",
|
|
14
|
+
"es": "asignar comentario 'de puente' a estado, si el valor se establece por puente",
|
|
15
|
+
"pl": "przypisz komentarz \"z mostu\" do stanu, jeśli wartość jest ustawiona przez most",
|
|
16
|
+
"uk": "призначте коментар «з місту» до держави, якщо значення встановлене містом",
|
|
17
|
+
"zh-cn": "如果值由桥来设定, 则将注释“ 从桥” 指定为状态"
|
|
18
|
+
},
|
|
6
19
|
"1.18.27": {
|
|
7
20
|
"en": "wright incomming dataexchange with ack = true",
|
|
8
21
|
"de": "wright incoming dataexchange mit ack = true",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Komunikat Bugfix do przepłukiwania z odkrytym urządzeniem",
|
|
81
94
|
"uk": "Повідомлень про помилку при відкритті пристрою",
|
|
82
95
|
"zh-cn": "用已发现的设备绑定错误修正消息"
|
|
83
|
-
},
|
|
84
|
-
"1.18.21": {
|
|
85
|
-
"en": "Bugfix reading value for light in puslish",
|
|
86
|
-
"de": "Bugfix Lesewert für Licht in puslish",
|
|
87
|
-
"ru": "Bugfix значение чтения для света в puslish",
|
|
88
|
-
"pt": "Valor de leitura de erros para a luz em puslish",
|
|
89
|
-
"nl": "Bugfix leeswaarde voor licht in het Nederlands",
|
|
90
|
-
"fr": "Valeur de lecture Bugfix pour la lumière en puslish",
|
|
91
|
-
"it": "Bugfix valore di lettura per la luce in inglese",
|
|
92
|
-
"es": "Valor de lectura de Bugfix para luz en puslish",
|
|
93
|
-
"pl": "Wartość odczytu bugfix dla światła w pussish",
|
|
94
|
-
"uk": "Помилки для читання значення для світла в puslish",
|
|
95
|
-
"zh-cn": "Puslish 中的光线错误修正读值"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/lib/modules/bridge.js
CHANGED
|
@@ -222,33 +222,39 @@ class bridgeClass {
|
|
|
222
222
|
if (this.SubscribedTopics[topic].light) {
|
|
223
223
|
if (message.state) {
|
|
224
224
|
message.state = message.state === 'ON' ? true : false;
|
|
225
|
-
await this.adapter.setForeignStateAsync(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
);
|
|
225
|
+
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.onOff, {
|
|
226
|
+
val: message.state,
|
|
227
|
+
c: 'from bridge',
|
|
228
|
+
});
|
|
229
229
|
}
|
|
230
230
|
if (message.brightness) {
|
|
231
|
-
await this.adapter.setForeignStateAsync(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
);
|
|
231
|
+
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.brightness, {
|
|
232
|
+
val: message.brightness,
|
|
233
|
+
c: 'from bridge',
|
|
234
|
+
});
|
|
235
235
|
}
|
|
236
236
|
if (message.color) {
|
|
237
237
|
const color = this.rgbToHex(message.color);
|
|
238
|
-
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.color,
|
|
238
|
+
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.color, {
|
|
239
|
+
val: color,
|
|
240
|
+
c: 'from bridge',
|
|
241
|
+
});
|
|
239
242
|
}
|
|
240
243
|
if (message.effect) {
|
|
241
244
|
const effect = this.SubscribedTopics[topic].effects[message.effect]
|
|
242
245
|
? this.SubscribedTopics[topic].effects[message.effect]
|
|
243
246
|
: '';
|
|
244
|
-
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.effects,
|
|
247
|
+
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].LightIds.effects, {
|
|
248
|
+
val: effect,
|
|
249
|
+
c: 'from bridge',
|
|
250
|
+
});
|
|
245
251
|
}
|
|
246
252
|
return;
|
|
247
253
|
}
|
|
248
254
|
if (this.SubscribedTopics[topic].cover) {
|
|
249
|
-
if (this.SubscribedTopics[topic].
|
|
250
|
-
if (this.SubscribedTopics[topic].
|
|
251
|
-
message = this.SubscribedTopics[topic].
|
|
255
|
+
if (this.SubscribedTopics[topic].messageAssign) {
|
|
256
|
+
if (this.SubscribedTopics[topic].messageAssign[message]) {
|
|
257
|
+
message = this.SubscribedTopics[topic].messageAssign[message];
|
|
252
258
|
} else {
|
|
253
259
|
this.adapter.log.warn(
|
|
254
260
|
`Incomming Message: ${message} at topic: ${topic} can not be found in possible values.`,
|
|
@@ -264,18 +270,32 @@ class bridgeClass {
|
|
|
264
270
|
if (typeof message === 'object') {
|
|
265
271
|
message = JSON.stringify(message);
|
|
266
272
|
}
|
|
267
|
-
await this.adapter.setState(
|
|
273
|
+
await this.adapter.setState(
|
|
274
|
+
this.SubscribedTopics[topic].id,
|
|
275
|
+
{ val: message, c: 'from bridge' },
|
|
276
|
+
true,
|
|
277
|
+
);
|
|
268
278
|
} else {
|
|
269
|
-
await this.adapter.setState(this.SubscribedTopics[topic].id,
|
|
279
|
+
await this.adapter.setState(this.SubscribedTopics[topic].id, {
|
|
280
|
+
val: message,
|
|
281
|
+
c: 'from bridge',
|
|
282
|
+
});
|
|
270
283
|
}
|
|
271
284
|
} else {
|
|
272
|
-
if (this.SubscribedTopics[topic].
|
|
273
|
-
await this.adapter.setForeignStateAsync(message.id, message.val);
|
|
285
|
+
if (this.SubscribedTopics[topic].messageAssign) {
|
|
286
|
+
await this.adapter.setForeignStateAsync(message.id, { val: message.val, c: 'from bridge' });
|
|
274
287
|
} else {
|
|
275
|
-
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].id,
|
|
288
|
+
await this.adapter.setForeignStateAsync(this.SubscribedTopics[topic].id, {
|
|
289
|
+
val: message,
|
|
290
|
+
c: 'from bridge',
|
|
291
|
+
});
|
|
276
292
|
}
|
|
277
293
|
}
|
|
278
|
-
await this.adapter.setState(
|
|
294
|
+
await this.adapter.setState(
|
|
295
|
+
'info.subscribedTopics',
|
|
296
|
+
{ val: JSON.stringify(this.SubscribedTopics), c: 'from bridge' },
|
|
297
|
+
true,
|
|
298
|
+
);
|
|
279
299
|
} else {
|
|
280
300
|
this.adapter.log.debug(`The received Topic ${topic} is not subscribed`);
|
|
281
301
|
}
|
|
@@ -801,9 +821,9 @@ class bridgeClass {
|
|
|
801
821
|
}
|
|
802
822
|
|
|
803
823
|
if (this.PublishedIds[id].publish[publishTopic].cover) {
|
|
804
|
-
if (this.PublishedIds[id].publish[publishTopic].
|
|
805
|
-
if (this.PublishedIds[id].publish[publishTopic].
|
|
806
|
-
val = this.PublishedIds[id].publish[publishTopic].
|
|
824
|
+
if (this.PublishedIds[id].publish[publishTopic].messageAssign) {
|
|
825
|
+
if (this.PublishedIds[id].publish[publishTopic].messageAssign[val]) {
|
|
826
|
+
val = this.PublishedIds[id].publish[publishTopic].messageAssign[val];
|
|
807
827
|
} else {
|
|
808
828
|
val = '';
|
|
809
829
|
}
|
|
@@ -2771,7 +2791,7 @@ class bridgeClass {
|
|
|
2771
2791
|
DiscoveryTopic,
|
|
2772
2792
|
DiscoveryPayload,
|
|
2773
2793
|
Id,
|
|
2774
|
-
{ cover: true, command: true,
|
|
2794
|
+
{ cover: true, command: true, messageAssign: setAssign },
|
|
2775
2795
|
);
|
|
2776
2796
|
|
|
2777
2797
|
// Position
|
|
@@ -2801,7 +2821,7 @@ class bridgeClass {
|
|
|
2801
2821
|
DiscoveryTopic,
|
|
2802
2822
|
DiscoveryPayload,
|
|
2803
2823
|
`${coverTopic}${this.EndingState}`,
|
|
2804
|
-
{ cover: true,
|
|
2824
|
+
{ cover: true, messageAssign: { true: 'OPEN' } },
|
|
2805
2825
|
);
|
|
2806
2826
|
}
|
|
2807
2827
|
|
|
@@ -2816,7 +2836,7 @@ class bridgeClass {
|
|
|
2816
2836
|
DiscoveryTopic,
|
|
2817
2837
|
DiscoveryPayload,
|
|
2818
2838
|
`${coverTopic}${this.EndingState}`,
|
|
2819
|
-
{ cover: true,
|
|
2839
|
+
{ cover: true, messageAssign: { true: 'CLOSE' } },
|
|
2820
2840
|
);
|
|
2821
2841
|
}
|
|
2822
2842
|
|
|
@@ -2831,7 +2851,7 @@ class bridgeClass {
|
|
|
2831
2851
|
DiscoveryTopic,
|
|
2832
2852
|
DiscoveryPayload,
|
|
2833
2853
|
`${coverTopic}${this.EndingState}`,
|
|
2834
|
-
{ cover: true,
|
|
2854
|
+
{ cover: true, messageAssign: { true: 'STOP' } },
|
|
2835
2855
|
);
|
|
2836
2856
|
}
|
|
2837
2857
|
|
|
@@ -2878,7 +2898,7 @@ class bridgeClass {
|
|
|
2878
2898
|
DiscoveryTopic,
|
|
2879
2899
|
DiscoveryPayload,
|
|
2880
2900
|
`${coverTopic}${this.EndingState}`,
|
|
2881
|
-
{ cover: true,
|
|
2901
|
+
{ cover: true, messageAssign: { [openKey]: 'open', [closingKey]: 'closing' } },
|
|
2882
2902
|
);
|
|
2883
2903
|
}
|
|
2884
2904
|
|
|
@@ -2897,7 +2917,7 @@ class bridgeClass {
|
|
|
2897
2917
|
`${coverTopic}${this.EndingState}`,
|
|
2898
2918
|
{
|
|
2899
2919
|
cover: true,
|
|
2900
|
-
|
|
2920
|
+
messageAssign: { [closedKey]: 'closed', [openingKey]: 'opening' },
|
|
2901
2921
|
},
|
|
2902
2922
|
);
|
|
2903
2923
|
}
|