iobroker.lorawan 0.0.6 → 0.0.7

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
@@ -19,6 +19,9 @@ Adapter was created in collaboration with Joerg Froehner J-Paul0815@hafenmeister
19
19
  Placeholder for the next version (at the beginning of the line):
20
20
  ### **WORK IN PROGRESS**
21
21
  -->
22
+ ### 0.0.7 (2024-01-17)
23
+ * (BenAhrdt) hex to Upper case, more units for decoded payload values
24
+
22
25
  ### 0.0.6 (2024-01-16)
23
26
  * (BenAhrdt) insert whole translation for config and move some functions
24
27
 
@@ -3,7 +3,7 @@
3
3
  "mainSettings": "Haupteinstellungen",
4
4
  "ServersettingsHeader": "Server Einstellungen",
5
5
  "Serverinformation": "Legen Sie die wichtigsten Kommunikationseinstellungen für Ihren Server fest",
6
- "ipUrl": "URL oder IP des Servers, zu dem Sie eine Verbindung herstellen möchten",
6
+ "ipUrl": "URL oder IP des Servers",
7
7
  "ipUrlTooltip": "Geben Sie die IP-Adresse oder die URL ein, zu der Sie eine Verbindung herstellen möchten",
8
8
  "port": "Port",
9
9
  "portTooltip": "Geben Sie den Port für die Verbindung ein",
@@ -48,5 +48,6 @@
48
48
  "unit": "Einheit",
49
49
  "unitTooltip": "Geben Sie die Einheit für Ihren Wert ein",
50
50
  "deviceType": "Gerätetyp",
51
- "deviceTypeTooltip": "Geben Sie den Namen des Gerätetyps ein, für welchen diese Konfiguration gültig ist. (z. B. 'Dragino XY' passt auch zu 'Dragino')"
51
+ "deviceTypeTooltip": "Geben Sie den Namen des Gerätetyps ein, für welchen diese Konfiguration gültig ist. (z. B. 'Dragino XY' passt auch zu 'Dragino')",
52
+ "nameTooltip": "Geben Sie für den Datenpunkt dieses Downlinks ein"
52
53
  }
@@ -3,7 +3,7 @@
3
3
  "mainSettings": "Main Settings",
4
4
  "ServersettingsHeader": "Serversettings",
5
5
  "Serverinformation": "Set the main communication settings to your server",
6
- "ipUrl": "url or ip of the server you want connect to",
6
+ "ipUrl": "url or ip of the server",
7
7
  "ipUrlTooltip": "input the ip-address, or the url you want to connect to",
8
8
  "port": "port",
9
9
  "portTooltip": "input the port for the connection",
@@ -23,6 +23,7 @@
23
23
  "chirpstackTooltip": "enable to use chirpstackTooltip",
24
24
  "downlinkConfig": "Donwlink-konfiguration",
25
25
  "name": "name",
26
+ "nameTooltip": "insert the name of the state, for this dowlink",
26
27
  "portDownlink": "port",
27
28
  "portDownlinkTooltip": "input the port you want to send in the downlink",
28
29
  "priority": "priority",
@@ -48,5 +48,6 @@
48
48
  "unit": "unidad",
49
49
  "unitTooltip": "inserte la unidad para su valor",
50
50
  "deviceType": "tipo de dispositivo",
51
- "deviceTypeTooltip": "inserte el nombre del tipo de dispositivo, esta configuración es válida. (por ejemplo, Dragino XY también coincide con Dragino)"
51
+ "deviceTypeTooltip": "inserte el nombre del tipo de dispositivo, esta configuración es válida. (por ejemplo, Dragino XY también coincide con Dragino)",
52
+ "nameTooltip": "inserte el nombre del estado, para este enlace descendente"
52
53
  }
@@ -48,5 +48,6 @@
48
48
  "unit": "unité",
49
49
  "unitTooltip": "insérez l'unité pour votre valeur",
50
50
  "deviceType": "type d'appareil",
51
- "deviceTypeTooltip": "insérez le nom du type d'appareil, cette configuration est valide. (par exemple, Dragino XY correspond également à Dragino)"
51
+ "deviceTypeTooltip": "insérez le nom du type d'appareil, cette configuration est valide. (par exemple, Dragino XY correspond également à Dragino)",
52
+ "nameTooltip": "insérez le nom de l'état, pour ce lien descendant"
52
53
  }
@@ -48,5 +48,6 @@
48
48
  "unit": "unità",
49
49
  "unitTooltip": "inserisci l'unità per il tuo valore",
