iobroker.lorawan 0.6.2 → 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 +6 -0
- package/io-package.json +29 -28
- 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,12 @@ 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
|
+
|
|
28
|
+
### 0.6.3 (2024-03-05)
|
|
29
|
+
* (BenAhrdt) def of deviceinformations changed
|
|
30
|
+
|
|
25
31
|
### 0.6.2 (2024-03-05)
|
|
26
32
|
* (BenAhrdt) seperate dp for deviceinformations
|
|
27
33
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
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
|
+
},
|
|
19
|
+
"0.6.3": {
|
|
20
|
+
"en": "def of deviceinformations changed",
|
|
21
|
+
"de": "def von geräteinformationen geändert",
|
|
22
|
+
"ru": "изменена дефабрикация устройств",
|
|
23
|
+
"pt": "def das informações do dispositivo alteradas",
|
|
24
|
+
"nl": "de def van apparaatinformatie gewijzigd",
|
|
25
|
+
"fr": "def des informations de l'appareil changé",
|
|
26
|
+
"it": "def delle informazioni sui dispositivi modificate",
|
|
27
|
+
"es": "def de las desinformaciones de dispositivo cambiadas",
|
|
28
|
+
"pl": "def deviceinformations changed",
|
|
29
|
+
"uk": "змінено деф приладів",
|
|
30
|
+
"zh-cn": "设备信息已更改"
|
|
31
|
+
},
|
|
6
32
|
"0.6.2": {
|
|
7
33
|
"en": "seperate dp for deviceinformations",
|
|
8
34
|
"de": "seperate dp für geräteinformationen",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "wdrożyć zatwierdzoną Folder conzept dla pisarek z wiadomości",
|
|
68
94
|
"uk": "реалізація затвердженого р. Складаний конверт для написаннякоманд з повідомлення",
|
|
69
95
|
"zh-cn": "执行批准的程序 从信件中写入命令的文件夹召集"
|
|
70
|
-
},
|
|
71
|
-
"0.5.3": {
|
|
72
|
-
"en": "change folder for writetriggers",
|
|
73
|
-
"de": "ordner für schreiber ändern",
|
|
74
|
-
"ru": "изменить папку для дикторов",
|
|
75
|
-
"pt": "mudar a pasta para writetriggers",
|
|
76
|
-
"nl": "map voor schrijftriggers wijzigen",
|
|
77
|
-
"fr": "modifier le dossier pour writetriggers",
|
|
78
|
-
"it": "modificare la cartella per writetriggers",
|
|
79
|
-
"es": "cambiar la carpeta para los escritores",
|
|
80
|
-
"pl": "zmień folder dla pisarzy",
|
|
81
|
-
"uk": "змінити папку для запису",
|
|
82
|
-
"zh-cn": "更改写入文件夹"
|
|
83
|
-
},
|
|
84
|
-
"0.5.2": {
|
|
85
|
-
"en": "make writetrigger more flexible",
|
|
86
|
-
"de": "schreibtrigger flexibler gestalten",
|
|
87
|
-
"ru": "сделать пишущее устройство более гибким",
|
|
88
|
-
"pt": "fazer writetrigger mais flexível",
|
|
89
|
-
"nl": "schrijftrigger flexibeler maken",
|
|
90
|
-
"fr": "rendre le trigger plus flexible",
|
|
91
|
-
"it": "rendere writetrigger più flessibile",
|
|
92
|
-
"es": "hacer la escritura más flexible",
|
|
93
|
-
"pl": "uczynić pisarkę bardziej elastyczną",
|
|
94
|
-
"uk": "зробити напилення більш гнучким",
|
|
95
|
-
"zh-cn": "使写入器更加灵活"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"title": "LoRaWAN",
|
|
@@ -204,7 +204,8 @@
|
|
|
204
204
|
"name": "Information of all devices",
|
|
205
205
|
"type": "json",
|
|
206
206
|
"read": true,
|
|
207
|
-
"write": false
|
|
207
|
+
"write": false,
|
|
208
|
+
"def": ""
|
|
208
209
|
},
|
|
209
210
|
"native": {}
|
|
210
211
|
}
|
|
@@ -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:
|