iobroker.lorawan 0.6.3 → 0.6.4
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 +3 -0
- package/io-package.json +14 -14
- package/lib/modules/directorieshandler.js +19 -16
- package/lib/modules/messagehandler.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,6 +22,9 @@ For now there is documentation in English here: https://wiki.hafenmeister.de
|
|
|
22
22
|
Placeholder for the next version (at the beginning of the line):
|
|
23
23
|
### **WORK IN PROGRESS**
|
|
24
24
|
-->
|
|
25
|
+
### 0.6.4 (2024-03-07)
|
|
26
|
+
* (BenAhrdt) Change writing of deviceinformations at Ttn
|
|
27
|
+
|
|
25
28
|
### 0.6.3 (2024-03-05)
|
|
26
29
|
* (BenAhrdt) def of deviceinformations changed
|
|
27
30
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.4",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.6.4": {
|
|
7
|
+
"en": "Change writing of deviceinformations at Ttn",
|
|
8
|
+
"de": "Schreiben von Geräteinformationen bei Ttn ändern",
|
|
9
|
+
"ru": "Изменение записи устройств в Ttn",
|
|
10
|
+
"pt": "Alterar a escrita de informações de dispositivos no Ttn",
|
|
11
|
+
"nl": "Het schrijven van apparaatinformatie bij Ttn wijzigen",
|
|
12
|
+
"fr": "Modifier l'écriture des informations de l'appareil à Ttn",
|
|
13
|
+
"it": "Cambia la scrittura di informazioni sui dispositivi a Ttn",
|
|
14
|
+
"es": "Cambiar la escritura de las informaciones de dispositivo en Ttn",
|
|
15
|
+
"pl": "Zmień pisanie informacji na temat treści w Ttn",
|
|
16
|
+
"uk": "Зміна письмової інформації про пристрій",
|
|
17
|
+
"zh-cn": "在 Ttn 更改设备信息的写入"
|
|
18
|
+
},
|
|
6
19
|
"0.6.3": {
|
|
7
20
|
"en": "def of deviceinformations changed",
|
|
8
21
|
"de": "def von geräteinformationen geändert",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "wdrożyć zatwierdzoną Folder conzept dla pisarek z wiadomości",
|
|
81
94
|
"uk": "реалізація затвердженого р. Складаний конверт для написаннякоманд з повідомлення",
|
|
82
95
|
"zh-cn": "执行批准的程序 从信件中写入命令的文件夹召集"
|
|
83
|
-
},
|
|
84
|
-
"0.5.3": {
|
|
85
|
-
"en": "change folder for writetriggers",
|
|
86
|
-
"de": "ordner für schreiber ändern",
|
|
87
|
-
"ru": "изменить папку для дикторов",
|
|
88
|
-
"pt": "mudar a pasta para writetriggers",
|
|
89
|
-
"nl": "map voor schrijftriggers wijzigen",
|
|
90
|
-
"fr": "modifier le dossier pour writetriggers",
|
|
91
|
-
"it": "modificare la cartella per writetriggers",
|
|
92
|
-
"es": "cambiar la carpeta para los escritores",
|
|
93
|
-
"pl": "zmień folder dla pisarzy",
|
|
94
|
-
"uk": "змінити папку для запису",
|
|
95
|
-
"zh-cn": "更改写入文件夹"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"title": "LoRaWAN",
|
|
@@ -49,7 +49,8 @@ class directorieshandlerClass {
|
|
|
49
49
|
time: this.timestringToDate,
|
|
50
50
|
gwTime: this.timestringToDate,
|
|
51
51
|
nsTime: this.timestringToDate,
|
|
52
|
-
timestamp: this.timestringToDate
|
|
52
|
+
timestamp: this.timestringToDate,
|
|
53
|
+
received_at: this.timestringToDate
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
/*********************************************************************
|
|
@@ -228,34 +229,36 @@ class directorieshandlerClass {
|
|
|
228
229
|
if(!myObject.native){
|
|
229
230
|
myObject.native = {};
|
|
230
231
|
}
|
|
232
|
+
// Generate native
|
|
231
233
|
if(obj[elementName].objectNative){
|
|
232
234
|
const objectNative = obj[elementName].objectNative(topic,message);
|
|
233
235
|
for(const attribute in objectNative){
|
|
234
236
|
myObject.native[attribute] = objectNative[attribute];
|
|
235
237
|
}
|
|
238
|
+
}
|
|
236
239
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.adapter.log.silly(`set common attribut ${attribute} to ${myObject.native[obj[elementName].objectCommonFromNative[attribute]]}`);
|
|
248
|
-
myObject.common[attribute] = myObject.native[obj[elementName].objectCommonFromNative[attribute]];
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
else{
|
|
240
|
+
// Assigne to common, if there are values specified
|
|
241
|
+
if(obj[elementName].objectCommonFromNative){
|
|
242
|
+
for(const attribute in obj[elementName].objectCommonFromNative){
|
|
243
|
+
// Check, whether the actual native is present
|
|
244
|
+
if(myObject.native[obj[elementName].objectCommonFromNative[attribute]]){
|
|
245
|
+
// check for old common => existing object
|
|
246
|
+
if(myObjectBefore.common){
|
|
247
|
+
//check for content
|
|
248
|
+
if(myObjectBefore.common[attribute] === myObjectBefore.native[obj[elementName].objectCommonFromNative[attribute]] ||
|
|
249
|
+
myObjectBefore.common[attribute] === ""){
|
|
252
250
|
this.adapter.log.silly(`set common attribut ${attribute} to ${myObject.native[obj[elementName].objectCommonFromNative[attribute]]}`);
|
|
253
251
|
myObject.common[attribute] = myObject.native[obj[elementName].objectCommonFromNative[attribute]];
|
|
254
252
|
}
|
|
255
253
|
}
|
|
254
|
+
else{
|
|
255
|
+
this.adapter.log.silly(`set common attribut ${attribute} to ${myObject.native[obj[elementName].objectCommonFromNative[attribute]]}`);
|
|
256
|
+
myObject.common[attribute] = myObject.native[obj[elementName].objectCommonFromNative[attribute]];
|
|
257
|
+
}
|
|
256
258
|
}
|
|
257
259
|
}
|
|
258
260
|
}
|
|
261
|
+
|
|
259
262
|
// Check for name
|
|
260
263
|
if(!myObject.common.name){
|
|
261
264
|
myObject.common.name = "";
|
|
@@ -103,9 +103,9 @@ class messagehandlerClass {
|
|
|
103
103
|
// Check origin
|
|
104
104
|
switch(this.adapter.config.origin){
|
|
105
105
|
case this.adapter.origin.ttn:
|
|
106
|
-
if(message.uplink_message && message.uplink_message
|
|
106
|
+
if(message.uplink_message && message.uplink_message){
|
|
107
107
|
this.deviceinformations[changeInfo.deviceEUI].uplink.decoded = message.uplink_message.decoded_payload;
|
|
108
|
-
this.deviceinformations[changeInfo.deviceEUI].uplink.time = message.rx_metadata.time;
|
|
108
|
+
this.deviceinformations[changeInfo.deviceEUI].uplink.time = message.uplink_message.rx_metadata.time;
|
|
109
109
|
}
|
|
110
110
|
break;
|
|
111
111
|
case this.adapter.origin.chirpstack:
|