iobroker.lorawan 1.10.0 → 1.10.2
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 +7 -0
- package/io-package.json +27 -27
- package/lib/modules/messagehandler.js +6 -0
- package/main.js +23 -7
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -23,6 +23,13 @@ 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.10.2 (2025-05-04)
|
|
27
|
+
* (BenAhrdt) update dependencie to node >= 20
|
|
28
|
+
* (BenAhrdt) improove timestamp in deviceInformation, if its not present in message (eg. manualy send via TTN)
|
|
29
|
+
|
|
30
|
+
### 1.10.1 (2025-04-17)
|
|
31
|
+
* (BenAhrdt) Improove Custom Send
|
|
32
|
+
|
|
26
33
|
### 1.10.0 (2025-04-17)
|
|
27
34
|
* (BenAhrdt) Add CustomSend to Control folder
|
|
28
35
|
* (BenAhrdt) update Profile for 16ASPM
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.2",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.10.2": {
|
|
7
|
+
"en": "update dependencie to node >= 20\nimproove timestamp in deviceInformation, if its not present in message (eg. manualy send via TTN)",
|
|
8
|
+
"de": "update abhängigencier to node >= 20\nimproove timestamp in deviceInformation, wenn seine nicht in Nachricht vorhanden (z.B. manuell per TTN senden)",
|
|
9
|
+
"ru": "обновление зависимых узлов >= 20\nимпровизировать временную метку в устройстве Информация, если она не присутствует в сообщении (например, вручную отправить через TTN)",
|
|
10
|
+
"pt": "dependência de atualização para o nó >= 20\ntempostamp improove no dispositivoInformação, se não estiver presente na mensagem (por exemplo, envio manual via TTN)",
|
|
11
|
+
"nl": "update afhankelijk van knooppunt 20\nimproove tijdstempel in apparaatInformatie, als het niet aanwezig is in bericht (bijv. handmatig verzenden via TTN)",
|
|
12
|
+
"fr": "mettre à jour dependencie to node >= 20\nimproove horodatage dans l'appareilInformations, si elle n'est pas présente dans le message (p. ex., envoi manuel via TTN)",
|
|
13
|
+
"it": "aggiornamento della dipendenza dal nodo 20\nimproove timestamp in deviceInformation, se non è presente nel messaggio (ad esempio manuale invia via TTN)",
|
|
14
|
+
"es": "actualización dependecie de nodo √= 20\nimroove timestamp in deviceInformation, if its not present in message (eg. manualy send via TTN)",
|
|
15
|
+
"pl": "aktualizacja zależnego do węzła > = 20\nimproove timestamp in deviceInformation, if its not present in message (np. manualy send via TTN)",
|
|
16
|
+
"uk": "оновлення залежності до вершини >= 20 хв\nувімкнено часовий штамп в пристроїІнформація, якщо його не присутні в повідомленнях (наприклад, вручну відправити через TTN)",
|
|
17
|
+
"zh-cn": "更新依赖到节点qq 20 (简体中文)\n如果信息未在信件中出现(例如通过 TTN 的手动发送), 设备中的不规则时间戳"
|
|
18
|
+
},
|
|
19
|
+
"1.10.1": {
|
|
20
|
+
"en": "Improove Custom Send",
|
|
21
|
+
"de": "Improove Custom Senden",
|
|
22
|
+
"ru": "Improove Custom отправляется",
|
|
23
|
+
"pt": "Enviar personalizado",
|
|
24
|
+
"nl": "Aangepast versturen improoveren",
|
|
25
|
+
"fr": "Imprimer l'envoi personnalisé",
|
|
26
|
+
"it": "Invia su ordinazione",
|
|
27
|
+
"es": "Improove Custom Send",
|
|
28
|
+
"pl": "Improove Custom Wyślij",
|
|
29
|
+
"uk": "Настроювання на замовлення",
|
|
30
|
+
"zh-cn": "自定义发送"
|
|
31
|
+
},
|
|
6
32
|
"1.10.0": {
|
|
7
33
|
"en": "Add CustomSend to Control folder\nupdate Profile for 16ASPM",
|
|
8
34
|
"de": "Fügen Sie CustomSend in Kontrollordner\nupdate Profil für 16ASPM",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "aktualizacja zależności i czasu / znacznika czasu w deviceinfos",
|
|
68
94
|
"uk": "оновлення залежностей і часу / часовий апарат",
|
|
69
95
|
"zh-cn": "更新设备信息中的依赖性和时间/ 时间戳"
|
|
70
|
-
},
|
|
71
|
-
"1.7.1": {
|
|
72
|
-
"en": "change timewriting in deviceinfos at chirpstack",
|
|
73
|
-
"de": "zeitschreiben in deviceinfos bei chirpstack ändern",
|
|
74
|
-
"ru": "изменение таймрайтинга в deviceinfos в chirpstack",
|
|
75
|
-
"pt": "mudar o tempo em deviceinfos no chirpstack",
|
|
76
|
-
"nl": "wijzigen tijdschrift in apparaatinfo's op tjirpstack",
|
|
77
|
-
"fr": "modifier timewriting dans deviceinfos à chirpstack",
|
|
78
|
-
"it": "cambiamento timewriting in deviceinfos a chirpstack",
|
|
79
|
-
"es": "cambiar el tiempo de escritura en el dispositivoinfos en chirpstack",
|
|
80
|
-
"pl": "zmiana czasu zapisu w deviceinfos w chirpstock",
|
|
81
|
-
"uk": "змінити часопис в пристрої",
|
|
82
|
-
"zh-cn": "在 chirpstack 设备信息中更改时间记录"
|
|
83
|
-
},
|
|
84
|
-
"1.7.0": {
|
|
85
|
-
"en": "add Volt to assignhandler with unit \"V\"\nupdate dependency for admin and js-controller\nupdate release script dependecie to 3.8",
|
|
86
|
-
"de": "volt zuzuordnende Handler mit Einheit \"V\" hinzufügen\naktualisierung der abhängigkeit von admin und js-controller\nupdate release script abhängigecie to 3.8",
|
|
87
|
-
"ru": "добавить Volt для цедентификатора с блоком \"V\"\nобновление зависимости для admin и js-controller\nобновление сценария выхода зависит от 3,8",
|
|
88
|
-
"pt": "adicionar Volt ao asignhandler com unidade \"V\"\ndependência de atualização para admin e js-controller\nupdate script dependcie to 3.8",
|
|
89
|
-
"nl": "voeg Volt toe aan de toewijsmachine met eenheid \"V\"\nupdate afhankelijkheid voor admin en js-controller\nupdate release script afhankelijk van 3,8",
|
|
90
|
-
"fr": "ajouter Volt à l'adjudant avec l'unité \"V\"\nmettre à jour la dépendance pour admin et js-controller\nmettre à jour le script de sortie de dépendance à 3.8",
|
|
91
|
-
"it": "aggiungere Volt a assegnatore con unità \"V\"\naggiornamento della dipendenza da admin e js-controller\naggiornamento dello script di rilascio dipendeecie a 3.8",
|
|
92
|
-
"es": "añadir Volt al cedente con unidad \"V\"\nactualización dependencia para administración y js-controller\nactualización script dependcie de 3.8",
|
|
93
|
-
"pl": "dodać Volt do assignhandlera z jednostką \"V\"\naktualizacja zależności dla administratora i kontrolera js-\nupdate release script dependecie to 3.8",
|
|
94
|
-
"uk": "додати Волт до приставки з блоком \"В\"\nоновлення залежності для адміністратора та js-controller\nоновити сценарій релізу залежно від 3,8",
|
|
95
|
-
"zh-cn": "添加Volt 以指定“ V” 单元的手列\n更新管理员和js控制器的依赖性\n将发布脚本依赖性更新到 3. 8"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -300,6 +300,9 @@ class messagehandlerClass {
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
// Generate Timestamp
|
|
303
|
+
if (!message.uplink_message.rx_metadata[0].time) {
|
|
304
|
+
message.uplink_message.rx_metadata[0].time = Date.now();
|
|
305
|
+
}
|
|
303
306
|
const Timestamp =
|
|
304
307
|
typeof message.uplink_message.rx_metadata[0].time === 'number'
|
|
305
308
|
? message.uplink_message.rx_metadata[0].time
|
|
@@ -334,6 +337,9 @@ class messagehandlerClass {
|
|
|
334
337
|
}
|
|
335
338
|
}
|
|
336
339
|
// Generate Timestamp
|
|
340
|
+
if (!message.time) {
|
|
341
|
+
message.time = Date.now();
|
|
342
|
+
}
|
|
337
343
|
const Timestamp =
|
|
338
344
|
typeof message.time === 'number' ? message.time : new Date(message.time).valueOf();
|
|
339
345
|
|
package/main.js
CHANGED
|
@@ -361,19 +361,35 @@ class Lorawan extends utils.Adapter {
|
|
|
361
361
|
changeInfo.bestMatchForDeviceType
|
|
362
362
|
];
|
|
363
363
|
const Statevalues = state.val.split(',');
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
364
|
+
const StateElements = {
|
|
365
|
+
PayloadInHex: Statevalues[0],
|
|
366
|
+
Port: Statevalues[1] ? parseInt(Statevalues[1]) : downlinkConfig.port,
|
|
367
|
+
Confirmed: Statevalues[2]
|
|
368
|
+
? Statevalues[2] === 'true'
|
|
369
|
+
? true
|
|
370
|
+
: false
|
|
371
|
+
: downlinkConfig.confirmed,
|
|
372
|
+
Priority: Statevalues[3] ? Statevalues[3] : downlinkConfig.priority,
|
|
373
|
+
};
|
|
374
|
+
// Query for righte type
|
|
375
|
+
for (const element of Object.values(StateElements)) {
|
|
376
|
+
this.log.warn(typeof element);
|
|
377
|
+
this.log.warn(element);
|
|
378
|
+
}
|
|
379
|
+
// Write into nextSend
|
|
380
|
+
await this.writeNextSend(changeInfo, StateElements.PayloadInHex);
|
|
369
381
|
if (
|
|
370
382
|
!changeInfo?.bestMatchForDeviceType ||
|
|
371
383
|
this.downlinkConfighandler?.activeDownlinkConfigs[changeInfo.bestMatchForDeviceType]
|
|
372
384
|
.sendWithUplink === 'disabled'
|
|
373
385
|
) {
|
|
374
386
|
const downlink = this.downlinkConfighandler?.getDownlink(
|
|
375
|
-
{
|
|
376
|
-
|
|
387
|
+
{
|
|
388
|
+
port: StateElements.Port,
|
|
389
|
+
confirmed: StateElements.Confirmed,
|
|
390
|
+
priority: StateElements.Priority,
|
|
391
|
+
},
|
|
392
|
+
StateElements.PayloadInHex,
|
|
377
393
|
changeInfo,
|
|
378
394
|
);
|
|
379
395
|
if (downlink !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.lorawan",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "converts the desired lora gateway data to a ioBroker structure",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "BenAhrdt",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"url": "https://github.com/BenAhrdt/ioBroker.lorawan.git"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
|
-
"node": ">=
|
|
25
|
+
"node": ">= 20"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@iobroker/adapter-core": "^3.2.3",
|
|
29
29
|
"easy-crc": "^1.1.0",
|
|
30
30
|
"lodash": "^4.17.21",
|
|
31
|
-
"mqtt": "^5.
|
|
31
|
+
"mqtt": "^5.12.0",
|
|
32
32
|
"node-schedule": "^2.1.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@types/chai-as-promised": "^8.0.2",
|
|
45
45
|
"@types/lodash": "^4.17.16",
|
|
46
46
|
"@types/mocha": "^10.0.10",
|
|
47
|
-
"@types/node": "^22.
|
|
47
|
+
"@types/node": "^22.15.3",
|
|
48
48
|
"@types/proxyquire": "^1.3.31",
|
|
49
49
|
"@types/sinon": "^17.0.4",
|
|
50
50
|
"@types/sinon-chai": "^3.2.12",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"proxyquire": "^2.1.3",
|
|
55
55
|
"sinon": "^20.0.0",
|
|
56
56
|
"sinon-chai": "^3.7.0",
|
|
57
|
-
"typescript": "~5.
|
|
57
|
+
"typescript": "~5.8.3"
|
|
58
58
|
},
|
|
59
59
|
"main": "main.js",
|
|
60
60
|
"files": [
|