iobroker.lorawan 1.18.44 → 1.18.46
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 +6 -0
- package/io-package.json +27 -27
- package/lib/modules/bridgeMqttclient.js +4 -2
- package/main.js +32 -17
- package/package.json +1 -1
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.18.46 (2025-12-06)
|
|
27
|
+
* (BenAhrdt) CustomSend has been extended to include the option of direct push.
|
|
28
|
+
|
|
29
|
+
### 1.18.45 (2025-12-04)
|
|
30
|
+
* (BenAhrdt) improve showing Adapter state (yellw / green)
|
|
31
|
+
|
|
26
32
|
### 1.18.44 (2025-12-02)
|
|
27
33
|
* (BenAhrdt) add mixed to possible value types in config
|
|
28
34
|
|
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.46",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.18.46": {
|
|
7
|
+
"en": "CustomSend has been extended to include the option of direct push.",
|
|
8
|
+
"de": "CustomSend wurde erweitert, um die Möglichkeit der direkten Push.",
|
|
9
|
+
"ru": "CustomSend был расширен, чтобы включить возможность прямого толчка.",
|
|
10
|
+
"pt": "O CustomSend foi estendido para incluir a opção de push direto.",
|
|
11
|
+
"nl": "AangepastVerzenden is uitgebreid met de optie van directe push.",
|
|
12
|
+
"fr": "CustomSend a été étendu pour inclure l'option de poussée directe.",
|
|
13
|
+
"it": "CustomSend è stato esteso per includere l'opzione di spinta diretta.",
|
|
14
|
+
"es": "CustomSend se ha ampliado para incluir la opción de empuje directo.",
|
|
15
|
+
"pl": "CustomSend został rozszerzony o opcję bezpośredniego pchnięcia.",
|
|
16
|
+
"uk": "CustomSend було розширено, щоб включити опцію прямого натискання.",
|
|
17
|
+
"zh-cn": "CustomSend已被扩展,以包括直接推动的选择."
|
|
18
|
+
},
|
|
19
|
+
"1.18.45": {
|
|
20
|
+
"en": "improve showing Adapter state (yellw / green)",
|
|
21
|
+
"de": "verbesserung des Adapterzustands (gelb / grün)",
|
|
22
|
+
"ru": "улучшение отображения состояния адаптера (yellw / green)",
|
|
23
|
+
"pt": "melhorar mostrando o estado do adaptador (Yellw / verde)",
|
|
24
|
+
"nl": "verbetering van de stand van de adapter (geel / groen)",
|
|
25
|
+
"fr": "améliorer l'état de l'adaptateur (yellw / vert)",
|
|
26
|
+
"it": "migliorare lo stato dell'adattatore di visualizzazione (yellw / green)",
|
|
27
|
+
"es": "mejorar la visualización del estado del adaptador (yellw / verde)",
|
|
28
|
+
"pl": "poprawić wyświetlanie stanu Adapter (yellw / green)",
|
|
29
|
+
"uk": "поліпшення демонстрації стану адаптера (жовтий / зелений)",
|
|
30
|
+
"zh-cn": "改进显示适配器状态( yallw / 绿色)"
|
|
31
|
+
},
|
|
6
32
|
"1.18.44": {
|
|
7
33
|
"en": "add mixed to possible value types in config",
|
|
8
34
|
"de": "hinzufügen zu möglichen werttypen in config",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "zmień hasz",
|
|
68
94
|
"uk": "зміна хеш",
|
|
69
95
|
"zh-cn": "变化散列"
|
|
70
|
-
},
|
|
71
|
-
"1.18.39": {
|
|
72
|
-
"en": "build more roles for contactsensors, in case of role. (window, door, gate ...)",
|
|
73
|
-
"de": "bauen mehr rollen für kontaktsensoren, im falle der rolle. (fenster, tür, tor ...)",
|
|
74
|
-
"ru": "построить больше ролей для контактенсоров, в случае роли. (окно, дверь, ворота...)",
|
|
75
|
-
"pt": "constrói mais papéis para os agentes de contacto, em caso de papel. (janela, porta, portão...)",
|
|
76
|
-
"nl": "meer rollen voor contactpersonen te creëren, in geval van rol. (raam, deur, poort ...)",
|
|
77
|
-
"fr": "construire plus de rôles pour les capteurs de contacts, en cas de rôle. (fenêtre, porte, portail...)",
|
|
78
|
-
"it": "costruire più ruoli per i sensori di contatto, in caso di ruolo. (finestra, porta, cancello ...)",
|
|
79
|
-
"es": "crear más roles para los contactensores, en caso de papel. (ventana, puerta, puerta...)",
|
|
80
|
-
"pl": "budować więcej ról dla czujników kontaktu, w przypadku roli. (okno, drzwi, brama...)",
|
|
81
|
-
"uk": "будувати більше ролей для контакторів, у разі ролі. (вікно, двері, ворота ...)",
|
|
82
|
-
"zh-cn": "为联系人建立更多的角色,如果是角色的话。 (窗,门,门"
|
|
83
|
-
},
|
|
84
|
-
"1.18.38": {
|
|
85
|
-
"en": "add device class to cover in config",
|
|
86
|
-
"de": "geräteklasse in config hinzufügen",
|
|
87
|
-
"ru": "добавить класс устройства для покрытия в конфигурацию",
|
|
88
|
-
"pt": "adicionar a classe do dispositivo para cobrir na configuração",
|
|
89
|
-
"nl": "apparaatklasse toevoegen om in config te dekken",
|
|
90
|
-
"fr": "ajouter la classe de périphérique pour couvrir la configuration",
|
|
91
|
-
"it": "aggiungere classe di dispositivo per coprire in configurazione",
|
|
92
|
-
"es": "añadir clase de dispositivo para cubrir en config",
|
|
93
|
-
"pl": "dodaj klasę urządzenia do pokrycia w konfiguracji",
|
|
94
|
-
"uk": "додати клас пристрою для обкладинки в налаштування",
|
|
95
|
-
"zh-cn": "在配置中添加要覆盖的设备类"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -78,11 +78,11 @@ class bridgeMqttClientClass {
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
this.client.on('close', () => {
|
|
81
|
+
this.client.on('close', async () => {
|
|
82
82
|
if (this.internalConnectionstate) {
|
|
83
83
|
this.adapter.log.info(`Connection to Bridge is closed.`);
|
|
84
84
|
}
|
|
85
|
-
this.adapter.setState('info.bridgeConnection', false, true);
|
|
85
|
+
await this.adapter.setState('info.bridgeConnection', false, true);
|
|
86
86
|
if (this.adapter.config.notificationActivation === 'notification') {
|
|
87
87
|
this.adapter.registerNotification(
|
|
88
88
|
'lorawan',
|
|
@@ -90,6 +90,8 @@ class bridgeMqttClientClass {
|
|
|
90
90
|
this.adapter.i18nTranslation['connection to bridge is closed'],
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
+
const connectionInfo = await this.adapter.getConnectionInfo();
|
|
94
|
+
await this.adapter.setState('info.connection', connectionInfo, true);
|
|
93
95
|
this.internalConnectionstate = false;
|
|
94
96
|
});
|
|
95
97
|
|
package/main.js
CHANGED
|
@@ -539,36 +539,51 @@ class Lorawan extends utils.Adapter {
|
|
|
539
539
|
];
|
|
540
540
|
const Statevalues = state.val.split(',');
|
|
541
541
|
const StateElements = {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
: false
|
|
548
|
-
: downlinkConfig.confirmed,
|
|
549
|
-
Priority: Statevalues[3] ? Statevalues[3] : downlinkConfig.priority,
|
|
542
|
+
payloadInHex: Statevalues[0].toUpperCase(),
|
|
543
|
+
port: downlinkConfig.port,
|
|
544
|
+
confirmed: downlinkConfig.confirmed,
|
|
545
|
+
priority: downlinkConfig.priority,
|
|
546
|
+
push: false,
|
|
550
547
|
};
|
|
551
|
-
//
|
|
548
|
+
// Assign writen values
|
|
549
|
+
for (const element in Statevalues) {
|
|
550
|
+
if (Statevalues[element] === 'push') {
|
|
551
|
+
StateElements.push = true;
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
if (element === '1') {
|
|
555
|
+
StateElements.port = Number(Statevalues[element]);
|
|
556
|
+
} else if (element === '2') {
|
|
557
|
+
StateElements.confirmed = Statevalues[element] === 'true' ? true : false;
|
|
558
|
+
} else if (element === '3') {
|
|
559
|
+
StateElements.priority = Statevalues[element];
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
// Query about th correct type
|
|
552
563
|
this.log.debug('The following values are detected at input of custom send state');
|
|
553
564
|
for (const element of Object.values(StateElements)) {
|
|
554
565
|
this.log.debug(typeof element);
|
|
555
566
|
this.log.debug(element);
|
|
556
567
|
}
|
|
557
|
-
//
|
|
558
|
-
|
|
568
|
+
// write into NextSend, or push directly
|
|
569
|
+
if (!StateElements.push) {
|
|
570
|
+
// Write into nextSend
|
|
571
|
+
await this.writeNextSend(changeInfo, StateElements.payloadInHex);
|
|
572
|
+
}
|
|
559
573
|
if (
|
|
560
574
|
!changeInfo?.bestMatchForDeviceType ||
|
|
561
575
|
this.downlinkConfighandler?.activeDownlinkConfigs[
|
|
562
576
|
changeInfo.bestMatchForDeviceType
|
|
563
|
-
].sendWithUplink === 'disabled'
|
|
577
|
+
].sendWithUplink === 'disabled' ||
|
|
578
|
+
StateElements.push
|
|
564
579
|
) {
|
|
565
580
|
const downlink = this.downlinkConfighandler?.getDownlink(
|
|
566
581
|
{
|
|
567
|
-
port: StateElements.
|
|
568
|
-
confirmed: StateElements.
|
|
569
|
-
priority: StateElements.
|
|
582
|
+
port: StateElements.port,
|
|
583
|
+
confirmed: StateElements.confirmed,
|
|
584
|
+
priority: StateElements.priority,
|
|
570
585
|
},
|
|
571
|
-
StateElements.
|
|
586
|
+
StateElements.payloadInHex,
|
|
572
587
|
changeInfo,
|
|
573
588
|
);
|
|
574
589
|
if (downlink !== undefined) {
|
|
@@ -1507,7 +1522,7 @@ class Lorawan extends utils.Adapter {
|
|
|
1507
1522
|
}
|
|
1508
1523
|
|
|
1509
1524
|
async getConnectionInfo() {
|
|
1510
|
-
if (this.config.
|
|
1525
|
+
if (this.config.origin === 'off' || this.mqttClient?.internalConnectionstate) {
|
|
1511
1526
|
if (this.config.BridgeType === 'off' || this.bridge?.bridgeMqttClient?.internalConnectionstate) {
|
|
1512
1527
|
return true;
|
|
1513
1528
|
}
|