50
50
  "deviceType": "tipo di dispositivo",
51
- "deviceTypeTooltip": "inserire il nome del tipo di dispositivo, questa configurazione è valida. (es. Dragino XY corrisponde anche a Dragino)"
51
+ "deviceTypeTooltip": "inserire il nome del tipo di dispositivo, questa configurazione è valida. (es. Dragino XY corrisponde anche a Dragino)",
52
+ "nameTooltip": "inserire il nome dello stato, per questo downlink"
52
53
  }
@@ -48,5 +48,6 @@
48
48
  "unit": "eenheid",
49
49
  "unitTooltip": "voer de eenheid voor uw waarde in",
50
50
  "deviceType": "soort apparaat",
51
- "deviceTypeTooltip": "voer de naam van het apparaattype in, deze configuratie is geldig. (bijv. Dragino XY komt ook overeen met Dragino)"
51
+ "deviceTypeTooltip": "voer de naam van het apparaattype in, deze configuratie is geldig. (bijv. Dragino XY komt ook overeen met Dragino)",
52
+ "nameTooltip": "voer de naam van de staat in voor deze downlink"
52
53
  }
@@ -48,5 +48,6 @@
48
48
  "unit": "jednostka",
49
49
  "unitTooltip": "wstaw jednostkę swojej wartości",
50
50
  "deviceType": "rodzaj urządzenia",
51
- "deviceTypeTooltip": "wstaw nazwę typu urządzenia, ta konfiguracja jest prawidłowa. (np. Dragino XY pasuje również do Dragino)"
51
+ "deviceTypeTooltip": "wstaw nazwę typu urządzenia, ta konfiguracja jest prawidłowa. (np. Dragino XY pasuje również do Dragino)",
52
+ "nameTooltip": "wstaw nazwę stanu dla tego łącza pobierania"
52
53
  }
@@ -48,5 +48,6 @@
48
48
  "unit": "unidade",
49
49
  "unitTooltip": "insira a unidade para seu valor",
50
50
  "deviceType": "tipo de dispositivo",
51
- "deviceTypeTooltip": "insira o nome do tipo de dispositivo, esta configuração é válida. (por exemplo, Dragino XY também corresponde a Dragino)"
51
+ "deviceTypeTooltip": "insira o nome do tipo de dispositivo, esta configuração é válida. (por exemplo, Dragino XY também corresponde a Dragino)",
52
+ "nameTooltip": "insira o nome do estado, para este downlink"
52
53
  }
@@ -48,5 +48,6 @@
48
48
  "unit": "единица",
49
49
  "unitTooltip": "вставьте единицу измерения вашего значения",
50
50
  "deviceType": "тип устройства",
51
- "deviceTypeTooltip": "вставьте название типа устройства, этот конфиг действителен. (например, Dragino XY также соответствует Dragino)"
51
+ "deviceTypeTooltip": "вставьте название типа устройства, этот конфиг действителен. (например, Dragino XY также соответствует Dragino)",
52
+ "nameTooltip": "вставьте название штата для этого даулинка"
52
53
  }
@@ -48,5 +48,6 @@
48
48
  "unit": "одиниця",
49
49
  "unitTooltip": "вставте одиницю для вашого значення",
50
50
  "deviceType": "тип пристрою",
51
- "deviceTypeTooltip": "вставте назву типу пристрою, ця конфігурація дійсна. (наприклад, Dragino XY також відповідає Dragino)"
51
+ "deviceTypeTooltip": "вставте назву типу пристрою, ця конфігурація дійсна. (наприклад, Dragino XY також відповідає Dragino)",
52
+ "nameTooltip": "вставте назву штату для цього посилання"
52
53
  }
@@ -48,5 +48,6 @@
48
48
  "unit": "单元",
49
49
  "unitTooltip": "插入您的值的单位",
50
50
  "deviceType": "设备类型",
51
- "deviceTypeTooltip": "插入设备类型的名称,此配置有效。 (例如,Dragino XY 也匹配 Dragino)"
51
+ "deviceTypeTooltip": "插入设备类型的名称,此配置有效。 (例如,Dragino XY 也匹配 Dragino)",
52
+ "nameTooltip": "为此下行链接插入州名称"
52
53
  }
@@ -178,7 +178,7 @@
178
178
  {"label":"6","value":6},
179
179
  {"label":"8","value":8}
180
180
  ],
181
- "default": 2,
181
+ "default": 8,
182
182
  "hidden": "data.type === 'boolean' || data.type === 'button'",
183
183
  "sm":2
