iobroker.lorawan 1.20.20 → 1.20.22

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.20.22 (2026-01-27)
27
+ * (BenAhrdt) change preasure quere to pressure
28
+
29
+ ### 1.20.21 (2026-01-27)
30
+ * (BenAhrdt) set Details to informations and add icons for weateher station / humidity
31
+
26
32
  ### 1.20.20 (2026-01-27)
27
33
  * (BenAhrdt) icon assign changed
28
34
 
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.20.20",
4
+ "version": "1.20.22",
5
5
  "news": {
6
+ "1.20.22": {
7
+ "en": "change preasure quere to pressure",
8
+ "de": "voreinstellungsanfrage zum druck ändern",
9
+ "ru": "изменение преасмента к давлению",
10
+ "pt": "mudança preasure quere à pressão",
11
+ "nl": "verandering preasure quere aan druk",
12
+ "fr": "changement de mesure quere à pression",
13
+ "it": "cambiare la quere preasure alla pressione",
14
+ "es": "cambiar preasure quere a presión",
15
+ "pl": "zmiana preasure quere do ciśnienia",
16
+ "uk": "змінити запобіжний привід для тиску",
17
+ "zh-cn": "将预置排程改为压力"
18
+ },
19
+ "1.20.21": {
20
+ "en": "set Details to informations and add icons for weateher station / humidity",
21
+ "de": "set Details zu Informationen und Icons für Weateher Station / Feuchtigkeit hinzufügen",
22
+ "ru": "установить детали для информации и добавить значки для Weateher станции / влажности",
23
+ "pt": "definir detalhes para informações e adicionar ícones para estação / umidade",
24
+ "nl": "set Details aan informatie en voeg pictogrammen voor weateher station / vochtigheid",
25
+ "fr": "définir les détails aux informations et ajouter des icônes pour la station de soudeuse / humidité",
26
+ "it": "impostare Dettagli alle informazioni e aggiungere icone per la stazione di bagnatura / umidità",
27
+ "es": "set Detalles a información y añadir iconos para estación de weateher / humedad",
28
+ "pl": "ustaw szczegóły informacji i dodaj ikony dla stacji / wilgotności",
29
+ "uk": "встановити деталі до інформації та додати іконки для станції плетіння / вологості",
30
+ "zh-cn": "设置信息的细节并添加编织站/湿度的图标"
31
+ },
6
32
  "1.20.20": {
7
33
  "en": "icon assign changed",
8
34
  "de": "symbol assign geändert",
@@ -67,32 +93,6 @@
67
93
  "pl": "dodać informacje do urządzenia Manager",
68
94
  "uk": "додати інформацію в диспетчер пристроїв",
69
95
  "zh-cn": "向设备管理器添加信息"
70
- },
71
- "1.20.15": {
72
- "en": "sort output for informations",
73
- "de": "sortierausgabe für informationen",
74
- "ru": "сортировать выход для информации",
75
- "pt": "sort output para informações",
76
- "nl": "uitvoer voor informatie sorteren",
77
- "fr": "trier la sortie pour les informations",
78
- "it": "sort output per informazioni",
79
- "es": "salida de tipo para información",
80
- "pl": "sortowanie wyników dla informacji",
81
- "uk": "сортування інформації",
82
- "zh-cn": "信息排序输出"
83
- },
84
- "1.20.13": {
85
- "en": "remove nod from crypto",
86
- "de": "nod from crypto entfernen",
87
- "ru": "удалить nod из crypto",
88
- "pt": "remover aceno do cripto",
89
- "nl": "verwijderen knik uit crypto",
90
- "fr": "enlever le noeud de crypto",
91
- "it": "rimuovere il nodo da crypto",
92
- "es": "quitar el fideo de cripto",
93
- "pl": "usunąć skinienie z krypto",
94
- "uk": "видалити nod з крипто",
95
- "zh-cn": "从加密中删除点头"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -33,7 +33,7 @@ class LoRaWANDeviceManagement extends DeviceManagement {
33
33
  manufacturer: 'LoRaWAN',
34
34
  model: value.informations ? value.informations.devicetype.state.val : undefined, // - ${value.uplink.remaining.rxInfo[0].rssi.ts}`,
35
35
  status: await this.getStatus(value),
36
- hasDetails: value.detectedRoles ? true : false,
36
+ hasDetails: false,
37
37
  actions: [
38
38
  {
39
39
  id: 'rename',
@@ -150,9 +150,12 @@ class LoRaWANDeviceManagement extends DeviceManagement {
150
150
  } else if (deviceValue.detectedRoles['sensor.window']) {
151
151
  return possibleIcons.window;
152
152
  } else if (deviceValue.detectedRoles['value.temperature']) {
153
- if (deviceValue.detectedRoles['value.preasure']) {
153
+ if (deviceValue.detectedRoles['value.pressure']) {
154
154
  return possibleIcons.weatherCurrent;
155
155
  }
156
+ if (deviceValue.detectedRoles['value.humidity']) {
157
+ return possibleIcons.humidity;
158
+ }
156
159
  return possibleIcons.temperature;
157
160
  }
158
161
  }
@@ -245,33 +248,123 @@ class LoRaWANDeviceManagement extends DeviceManagement {
245
248
  * @param context context sendet from Backend
246
249
  */
247
250
  async handleInfo(id, context) {
248
- let deviceInfo = await this.adapter.getStateAsync('info.deviceinformations');
249
- deviceInfo = JSON.parse(deviceInfo.val);
250
- await context.showForm(
251
- {
252
- type: 'panel',
253
- items: {
254
- deviceinfos: {
255
- type: 'text',
256
- readOnly: true,
257
- noClearButton: true,
258
- trim: false,
259
- placeholder: '',
260
- minRows: 10,
261
- },
251
+ const generalItems = {};
252
+ const lastUplinkTs = new Date(
253
+ this.adapter.objectStore.devices[id].informations.lastUplink.state.ts,
254
+ ).toLocaleString('de-DE', {
255
+ weekday: 'long', // Mo
256
+ year: 'numeric', // 2026
257
+ month: '2-digit', // 01
258
+ day: '2-digit', // 24
259
+ hour: '2-digit', // 14
260
+ minute: '2-digit', // 32
261
+ second: '2-digit', // 10
262
+ });
263
+ generalItems['Timestamp_value'] = {
264
+ type: 'staticInfo',
265
+ label: 'LastUplink',
266
+ size: 16,
267
+ data: lastUplinkTs,
268
+ };
269
+ if (this.adapter.objectStore.devices[id].join?.raw?.json?.state?.lc) {
270
+ const lastJoinedLc = new Date(this.adapter.objectStore.devices[id].join.raw.json.state.lc).toLocaleString(
271
+ 'de-DE',
272
+ {
273
+ weekday: 'long', // Mo
274
+ year: 'numeric', // 2026
275
+ month: '2-digit', // 01
276
+ day: '2-digit', // 24
277
+ hour: '2-digit', // 14
278
+ minute: '2-digit', // 32
279
+ second: '2-digit', // 10
262
280
  },
263
- },
264
- {
265
- data: {
266
- deviceinfos: JSON.stringify(
267
- deviceInfo[id].uplink.decoded,
268
- Object.keys(deviceInfo[id].uplink.decoded).sort(),
269
- 2,
270
- ),
281
+ );
282
+ generalItems['Join_value'] = {
283
+ type: 'staticInfo',
284
+ label: 'lastJoined',
285
+ size: 16,
286
+ data: lastJoinedLc,
287
+ };
288
+ } else {
289
+ this.adapter.log.warn(JSON.stringify(this.adapter.objectStore.devices[id].join));
290
+ }
291
+
292
+ generalItems['uplinkDecodedHeader'] = {
293
+ newLine: true,
294
+ type: 'header',
295
+ text: 'Uplink Decoded',
296
+ size: 3,
297
+ };
298
+
299
+ generalItems['uplinkDecoded'] = {
300
+ type: 'text',
301
+ readOnly: true,
302
+ minRows: 10,
303
+ maxRows: 40,
304
+ };
305
+
306
+ let subfolders = {};
307
+ for (const [key, value] of Object.entries(this.adapter.objectStore.devices[id].detectedRoles)) {
308
+ if (key === 'state') {
309
+ continue;
310
+ }
311
+ for (const subfolder in value) {
312
+ if (!subfolders[subfolder]) {
313
+ subfolders[subfolder] = {};
314
+ }
315
+ subfolders[subfolder][key] = true;
316
+ }
317
+ }
318
+ subfolders = Object.fromEntries(Object.entries(subfolders).sort(([a], [b]) => a.localeCompare(b)));
319
+ const roleItems = {};
320
+ for (const subfolder in subfolders) {
321
+ roleItems[subfolder] = {
322
+ newLine: true,
323
+ type: 'header',
324
+ text: subfolder,
325
+ size: 3,
326
+ };
327
+ let detectedRoles = '';
328
+ detectedRoles += Object.keys(subfolders[subfolder])
329
+ .sort((a, b) => a.localeCompare(b))
330
+ .join(' -- ');
331
+
332
+ roleItems[`${subfolder}_Roles`] = {
333
+ newLine: true,
334
+ type: 'staticText',
335
+ text: detectedRoles,
336
+ size: 10,
337
+ };
338
+ }
339
+ const schema = {
340
+ type: 'tabs',
341
+ items: {
342
+ generalTab: {
343
+ type: 'panel',
344
+ label: 'generalInformations',
345
+ items: generalItems,
346
+ },
347
+ roleTab: {
348
+ type: 'panel',
349
+ label: 'detectedRoles',
350
+ items: roleItems,
271
351
  },
272
- title: this.adapter.i18nTranslation['Info of this device'],
273
352
  },
274
- );
353
+ };
354
+
355
+ let deviceInfo = await this.adapter.getStateAsync('info.deviceinformations');
356
+ deviceInfo = JSON.parse(deviceInfo.val);
357
+ const options = {
358
+ data: {
359
+ uplinkDecoded: JSON.stringify(
360
+ deviceInfo[id].uplink.decoded,
361
+ Object.keys(deviceInfo[id].uplink.decoded).sort(),
362
+ 2,
363
+ ),
364
+ },
365
+ title: this.adapter.i18nTranslation['Info of this device'],
366
+ };
367
+ await context.showForm(schema, options);
275
368
  return { refresh: true };
276
369
  }
277
370
 
@@ -321,6 +414,20 @@ class LoRaWANDeviceManagement extends DeviceManagement {
321
414
  this.adapter.log.warn(JSON.stringify(this.adapter.objectStore.devices[id].join));
322
415
  }
323
416
 
417
+ let deviceInfo = await this.adapter.getStateAsync('info.deviceinformations');
418
+ deviceInfo = JSON.parse(deviceInfo.val);
419
+ const data = JSON.stringify(
420
+ deviceInfo[id].uplink.decoded,
421
+ Object.keys(deviceInfo[id].uplink.decoded).sort(),
422
+ 2,
423
+ );
424
+ generalItems['Uplink_decoded'] = {
425
+ type: 'text',
426
+ defaultSendTo: `BS:sendBack:${data}`,
427
+ readOnly: true,
428
+ minRows: 10,
429
+ };
430
+
324
431
  let subfolders = {};
325
432
  for (const [key, value] of Object.entries(this.adapter.objectStore.devices[id].detectedRoles)) {
326
433
  if (key === 'state') {
@@ -347,7 +454,7 @@ class LoRaWANDeviceManagement extends DeviceManagement {
347
454
  lg: 12,
348
455
  xl: 12,
349
456
  };
350
- let detectedRoles = '    ';
457
+ let detectedRoles = '';
351
458
  detectedRoles += Object.keys(subfolders[subfolder])
352
459
  .sort((a, b) => a.localeCompare(b))
353
460
  .join(' -- ');
package/main.js CHANGED
@@ -1224,6 +1224,7 @@ class Lorawan extends utils.Adapter {
1224
1224
  // Handled by Device Manager class itself, so ignored here
1225
1225
  return;
1226
1226
  }
1227
+ this.log.warn(JSON.stringify(obj));
1227
1228
  const activeFunction = 'onMessage';
1228
1229
  this.log.silly(`message received: command = ${obj.command} - message = ${JSON.stringify(obj.message)}`);
1229
1230
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.20.20",
3
+ "version": "1.20.22",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",