iobroker.lorawan 1.13.6 → 1.13.7
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 +4 -0
- package/io-package.json +42 -14
- package/lib/modules/bridge.js +82 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,10 @@ 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.13.7 (2025-09-07)
|
|
27
|
+
* (BenAhrdt) More Informations in Tab
|
|
28
|
+
* (BenAhrdt) Additionals States for published ids & subscribed topics
|
|
29
|
+
|
|
26
30
|
### 1.13.6 (2025-09-06)
|
|
27
31
|
* (BenAhrdt) Bugfix handling in fillDownlink
|
|
28
32
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.13.
|
|
4
|
+
"version": "1.13.7",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.13.7": {
|
|
7
|
+
"en": "More Informations in Tab\nAdditionals States for published ids & subscribed topics",
|
|
8
|
+
"de": "Weitere Informationen in Tab\nZusätzliche Staaten für veröffentlichte ids & abonnierte Themen",
|
|
9
|
+
"ru": "Больше информации в Tab\nДополнительные государства для опубликованных ids и подписанных тем",
|
|
10
|
+
"pt": "Mais informações na aba\nOutros Estados para ids publicados e tópicos subscritos",
|
|
11
|
+
"nl": "Meer informatie in tabblad\nAanvullende staten voor gepubliceerde id's en geabonneerde onderwerpen",
|
|
12
|
+
"fr": "Plus d'informations dans l'onglet\nAutres États pour les ids publiés et les sujets souscrits",
|
|
13
|
+
"it": "Altre informazioni in Tab\nStati addizionali per argomenti pubblicati",
|
|
14
|
+
"es": "Más información en Tab\nEstados adicionales para temas publicados y suscritos",
|
|
15
|
+
"pl": "Więcej informacji w karcie\nPaństwa korzystające z dodatków w odniesieniu do opublikowanych identyfikatorów i subskrybowanych tematów",
|
|
16
|
+
"uk": "Більше інформації в закладці\nДодаткові матеріали для опублікованих носіїв та підписаних тем",
|
|
17
|
+
"zh-cn": "标签中的更多信息\n已公布的编号和已订阅专题的补充国家"
|
|
18
|
+
},
|
|
6
19
|
"1.13.6": {
|
|
7
20
|
"en": "Bugfix handling in fillDownlink",
|
|
8
21
|
"de": "Bugfix Handhabung in fillDownlink",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Więcej Debuglogging\nOgólne Napisywanie w funkcjach\nAktualizacja wydajności fpr ponownie odkryć na cron.",
|
|
81
94
|
"uk": "Детальніше Debuglog\nЗагальна назва функції\nОновлення продуктивності fpr rediscover на cron.",
|
|
82
95
|
"zh-cn": "更多调试日志\n函数中的名称\n性能更新 fpr 重新发现于 cron."
|
|
83
|
-
},
|
|
84
|
-
"1.13.0": {
|
|
85
|
-
"en": "Build fist Version of own Bridge MQTT Client",
|
|
86
|
-
"de": "Erstellen Sie fist Version des eigenen Bridge MQTT Client",
|
|
87
|
-
"ru": "Постройте кулак-версию собственного Bridge MQTT Client",
|
|
88
|
-
"pt": "Construir a versão do punho do próprio cliente MQTT da ponte",
|
|
89
|
-
"nl": "Bouw vuist Versie van eigen Bridge MQTT Client",
|
|
90
|
-
"fr": "Construire la première version de son propre client Bridge MQTT",
|
|
91
|
-
"it": "Creare il pugno Versione di proprio Bridge MQTT Client",
|
|
92
|
-
"es": "Construir la versión de puño propio Bridge MQTT Client",
|
|
93
|
-
"pl": "Zbuduj pięść wersja własnego klienta Bridge MQTT",
|
|
94
|
-
"uk": "Створення fist версії власного Bridge MQTT Клієнт",
|
|
95
|
-
"zh-cn": "构建自有桥 MQTT 客户端的拳头版本"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -448,6 +448,34 @@
|
|
|
448
448
|
},
|
|
449
449
|
"native": {}
|
|
450
450
|
},
|
|
451
|
+
{
|
|
452
|
+
"_id": "info.publishedIds",
|
|
453
|
+
"type": "state",
|
|
454
|
+
"common": {
|
|
455
|
+
"role": "json",
|
|
456
|
+
"name": "Information of all Published States",
|
|
457
|
+
"type": "json",
|
|
458
|
+
"icon": "icons/discover.png",
|
|
459
|
+
"read": true,
|
|
460
|
+
"write": false,
|
|
461
|
+
"def": ""
|
|
462
|
+
},
|
|
463
|
+
"native": {}
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"_id": "info.subscribedTopics",
|
|
467
|
+
"type": "state",
|
|
468
|
+
"common": {
|
|
469
|
+
"role": "json",
|
|
470
|
+
"name": "Information of all Subscribed Topics",
|
|
471
|
+
"type": "json",
|
|
472
|
+
"icon": "icons/discover.png",
|
|
473
|
+
"read": true,
|
|
474
|
+
"write": false,
|
|
475
|
+
"def": ""
|
|
476
|
+
},
|
|
477
|
+
"native": {}
|
|
478
|
+
},
|
|
451
479
|
{
|
|
452
480
|
"_id": "info.deviceinformations",
|
|
453
481
|
"type": "state",
|
package/lib/modules/bridge.js
CHANGED
|
@@ -60,10 +60,10 @@ class bridgeClass {
|
|
|
60
60
|
`The value ${message} is assigned to virtual id: ${this.SubscribedTopics[topic].id}`,
|
|
61
61
|
);
|
|
62
62
|
this.VitualIds[this.SubscribedTopics[topic].id] = message;
|
|
63
|
-
this.adapter.log.warn(`aaa${JSON.stringify(this.VitualIds)}`);
|
|
64
63
|
return;
|
|
65
64
|
}
|
|
66
65
|
await this.adapter.setState(this.SubscribedTopics[topic].id, message);
|
|
66
|
+
await this.adapter.setState('info.subscribedTopics', JSON.stringify(this.DiscoveredIds), true);
|
|
67
67
|
}
|
|
68
68
|
} else {
|
|
69
69
|
this.adapter.log.debug(`The received Topic ${topic} is not subscribed`);
|
|
@@ -182,13 +182,16 @@ class bridgeClass {
|
|
|
182
182
|
mode.Topic = `${this.bridgeMqttClient.BridgePrefix}${mode.ReplacedDeviceIdentifier}/${mode.changeInfo.changedState}`;
|
|
183
183
|
|
|
184
184
|
const indexLastSlashTarget = target.Topic.lastIndexOf('/');
|
|
185
|
+
const ReplacedClimateName = await this.replaceGermanSpecific(config.ClimateName);
|
|
186
|
+
const ReplacedWithoutSpaceClimateName = await this.replaceSpace(ReplacedClimateName);
|
|
187
|
+
const ReplacedWithoutSlashClimateName = await this.replaceSlash(ReplacedWithoutSpaceClimateName);
|
|
185
188
|
const Topic = target.Topic.substring(0, indexLastSlashTarget) + this.EndingVirtualClimate;
|
|
186
|
-
const DiscoveryTopic = `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${target.ReplaceWithoutSlash}/${
|
|
189
|
+
const DiscoveryTopic = `${this.BridgeDiscoveryPrefix[this.adapter.config.BridgeType]}${this.ClimateEntityType}/${target.ReplaceWithoutSlash}/${ReplacedWithoutSlashClimateName}/config`;
|
|
187
190
|
const indexLastDotTarget = config.climateIds.target.lastIndexOf('.');
|
|
188
191
|
const Id = config.climateIds.target.substring(0, indexLastDotTarget) + this.EndingVirtualClimate;
|
|
189
192
|
const DiscoveryPayload = {
|
|
190
193
|
name: config.ClimateName,
|
|
191
|
-
unique_id: `${target.ReplaceWithoutSlash}_${
|
|
194
|
+
unique_id: `${target.ReplaceWithoutSlash}_${ReplacedWithoutSlashClimateName}`.toLowerCase(),
|
|
192
195
|
device: {
|
|
193
196
|
identifiers: [target.ReplaceWithoutSlash.toLowerCase()],
|
|
194
197
|
name: target.DeviceIdentifier,
|
|
@@ -210,6 +213,12 @@ class bridgeClass {
|
|
|
210
213
|
this.SubscribedTopics[target.Topic].id = config.climateIds.target;
|
|
211
214
|
this.SubscribedTopics[target.Topic].val = await this.adapter.getState(config.climateIds.target).val;
|
|
212
215
|
this.SubscribedTopics[target.Topic].ts = Date.now() - this.MinTime;
|
|
216
|
+
this.SubscribedTopics[target.Topic].informations = {
|
|
217
|
+
applicationName: target.changeInfo.applicationName,
|
|
218
|
+
usedApplicationName: target.changeInfo.usedApplicationName,
|
|
219
|
+
deviceId: target.changeInfo.deviceId,
|
|
220
|
+
usedDeviceId: target.changeInfo.usedDeviceId,
|
|
221
|
+
};
|
|
213
222
|
|
|
214
223
|
this.SubscribedTopics[mode.Topic] = {};
|
|
215
224
|
this.SubscribedTopics[mode.Topic].id = config.climateIds.mode;
|
|
@@ -220,6 +229,12 @@ class bridgeClass {
|
|
|
220
229
|
this.SubscribedTopics[mode.Topic].val = await this.adapter.getState(config.climateIds.mode).val;
|
|
221
230
|
}
|
|
222
231
|
this.SubscribedTopics[mode.Topic].ts = Date.now() - this.MinTime;
|
|
232
|
+
this.SubscribedTopics[mode.Topic].informations = {
|
|
233
|
+
applicationName: mode.changeInfo.applicationName,
|
|
234
|
+
usedApplicationName: mode.changeInfo.usedApplicationName,
|
|
235
|
+
deviceId: mode.changeInfo.deviceId,
|
|
236
|
+
usedDeviceId: mode.changeInfo.usedDeviceId,
|
|
237
|
+
};
|
|
223
238
|
|
|
224
239
|
const DiscoveryObject = {
|
|
225
240
|
Topic: Topic,
|
|
@@ -239,6 +254,12 @@ class bridgeClass {
|
|
|
239
254
|
});
|
|
240
255
|
this.PublishedIds[config.climateIds.target].val = 0;
|
|
241
256
|
this.PublishedIds[config.climateIds.target].ts = Date.now();
|
|
257
|
+
this.PublishedIds[config.climateIds.target].informations = {
|
|
258
|
+
applicationName: target.changeInfo.applicationName,
|
|
259
|
+
usedApplicationName: target.changeInfo.usedApplicationName,
|
|
260
|
+
deviceId: target.changeInfo.deviceId,
|
|
261
|
+
usedDeviceId: target.changeInfo.usedDeviceId,
|
|
262
|
+
};
|
|
242
263
|
|
|
243
264
|
// Act
|
|
244
265
|
if (!this.PublishedIds[config.climateIds.act]) {
|
|
@@ -251,6 +272,12 @@ class bridgeClass {
|
|
|
251
272
|
});
|
|
252
273
|
this.PublishedIds[config.climateIds.act].val = 0;
|
|
253
274
|
this.PublishedIds[config.climateIds.act].ts = Date.now();
|
|
275
|
+
this.PublishedIds[config.climateIds.act].informations = {
|
|
276
|
+
applicationName: act.changeInfo.applicationName,
|
|
277
|
+
usedApplicationName: act.changeInfo.usedApplicationName,
|
|
278
|
+
deviceId: act.changeInfo.deviceId,
|
|
279
|
+
usedDeviceId: act.changeInfo.usedDeviceId,
|
|
280
|
+
};
|
|
254
281
|
|
|
255
282
|
// Mode
|
|
256
283
|
if (!this.PublishedIds[config.climateIds.mode]) {
|
|
@@ -263,11 +290,37 @@ class bridgeClass {
|
|
|
263
290
|
});
|
|
264
291
|
this.PublishedIds[config.climateIds.mode].val = 0;
|
|
265
292
|
this.PublishedIds[config.climateIds.mode].ts = Date.now();
|
|
293
|
+
this.PublishedIds[config.climateIds.mode].informations = {
|
|
294
|
+
applicationName: mode.changeInfo.applicationName,
|
|
295
|
+
usedApplicationName: mode.changeInfo.usedApplicationName,
|
|
296
|
+
deviceId: mode.changeInfo.deviceId,
|
|
297
|
+
usedDeviceId: mode.changeInfo.usedDeviceId,
|
|
298
|
+
};
|
|
266
299
|
|
|
267
300
|
// Publishing the discover message
|
|
268
301
|
await this.publishDiscovery(Id, {
|
|
269
302
|
topic: DiscoveryObject?.topic,
|
|
270
303
|
payload: structuredClone(DiscoveryObject.payload),
|
|
304
|
+
informations: {
|
|
305
|
+
target: {
|
|
306
|
+
applicationName: target.changeInfo.applicationName,
|
|
307
|
+
usedApplicationName: target.changeInfo.usedApplicationName,
|
|
308
|
+
deviceId: target.changeInfo.deviceId,
|
|
309
|
+
usedDeviceId: target.changeInfo.usedDeviceId,
|
|
310
|
+
},
|
|
311
|
+
act: {
|
|
312
|
+
applicationName: act.changeInfo.applicationName,
|
|
313
|
+
usedApplicationName: act.changeInfo.usedApplicationName,
|
|
314
|
+
deviceId: act.changeInfo.deviceId,
|
|
315
|
+
usedDeviceId: act.changeInfo.usedDeviceId,
|
|
316
|
+
},
|
|
317
|
+
mode: {
|
|
318
|
+
applicationName: mode.changeInfo.applicationName,
|
|
319
|
+
usedApplicationName: mode.changeInfo.usedApplicationName,
|
|
320
|
+
deviceId: mode.changeInfo.deviceId,
|
|
321
|
+
usedDeviceId: mode.changeInfo.usedDeviceId,
|
|
322
|
+
},
|
|
323
|
+
},
|
|
271
324
|
});
|
|
272
325
|
await this.publishId(config.climateIds.target, this.SubscribedTopics[target.Topic].val);
|
|
273
326
|
await this.publishId(config.climateIds.act, await this.adapter.getState(config.climateIds.act).val);
|
|
@@ -306,7 +359,7 @@ class bridgeClass {
|
|
|
306
359
|
if (config.ClimateName === '') {
|
|
307
360
|
return false;
|
|
308
361
|
}
|
|
309
|
-
const indexOfSpace = config.ClimateName.indexOf(' ');
|
|
362
|
+
const indexOfSpace = config.ClimateName.indexOf(' -- ');
|
|
310
363
|
if (indexOfSpace > 0) {
|
|
311
364
|
config.ClimateName = config.ClimateName.substring(0, indexOfSpace);
|
|
312
365
|
}
|
|
@@ -349,6 +402,7 @@ class bridgeClass {
|
|
|
349
402
|
await this.bridgeMqttClient.publish(this.PublishedIds[id].Topic, val, {
|
|
350
403
|
retain: true,
|
|
351
404
|
});
|
|
405
|
+
await this.adapter.setState('info.publishedIds', JSON.stringify(this.PublishedIds), true);
|
|
352
406
|
}
|
|
353
407
|
} else {
|
|
354
408
|
this.adapter.log.debug(`Id not for publish used.`);
|
|
@@ -407,6 +461,12 @@ class bridgeClass {
|
|
|
407
461
|
});
|
|
408
462
|
this.PublishedIds[id].val = 0;
|
|
409
463
|
this.PublishedIds[id].ts = Date.now();
|
|
464
|
+
this.PublishedIds[id].informations = {
|
|
465
|
+
applicationName: changeInfo.applicationName,
|
|
466
|
+
usedApplicationName: changeInfo.usedApplicationName,
|
|
467
|
+
deviceId: changeInfo.deviceId,
|
|
468
|
+
usedDeviceId: changeInfo.usedDeviceId,
|
|
469
|
+
};
|
|
410
470
|
}
|
|
411
471
|
if (Bridgestate.subscribe) {
|
|
412
472
|
this.SubscribedTopics[DiscoveryObject?.Topic] = {};
|
|
@@ -417,6 +477,12 @@ class bridgeClass {
|
|
|
417
477
|
await this.publishDiscovery(id, {
|
|
418
478
|
topic: DiscoveryObject?.topic,
|
|
419
479
|
payload: structuredClone(DiscoveryObject?.payload),
|
|
480
|
+
informations: {
|
|
481
|
+
applicationName: changeInfo.applicationName,
|
|
482
|
+
usedApplicationName: changeInfo.usedApplicationName,
|
|
483
|
+
deviceId: changeInfo.deviceId,
|
|
484
|
+
usedDeviceId: changeInfo.usedDeviceId,
|
|
485
|
+
},
|
|
420
486
|
});
|
|
421
487
|
}
|
|
422
488
|
}
|
|
@@ -465,6 +531,12 @@ class bridgeClass {
|
|
|
465
531
|
});
|
|
466
532
|
this.PublishedIds[id].val = 0;
|
|
467
533
|
this.PublishedIds[id].ts = Date.now();
|
|
534
|
+
this.PublishedIds[id].informations = {
|
|
535
|
+
applicationName: changeInfo.applicationName,
|
|
536
|
+
usedApplicationName: changeInfo.usedApplicationName,
|
|
537
|
+
deviceId: changeInfo.deviceId,
|
|
538
|
+
usedDeviceId: changeInfo.usedDeviceId,
|
|
539
|
+
};
|
|
468
540
|
}
|
|
469
541
|
if (Bridgestate.subscribe) {
|
|
470
542
|
this.SubscribedTopics[DiscoveryObject?.Topic] = {};
|
|
@@ -475,6 +547,12 @@ class bridgeClass {
|
|
|
475
547
|
await this.publishDiscovery(id, {
|
|
476
548
|
topic: DiscoveryObject?.topic,
|
|
477
549
|
payload: structuredClone(DiscoveryObject?.payload),
|
|
550
|
+
informations: {
|
|
551
|
+
applicationName: changeInfo.applicationName,
|
|
552
|
+
usedApplicationName: changeInfo.usedApplicationName,
|
|
553
|
+
deviceId: changeInfo.deviceId,
|
|
554
|
+
usedDeviceId: changeInfo.usedDeviceId,
|
|
555
|
+
},
|
|
478
556
|
});
|
|
479
557
|
}
|
|
480
558
|
}
|