iobroker.lorawan 1.18.45 → 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 CHANGED
@@ -23,6 +23,9 @@ 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
+
26
29
  ### 1.18.45 (2025-12-04)
27
30
  * (BenAhrdt) improve showing Adapter state (yellw / green)
28
31
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "1.18.45",
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
+ },
6
19
  "1.18.45": {
7
20
  "en": "improve showing Adapter state (yellw / green)",
8
21
  "de": "verbesserung des Adapterzustands (gelb / grün)",
@@ -80,19 +93,6 @@
80
93
  "pl": "zmień hasz",
81
94
  "uk": "зміна хеш",
82
95
  "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
@@ -539,36 +539,51 @@ class Lorawan extends utils.Adapter {
539
539
  ];
540
540
  const Statevalues = state.val.split(',');
541
541
  const StateElements = {
542
- PayloadInHex: Statevalues[0].toUpperCase(),
543
- Port: Statevalues[1] ? parseInt(Statevalues[1]) : downlinkConfig.port,
544
- Confirmed: Statevalues[2]
545
- ? Statevalues[2] === 'true'
546
- ? true
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
- // Query for righte type
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
- // Write into nextSend
558
- await this.writeNextSend(changeInfo, StateElements.PayloadInHex);
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.Port,
568
- confirmed: StateElements.Confirmed,
569
- priority: StateElements.Priority,
582
+ port: StateElements.port,
583
+ confirmed: StateElements.confirmed,
584
+ priority: StateElements.priority,
570
585
  },
571
- StateElements.PayloadInHex,
586
+ StateElements.payloadInHex,
572
587
  changeInfo,
573
588
  );
574
589
  if (downlink !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "1.18.45",
3
+ "version": "1.18.46",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",