iobroker.lorawan 1.18.45 → 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 +7 -0
- package/io-package.json +27 -27
- package/main.js +86 -20
- package/package.json +1 -1
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.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
|
+
|
|
30
|
+
### 1.18.46 (2025-12-06)
|
|
31
|
+
* (BenAhrdt) CustomSend has been extended to include the option of direct push.
|
|
32
|
+
|
|
26
33
|
### 1.18.45 (2025-12-04)
|
|
27
34
|
* (BenAhrdt) improve showing Adapter state (yellw / green)
|
|
28
35
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
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
|
+
},
|
|
19
|
+
"1.18.46": {
|
|
20
|
+
"en": "CustomSend has been extended to include the option of direct push.",
|
|
21
|
+
"de": "CustomSend wurde erweitert, um die Möglichkeit der direkten Push.",
|
|
22
|
+
"ru": "CustomSend был расширен, чтобы включить возможность прямого толчка.",
|
|
23
|
+
"pt": "O CustomSend foi estendido para incluir a opção de push direto.",
|
|
24
|
+
"nl": "AangepastVerzenden is uitgebreid met de optie van directe push.",
|
|
25
|
+
"fr": "CustomSend a été étendu pour inclure l'option de poussée directe.",
|
|
26
|
+
"it": "CustomSend è stato esteso per includere l'opzione di spinta diretta.",
|
|
27
|
+
"es": "CustomSend se ha ampliado para incluir la opción de empuje directo.",
|
|
28
|
+
"pl": "CustomSend został rozszerzony o opcję bezpośredniego pchnięcia.",
|
|
29
|
+
"uk": "CustomSend було розширено, щоб включити опцію прямого натискання.",
|
|
30
|
+
"zh-cn": "CustomSend已被扩展,以包括直接推动的选择."
|
|
31
|
+
},
|
|
6
32
|
"1.18.45": {
|
|
7
33
|
"en": "improve showing Adapter state (yellw / green)",
|
|
8
34
|
"de": "verbesserung des Adapterzustands (gelb / grün)",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "zmiana wysyłania ładunku w przypadku światła",
|
|
68
94
|
"uk": "змінити відправлення корисного навантаження при світлі",
|
|
69
95
|
"zh-cn": "更改发送有效载荷的光线"
|
|
70
|
-
},
|
|
71
|
-
"1.18.40": {
|
|
72
|
-
"en": "change hash",
|
|
73
|
-
"de": "ändern hash",
|
|
74
|
-
"ru": "изменить хеш",
|
|
75
|
-
"pt": "mudar hash",
|
|
76
|
-
"nl": "hash veranderen",
|
|
77
|
-
"fr": "changement hash",
|
|
78
|
-
"it": "cambiamento hash",
|
|
79
|
-
"es": "cambio hash",
|
|
80
|
-
"pl": "zmień hasz",
|
|
81
|
-
"uk": "зміна хеш",
|
|
82
|
-
"zh-cn": "变化散列"
|
|
83
|
-
},
|
|
84
|
-
"1.18.39": {
|
|
85
|
-
"en": "build more roles for contactsensors, in case of role. (window, door, gate ...)",
|
|
86
|
-
"de": "bauen mehr rollen für kontaktsensoren, im falle der rolle. (fenster, tür, tor ...)",
|
|
87
|
-
"ru": "построить больше ролей для контактенсоров, в случае роли. (окно, дверь, ворота...)",
|
|
88
|
-
"pt": "constrói mais papéis para os agentes de contacto, em caso de papel. (janela, porta, portão...)",
|
|
89
|
-
"nl": "meer rollen voor contactpersonen te creëren, in geval van rol. (raam, deur, poort ...)",
|
|
90
|
-
"fr": "construire plus de rôles pour les capteurs de contacts, en cas de rôle. (fenêtre, porte, portail...)",
|
|
91
|
-
"it": "costruire più ruoli per i sensori di contatto, in caso di ruolo. (finestra, porta, cancello ...)",
|
|
92
|
-
"es": "crear más roles para los contactensores, en caso de papel. (ventana, puerta, puerta...)",
|
|
93
|
-
"pl": "budować więcej ról dla czujników kontaktu, w przypadku roli. (okno, drzwi, brama...)",
|
|
94
|
-
"uk": "будувати більше ролей для контакторів, у разі ролі. (вікно, двері, ворота ...)",
|
|
95
|
-
"zh-cn": "为联系人建立更多的角色,如果是角色的话。 (窗,门,门"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/main.js
CHANGED
|
@@ -537,38 +537,104 @@ 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
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
: false
|
|
548
|
-
: downlinkConfig.confirmed,
|
|
549
|
-
Priority: Statevalues[3] ? Statevalues[3] : downlinkConfig.priority,
|
|
543
|
+
payloadInHex: Statevalues[0].toUpperCase(),
|
|
544
|
+
port: downlinkConfig.port,
|
|
545
|
+
confirmed: downlinkConfig.confirmed,
|
|
546
|
+
priority: downlinkConfig.priority,
|
|
547
|
+
push: false,
|
|
550
548
|
};
|
|
551
|
-
//
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
549
|
+
// Assign writen values
|
|
550
|
+
for (const element in Statevalues) {
|
|
551
|
+
if (Statevalues[element] === 'push') {
|
|
552
|
+
StateElements.push = true;
|
|
553
|
+
break;
|
|
554
|
+
}
|
|
555
|
+
if (element === '1') {
|
|
556
|
+
StateElements.port = Number(Statevalues[element]);
|
|
557
|
+
} else if (element === '2') {
|
|
558
|
+
StateElements.confirmed = Statevalues[element] === 'true' ? true : false;
|
|
559
|
+
} else if (element === '3') {
|
|
560
|
+
StateElements.priority = Statevalues[element];
|
|
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
|
+
|
|
609
|
+
// Query about th correct type
|
|
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
|
+
);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
// write into NextSend, or push directly
|
|
620
|
+
if (!StateElements.push) {
|
|
621
|
+
// Write into nextSend
|
|
622
|
+
await this.writeNextSend(changeInfo, StateElements.payloadInHex);
|
|
556
623
|
}
|
|
557
|
-
// Write into nextSend
|
|
558
|
-
await this.writeNextSend(changeInfo, StateElements.PayloadInHex);
|
|
559
624
|
if (
|
|
560
625
|
!changeInfo?.bestMatchForDeviceType ||
|
|
561
626
|
this.downlinkConfighandler?.activeDownlinkConfigs[
|
|
562
627
|
changeInfo.bestMatchForDeviceType
|
|
563
|
-
].sendWithUplink === 'disabled'
|
|
628
|
+
].sendWithUplink === 'disabled' ||
|
|
629
|
+
StateElements.push
|
|
564
630
|
) {
|
|
565
631
|
const downlink = this.downlinkConfighandler?.getDownlink(
|
|
566
632
|
{
|
|
567
|
-
port: StateElements.
|
|
568
|
-
confirmed: StateElements.
|
|
569
|
-
priority: StateElements.
|
|
633
|
+
port: StateElements.port,
|
|
634
|
+
confirmed: StateElements.confirmed,
|
|
635
|
+
priority: StateElements.priority,
|
|
570
636
|
},
|
|
571
|
-
StateElements.
|
|
637
|
+
StateElements.payloadInHex,
|
|
572
638
|
changeInfo,
|
|
573
639
|
);
|
|
574
640
|
if (downlink !== undefined) {
|