iobroker.lorawan 1.10.3 → 1.10.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/assignhandler.js +39 -1
- package/lib/modules/messagehandler.js +1 -2
- package/main.js +71 -2
- package/package.json +1 -1
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.10.4 (2025-05-15)
|
|
27
|
+
* (BenAhrdt) set new roles and bugfix role in downlink.control at startup
|
|
28
|
+
|
|
26
29
|
### 1.10.3 (2025-05-07)
|
|
27
30
|
* (BenAhrdt) set logging for custom send from warning to debug
|
|
28
31
|
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "lorawan",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.4",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.10.4": {
|
|
7
|
+
"en": "set new roles and bugfix role in downlink.control at startup",
|
|
8
|
+
"de": "neue rollen und bugfix rolle in downlink setzen. steuerung beim start",
|
|
9
|
+
"ru": "установить новые роли и роль исправления ошибок в нисходящей линии связи. контроль в стартапе",
|
|
10
|
+
"pt": "definir novos papéis e bugfix papel no downlink. controle na inicialização",
|
|
11
|
+
"nl": "nieuwe rollen en bugfix rol in downlink. controle bij opstarten",
|
|
12
|
+
"fr": "définir de nouveaux rôles et bugfix dans downlink. contrôle au démarrage",
|
|
13
|
+
"it": "impostare nuovi ruoli e bugfix ruolo in downlink. controllo all'avvio",
|
|
14
|
+
"es": "establecer nuevos roles y papel de bugfix en el enlace descendente. control al inicio",
|
|
15
|
+
"pl": "ustawić nowe role i rolę bugfix w downlink. kontrola przy starcie",
|
|
16
|
+
"uk": "встановити нові ролі і роль у знімку. контроль запуску",
|
|
17
|
+
"zh-cn": "在下行链路中设置新角色和bugfix角色。 启动时的控制"
|
|
18
|
+
},
|
|
6
19
|
"1.10.3": {
|
|
7
20
|
"en": "set logging for custom send from warning to debug",
|
|
8
21
|
"de": "set protokollierung für benutzerdefinierte senden von warnung bis debug",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "Defaultvalues for push und replace (TTN)",
|
|
81
94
|
"uk": "Значення за замовчуванням для заміни унду (TTN)",
|
|
82
95
|
"zh-cn": "Push und 替换的默认值 (TTN)"
|
|
83
|
-
},
|
|
84
|
-
"1.8.1": {
|
|
85
|
-
"en": "chaned format time in device info",
|
|
86
|
-
"de": "chaned format time in device info",
|
|
87
|
-
"ru": "время в формате chaned in device info",
|
|
88
|
-
"pt": "tempo de formato chaned em informações do dispositivo",
|
|
89
|
-
"nl": "gechanteerde opmaaktijd in apparaatinformatie",
|
|
90
|
-
"fr": "temps de format channed dans l'information de l'appareil",
|
|
91
|
-
"it": "chaned format time in informazioni sul dispositivo",
|
|
92
|
-
"es": "tiempo de formato enmarcado en la información del dispositivo",
|
|
93
|
-
"pl": "chaned format time in device info",
|
|
94
|
-
"uk": "chaned формат часу в пристрої інформація",
|
|
95
|
-
"zh-cn": "设备信息中显示的格式时间"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -242,6 +242,12 @@ class assignhandlerClass {
|
|
|
242
242
|
role: 'level.temperature',
|
|
243
243
|
},
|
|
244
244
|
},
|
|
245
|
+
'uplink.decoded': {
|
|
246
|
+
assignfunction: this.commonAssign,
|
|
247
|
+
common: {
|
|
248
|
+
unit: '°C',
|
|
249
|
+
},
|
|
250
|
+
},
|
|
245
251
|
},
|
|
246
252
|
},
|
|
247
253
|
ExternalTemperatur: {
|
|
@@ -264,7 +270,7 @@ class assignhandlerClass {
|
|
|
264
270
|
},
|
|
265
271
|
},
|
|
266
272
|
},
|
|
267
|
-
|
|
273
|
+
MotorPosition: {
|
|
268
274
|
approvedFolders: {
|
|
269
275
|
'uplink.decoded': {
|
|
270
276
|
assignfunction: this.commonAssign,
|
|
@@ -398,6 +404,37 @@ class assignhandlerClass {
|
|
|
398
404
|
assignfunction: this.commonAssign,
|
|
399
405
|
common: {
|
|
400
406
|
role: 'value.temperature',
|
|
407
|
+
unit: '°C',
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
Mode: {
|
|
413
|
+
approvedFolders: {
|
|
414
|
+
'uplink.decoded': {
|
|
415
|
+
assignfunction: this.commonAssign,
|
|
416
|
+
common: {
|
|
417
|
+
role: 'level.mode.thermostat',
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
BrokenSensor: {
|
|
423
|
+
approvedFolders: {
|
|
424
|
+
'uplink.decoded': {
|
|
425
|
+
assignfunction: this.commonAssign,
|
|
426
|
+
common: {
|
|
427
|
+
role: 'indicator.error',
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
NotAttachedBackplate: {
|
|
433
|
+
approvedFolders: {
|
|
434
|
+
'uplink.decoded': {
|
|
435
|
+
assignfunction: this.commonAssign,
|
|
436
|
+
common: {
|
|
437
|
+
role: 'indicator.maintenance',
|
|
401
438
|
},
|
|
402
439
|
},
|
|
403
440
|
},
|
|
@@ -433,6 +470,7 @@ class assignhandlerClass {
|
|
|
433
470
|
options,
|
|
434
471
|
);
|
|
435
472
|
}
|
|
473
|
+
return value;
|
|
436
474
|
} catch (error) {
|
|
437
475
|
this.adapter.log.error(`error at ${activeFunction}: ${error}`);
|
|
438
476
|
}
|
|
@@ -136,7 +136,7 @@ class messagehandlerClass {
|
|
|
136
136
|
const adapterObjectsAtStart = await this.adapter.getAdapterObjectsAsync();
|
|
137
137
|
for (const adapterObject of Object.values(adapterObjectsAtStart)) {
|
|
138
138
|
if (adapterObject.type === 'device') {
|
|
139
|
-
await this.fillWithDownlinkConfig(adapterObject._id, {});
|
|
139
|
+
await this.fillWithDownlinkConfig(this.adapter.removeNamespace(adapterObject._id), {});
|
|
140
140
|
//await this.addDirectoriesToPresentDirectory(`${stateId}`); Not used yet (Maybe for thefuture with more folders)
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -499,7 +499,6 @@ class messagehandlerClass {
|
|
|
499
499
|
common.def = JSON.stringify(downlink);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
|
|
503
502
|
await this.adapter.extendObjectAsync(stateId, {
|
|
504
503
|
type: 'state',
|
|
505
504
|
common: common,
|
package/main.js
CHANGED
|
@@ -73,7 +73,7 @@ class Lorawan extends utils.Adapter {
|
|
|
73
73
|
this.log.silly(
|
|
74
74
|
`the active downlinkconfigs are: ${JSON.stringify(this.downlinkConfighandler.activeDownlinkConfigs)}`,
|
|
75
75
|
);
|
|
76
|
-
/*
|
|
76
|
+
/*
|
|
77
77
|
setTimeout(async () => {
|
|
78
78
|
this.log.debug('vor Simulation');
|
|
79
79
|
await this.startSimulation();
|
|
@@ -189,7 +189,7 @@ class Lorawan extends utils.Adapter {
|
|
|
189
189
|
// ACK
|
|
190
190
|
//const topic = "v3/hafi-ttn-lorawan@ttn/devices/eui-a84041162183f8fb/down/ack";
|
|
191
191
|
//const message = {"end_device_ids":{"device_id":"eui-a84041162183f8fb","application_ids":{"application_id":"hafi-ttn-lorawan"},"dev_eui":"A84041162183F8FB","join_eui":"A840410000000101","dev_addr":"260B141A"},"correlation_ids":["as:downlink:01HP6D18MQXJN90J5B07DC11HY","gs:uplink:01HP6D1A9X4WAA3SFMXH4ESSMV"],"received_at":"2024-02-09T07:41:41.776887672Z","downlink_ack":{"session_key_id":"AY2MUrmnuovS8DCZAfYmsA==","f_port":1,"f_cnt":21,"frm_payload":"AQAAeA==","confirmed":true,"priority":"NORMAL","correlation_ids":["as:downlink:01HP6D18MQXJN90J5B07DC11HY"],"confirmed_retry":{"attempt":1}}};
|
|
192
|
-
|
|
192
|
+
/*
|
|
193
193
|
// Chipstack
|
|
194
194
|
const topic = 'application/d63c10b6-9263-4ab3-9299-4308fa19a2ad/device/a84041f621857cd2/event/up';
|
|
195
195
|
const message = {
|
|
@@ -239,7 +239,76 @@ class Lorawan extends utils.Adapter {
|
|
|
239
239
|
modulation: { lora: { bandwidth: 125000, spreadingFactor: 7, codeRate: 'CR_4_5' } },
|
|
240
240
|
},
|
|
241
241
|
regionConfigId: 'eu868',
|
|
242
|
+
};*/
|
|
243
|
+
|
|
244
|
+
// Chipstack
|
|
245
|
+
const topic = 'application/bbea74d6-1fc5-4238-af20-d2aecdbb4f8e/device/70b3d52dd301b3cc/event/up';
|
|
246
|
+
const message = {
|
|
247
|
+
deduplicationId: '1d94e6d8-25cc-4099-ab45-4a7f7faa1634',
|
|
248
|
+
time: '2025-05-15T13:22:08.891648+00:00',
|
|
249
|
+
deviceInfo: {
|
|
250
|
+
tenantId: '52f14cd4-c6f1-4fbd-8f87-4025e1d49242',
|
|
251
|
+
tenantName: 'ChirpStack',
|
|
252
|
+
applicationId: 'bbea74d6-1fc5-4238-af20-d2aecdbb4f8e',
|
|
253
|
+
applicationName: 'Heizen',
|
|
254
|
+
deviceProfileId: 'aedb4f09-8644-430b-a088-47519f01530b',
|
|
255
|
+
deviceProfileName: 'MClimate Vicki',
|
|
256
|
+
deviceName: 'ThermostatKinderzimmerRika',
|
|
257
|
+
devEui: '70b3d52dd301b3cc',
|
|
258
|
+
deviceClassEnabled: 'CLASS_A',
|
|
259
|
+
tags: {},
|
|
260
|
+
},
|
|
261
|
+
devAddr: '01b6c24b',
|
|
262
|
+
adr: true,
|
|
263
|
+
dr: 5,
|
|
264
|
+
fCnt: 38547,
|
|
265
|
+
fPort: 2,
|
|
266
|
+
confirmed: false,
|
|
267
|
+
data: 'RADjUgC5gRKfTt7eEfAw',
|
|
268
|
+
object: {
|
|
269
|
+
CalibrationFailed: false,
|
|
270
|
+
ValveOpenness: 0,
|
|
271
|
+
MotorRange: 478,
|
|
272
|
+
ChildLock: false,
|
|
273
|
+
Reason: 81,
|
|
274
|
+
RelativeHumidity: 30.47,
|
|
275
|
+
BatteryVoltage: 3.5,
|
|
276
|
+
AttachedBackplate: true,
|
|
277
|
+
extSensorTemperature: 22.7,
|
|
278
|
+
TargetTemperature: 18,
|
|
279
|
+
PerceiveAsOnline: true,
|
|
280
|
+
BrokenSensor: false,
|
|
281
|
+
AntiFreezeProtection: false,
|
|
282
|
+
HighMotorConsumption: false,
|
|
283
|
+
Device: 'Vicki',
|
|
284
|
+
SensorTemperature: 23.06,
|
|
285
|
+
targetTemperatureFloat: 18.5,
|
|
286
|
+
MotorPosition: 478,
|
|
287
|
+
OpenWindow: false,
|
|
288
|
+
LowMotorConsumption: false,
|
|
289
|
+
},
|
|
290
|
+
rxInfo: [
|
|
291
|
+
{
|
|
292
|
+
gatewayId: '503035416e314750',
|
|
293
|
+
uplinkId: 55809,
|
|
294
|
+
gwTime: '2025-05-15T13:22:08.891648+00:00',
|
|
295
|
+
nsTime: '2025-05-15T13:22:08.927071564+00:00',
|
|
296
|
+
rssi: -81,
|
|
297
|
+
snr: 7.5,
|
|
298
|
+
channel: 2,
|
|
299
|
+
rfChain: 1,
|
|
300
|
+
location: { latitude: 50.693467319817266, longitude: 8.47676753997803 },
|
|
301
|
+
context: 'YOhWvA==',
|
|
302
|
+
crcStatus: 'CRC_OK',
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
txInfo: {
|
|
306
|
+
frequency: 868500000,
|
|
307
|
+
modulation: { lora: { bandwidth: 125000, spreadingFactor: 7, codeRate: 'CR_4_5' } },
|
|
308
|
+
},
|
|
309
|
+
regionConfigId: 'eu868',
|
|
242
310
|
};
|
|
311
|
+
|
|
243
312
|
//const topic = "application/d63c10b6-9263-4ab3-9299-4308fa19a2ad/device/a84041f621857cd2/command/down";
|
|
244
313
|
//const message = {"devEui":"a84041f621857cd2","confirmed":false,"fPort":1,"data":"AQAqMA=="};
|
|
245
314
|
|