184
184
  },
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "news": {
6
+ "0.0.7": {
7
+ "en": "hex to Upper case, more units for decoded payload values",
8
+ "de": "hex to Upper case, mehr Einheiten für decodierte Nutzwerte",
9
+ "ru": "hex to Upper case, more units for decode payload values",
10
+ "pt": "hex para caixa superior, mais unidades para valores de carga descodificados",
11
+ "nl": "hex naar Upper case, meer eenheden voor gedecodeerde lading waarden",
12
+ "fr": "hex à Upper case, plus d'unités pour les valeurs de charge utile décodées",
13
+ "it": "hex to Upper case, più unità per i valori di payload decodificato",
14
+ "es": "hex to Upper case, más unidades para valores de carga descodificados",
15
+ "pl": "hex do górnej skrzyni, więcej jednostek dla dekodowanych wartości ładunku",
16
+ "uk": "hex до верхнього корпусу, більше одиниць для декодованих значень навантаження",
17
+ "zh-cn": "十六进制到大写, 更多解码有效载荷值的单位"
18
+ },
6
19
  "0.0.6": {
7
20
  "en": "insert whole translation for config and move some functions",
8
21
  "de": "vollständige übersetzung einfügen und einige funktionen verschieben",
@@ -1,3 +1,5 @@
1
+ const uplinkClass = require("./uplinks/uplinks");
2
+
1
3
  class messagehandlerClass {
2
4
  constructor(adapter) {
3
5
  this.adapter = adapter;
@@ -22,19 +24,7 @@ class messagehandlerClass {
22
24
 
23
25
  this.reachableDirectories = {};
24
26
 
25
- this.units = {
26
- "pressure": "mBar",
27
- "battery": "V",
28
- "battery_level": "%",
29
- "humidity": "%",
30
- "Batterie": "V",
31
- "Temperatur": "°C",
32
- "airhumidity": "%",
33
- "volt": "V",
34
- "temperatur" : "°C",
35
- "airtemperature" : "°C",
36
- "soiltemperature": "°C"
37
- };
27
+ this.uplinks = new uplinkClass();
38
28
 
39
29
  // declare the directory structre
40
30
  this.directories = {
@@ -177,7 +167,7 @@ class messagehandlerClass {
177
167
  name: stateCommonName,
178
168
  role: "value",
179
169
  read: true,
180
- unit: obj[elementName].CommonStateUnit? obj[elementName].CommonStateUnit : this.units[internalObjectId]? this.units[internalObjectId] : "",
170
+ unit: obj[elementName].CommonStateUnit? obj[elementName].CommonStateUnit : this.uplinks.units[internalObjectId]? this.uplinks.units[internalObjectId] : "",
181
171
  def: stateCommonType === "boolean"? false : stateCommonType === "number"? 0: "",
182
172
  write: stateCommonWrite
183
173
  },
@@ -88,7 +88,7 @@ class messagehandlerClass {
88
88
  },
89
89
  native: {},
90
90
  });
91
- const hexdata = Buffer.from(message.uplink_message.frm_payload, "base64").toString("hex");
91
+ const hexdata = Buffer.from(message.uplink_message.frm_payload, "base64").toString("hex").toUpperCase();
92
92
  await this.adapter.setStateAsync(`${startDirectory}.hex`,hexdata,true);
93
93
 
94
94
  // write base64 data in string data
@@ -192,7 +192,7 @@ class messagehandlerClass {
192
192
  },
193
193
  native: {},
194
194
  });
195
- const hexdata = Buffer.from(message[downlinkType].frm_payload,"base64").toString("hex");
195
+ const hexdata = Buffer.from(message[downlinkType].frm_payload,"base64").toString("hex").toUpperCase();
196
196
  await this.adapter.setStateAsync(`${startDirectory}.hex`,hexdata,true);
197
197
 
198
198
  // write base64 data in string data
@@ -0,0 +1,22 @@
1
+
2
+ class uplinkClass {
3
+ constructor() {
4
+ this.units = {
5
+ "pressure": "mBar",
6
+ "battery": "V",
7
+ "battery_level": "%",
8
+ "humidity": "%",
9
+ "Batterie": "V",
10
+ "Temperatur": "°C",
11
+ "airhumidity": "%",
12
+ "volt": "V",
13
+ "temperatur" : "°C",
14
+ "airtemperature" : "°C",
15
+ "soiltemperature": "°C",
16
+ "soilconductivity": "µS/cm",
17
+ "soilmoisture": "%"
18
+ };
19
+ }
20
+ }
21
+
22
+ module.exports = uplinkClass;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",