iobroker.lorawan 1.18.46 → 1.18.47
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 +14 -14
- package/main.js +55 -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.18.47 (2025-12-09)
|
|
27
|
+
* (BenAhrdt) CustomSend becomes possibility for different order of parameters.
|
|
28
|
+
payloadInHex, port, confirmed, priority, push (push is written as string 'push')
|
|
29
|
+
|
|
26
30
|
### 1.18.46 (2025-12-06)
|
|
27
31
|
* (BenAhrdt) CustomSend has been extended to include the option of direct push.
|
|
28
32
|
|
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.47",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.18.47": {
|
|
7
|
+
"en": "* CustomSend becomes possibility for different order of parameters.\n payloadInHex, port, confirmed, priority, push (push is written as string 'push')",
|
|
8
|
+
"de": "* CustomSend wird Möglichkeit für verschiedene Parameterreihenfolge.\nnutzlast InHex, Port, bestätigt, Priorität, Push (Push wird als String 'Push' geschrieben)",
|
|
9
|
+
"ru": "* CustomSend становится возможностью для различных порядков параметров.\nполезная нагрузка InHex, порт, подтвержденный, приоритет, push (push пишется как строка «push»)",
|
|
10
|
+
"pt": "* CustomSend torna-se possibilidade para diferentes ordens de parâmetros.\ncarga útil InHex, porto, confirmado, prioridade, push (empurra é escrito como string 'push')",
|
|
11
|
+
"nl": "* AangepastVerzenden wordt mogelijk voor verschillende orde van parameters.\nlaadvermogen InHex, poort, bevestigd, prioriteit, push (push is geschreven als string 'push')",
|
|
12
|
+
"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\")",
|
|
13
|
+
"it": "* CustomSend diventa possibilità per ordine diverso di parametri.\ncarico utile InHex, porto, confermato, priorità, spinta (push è scritto come stringa 'push')",
|
|
14
|
+
"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')",
|
|
15
|
+
"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')",
|
|
16
|
+
"uk": "* Користувальницька робота на різних параметрах.\nзавантажити InHex, порт, підтверджений, пріоритет, штовхач (подушка написана як рядок 'push')",
|
|
17
|
+
"zh-cn": "* CustomSend成为不同参数顺序的可能.\n有效载荷 InHex, 端口, 确认, 优先级, 推( 推为字符串“ push” )"
|
|
18
|
+
},
|
|
6
19
|
"1.18.46": {
|
|
7
20
|
"en": "CustomSend has been extended to include the option of direct push.",
|
|
8
21
|
"de": "CustomSend wurde erweitert, um die Möglichkeit der direkten Push.",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "zmiana wysyłania ładunku w przypadku światła",
|
|
81
94
|
"uk": "змінити відправлення корисного навантаження при світлі",
|
|
82
95
|
"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(
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
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
|