iobroker.lorawan 1.18.46 → 1.18.48

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,13 @@ 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.48 (2025-12-16)
27
+ * (BenAhrdt) Set the selection to usedNames (application and device)
28
+
29
+ ### 1.18.47 (2025-12-09)
30
+ * (BenAhrdt) CustomSend becomes possibility for different order of parameters.
31
+ payloadInHex, port, confirmed, priority, push (push is written as string 'push')
32
+
26
33
  ### 1.18.46 (2025-12-06)
27
34
  * (BenAhrdt) CustomSend has been extended to include the option of direct push.
28
35
 
package/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.46",
4
+ "version": "1.18.48",
5
5
  "news": {
6
+ "1.18.48": {
7
+ "en": "Set the selection to usedNames (application and device)",
8
+ "de": "Setzen Sie die Auswahl auf gebrauchtNamen (Anwendung und Gerät)",
9
+ "ru": "Установите выбор используемых имен (приложения и устройства)",
10
+ "pt": "Define a seleção para nomes usados (aplicação e dispositivo)",
11
+ "nl": "De selectie instellen op gebruikte Namen (toepassing en apparaat)",
12
+ "fr": "Définissez la sélection aux noms utilisés (application et périphérique)",
13
+ "it": "Impostare la selezione per i nomi utilizzati (applicazione e dispositivo)",
14
+ "es": "Establecer la selección para utilizarNames (aplicación y dispositivo)",
15
+ "pl": "Ustaw wybór na używane Nazwy (aplikacja i urządzenie)",
16
+ "uk": "Налаштуйте вибір для використанняНазви (застосування та пристрій)",
17
+ "zh-cn": "将选中区域设定为使用的名称( 应用程序和设备)"
18
+ },
19
+ "1.18.47": {
20
+ "en": "* CustomSend becomes possibility for different order of parameters.\n payloadInHex, port, confirmed, priority, push (push is written as string 'push')",
21
+ "de": "* CustomSend wird Möglichkeit für verschiedene Parameterreihenfolge.\nnutzlast InHex, Port, bestätigt, Priorität, Push (Push wird als String 'Push' geschrieben)",
22
+ "ru": "* CustomSend становится возможностью для различных порядков параметров.\nполезная нагрузка InHex, порт, подтвержденный, приоритет, push (push пишется как строка «push»)",
23
+ "pt": "* CustomSend torna-se possibilidade para diferentes ordens de parâmetros.\ncarga útil InHex, porto, confirmado, prioridade, push (empurra é escrito como string 'push')",
24
+ "nl": "* AangepastVerzenden wordt mogelijk voor verschillende orde van parameters.\nlaadvermogen InHex, poort, bevestigd, prioriteit, push (push is geschreven als string 'push')",
25
+ "fr": "* CustomSend devient possibilité pour différents ordres de paramètres.\ncharge utile InHex, port, confirmé, priorité, push (push est écrit comme chaîne de caractères \"push\")",
26
+ "it": "* CustomSend diventa possibilità per ordine diverso di parametri.\ncarico utile InHex, porto, confermato, priorità, spinta (push è scritto come stringa 'push')",
27
+ "es": "* CustomSend se convierte en posibilidad para diferentes tipos de parámetros.\ncarga útil InHex, port, confirmed, priority, push (push está escrito como cadena 'push')",
28
+ "pl": "* CustomSend staje się możliwością dla różnych kolejności parametrów.\nładowność InHex, port, potwierdzone, priorytet, push (push jest zapisany jako ciąg 'push')",
29
+ "uk": "* Користувальницька робота на різних параметрах.\nзавантажити InHex, порт, підтверджений, пріоритет, штовхач (подушка написана як рядок 'push')",
30
+ "zh-cn": "* CustomSend成为不同参数顺序的可能.\n有效载荷 InHex, 端口, 确认, 优先级, 推( 推为字符串“ push” )"
31
+ },
6
32
  "1.18.46": {
7
33
  "en": "CustomSend has been extended to include the option of direct push.",
8
34
  "de": "CustomSend wurde erweitert, um die Möglichkeit der direkten Push.",
@@ -67,32 +93,6 @@
67
93
  "pl": "zmiana bramy na garaż _ door w binarnym _ sensor",
68
94
  "uk": "змінити ворота в гараж_критий в бінарних_сенсор",
69
95
  "zh-cn": "在二进制中将门改为车库_门_传感器"
70
- },
71
- "1.18.41": {
72
- "en": "change sending the payload in case of light",
73
- "de": "änderung des sendens der nutzlast bei licht",
74
- "ru": "изменение отправки полезной нагрузки в случае света",
75
- "pt": "alterar o envio da carga útil em caso de luz",
76
- "nl": "verandering in het verzenden van de lading in geval van licht",
77
- "fr": "changement d'envoi de la charge utile en cas de lumière",
78
- "it": "cambiare inviando il carico utile in caso di luce",
79
- "es": "cambio enviar la carga útil en caso de luz",
80
- "pl": "zmiana wysyłania ładunku w przypadku światła",
81
- "uk": "змінити відправлення корисного навантаження при світлі",
82
- "zh-cn": "更改发送有效载荷的光线"
83
- },
84
- "1.18.40": {
85
- "en": "change hash",
86
- "de": "ändern hash",
87
- "ru": "изменить хеш",
88
- "pt": "mudar hash",
89
- "nl": "hash veranderen",
90
- "fr": "changement hash",
91
- "it": "cambiamento hash",
92
- "es": "cambio hash",
93
- "pl": "zmień hasz",
94
- "uk": "зміна хеш",
95
- "zh-cn": "变化散列"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/main.js CHANGED
@@ -537,6 +537,7 @@ class Lorawan extends utils.Adapter {
537
537
  this.downlinkConfighandler?.activeDownlinkConfigs[
538
538
  changeInfo.bestMatchForDeviceType
539
539
  ];
540
+ /* Alte Zuweisung
540
541
  const Statevalues = state.val.split(',');
541
542
  const StateElements = {
542
543
  payloadInHex: Statevalues[0].toUpperCase(),
@@ -559,12 +560,62 @@ class Lorawan extends utils.Adapter {
559
560
  StateElements.priority = Statevalues[element];
560
561
  }
561
562
  }
563
+ */
564
+ // Eingefügt am 09.12.2026
565
+ const Statevalues = state.val.split(',');
566
+
567
+ const StateElements = {
568
+ payloadInHex: null,
569
+ port: downlinkConfig.port,
570
+ confirmed: downlinkConfig.confirmed,
571
+ priority: downlinkConfig.priority,
572
+ push: false,
573
+ };
574
+
575
+ for (const raw of Statevalues) {
576
+ const element = raw.trim();
577
+
578
+ // --- push ---
579
+ if (element.toLowerCase() === 'push') {
580
+ StateElements.push = true;
581
+ continue;
582
+ }
583
+
584
+ // --- confirmed (boolean) ---
585
+ if (element === 'true' || element === 'false') {
586
+ StateElements.confirmed = element === 'true';
587
+ continue;
588
+ }
589
+
590
+ // --- port (number) ---
591
+ if (/^\d+$/.test(element)) {
592
+ StateElements.port = Number(element);
593
+ continue;
594
+ }
595
+
596
+ // --- payloadInHex: reiner Hex-String ---
597
+ if (/^[0-9A-Fa-f]+$/.test(element)) {
598
+ StateElements.payloadInHex = element.toUpperCase();
599
+ continue;
600
+ }
601
+
602
+ // --- priority: alles, was kein reiner Hex-String ist ---
603
+ if (/[^0-9A-Fa-f]/.test(element)) {
604
+ StateElements.priority = element;
605
+ continue;
606
+ }
607
+ }
608
+
562
609
  // Query about th correct type
563
- this.log.debug('The following values are detected at input of custom send state');
564
- for (const element of Object.values(StateElements)) {
565
- this.log.debug(typeof element);
566
- this.log.debug(element);
610
+ this.log.debug(
611
+ 'The following values are detected / used at input of custom send state',
612
+ );
613
+ for (const element in StateElements) {
614
+ this.log.debug(
615
+ `${element}: Type: ${typeof StateElements[element]} - Value: ${StateElements[element]}`,
616
+ );
567
617
  }
618
+
568
619
  // write into NextSend, or push directly
569
620
  if (!StateElements.push) {
570
621
  // Write into nextSend
@@ -1292,7 +1343,7 @@ class Lorawan extends utils.Adapter {
1292
1343
  if (adapterObject.type === 'folder' && adapterObject._id.endsWith('uplink')) {
1293
1344
  adapterObject._id = this.removeNamespace(adapterObject._id);
1294
1345
  const changeInfo = await this.getChangeInfo(adapterObject._id);
1295
- const label = changeInfo?.applicationName;
1346
+ const label = changeInfo?.usedApplicationName;
1296
1347
  const value = changeInfo?.applicationId;
1297
1348
  if (!currentApplications[value]) {
1298
1349
  currentApplications[value] = value;
@@ -1324,7 +1375,7 @@ class Lorawan extends utils.Adapter {
1324
1375
  ) {
1325
1376
  adapterObject._id = this.removeNamespace(adapterObject._id);
1326
1377
  const changeInfo = await this.getChangeInfo(adapterObject._id);
1327
- const label = changeInfo?.deviceId;
1378
+ const label = changeInfo?.usedDeviceId;
1328
1379
  const value = changeInfo?.deviceEUI;
1329
1380
  devices[myCount] = { label: label, value: value };
1330
1381
  myCount++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.18.46",
3
+ "version": "1.18.48",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",