iobroker.lorawan 0.0.14 → 0.0.15

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 LoraWan@hafenmeister.co
19
19
  Placeholder for the next version (at the beginning of the line):
20
20
  ### **WORK IN PROGRESS**
21
21
  -->
22
+ ### 0.0.15 (2024-01-21)
23
+ * (BenAhrdt) bugfix chirpstack directory at downlink queued
24
+
22
25
  ### 0.0.14 (2024-01-21)
23
26
  * (BenAhrdt) bugfix chirpstack directory
24
27
 
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "lorawan",
4
- "version": "0.0.14",
4
+ "version": "0.0.15",
5
5
  "news": {
6
+ "0.0.15": {
7
+ "en": "bugfix chirpstack directory at downlink queued",
8
+ "de": "bugfix chirpstack verzeichnis bei downlink queued",
9
+ "ru": "bugfix chirpstack directory в очертаниях",
10
+ "pt": "bugfix chirpstack diretório no downlink queued",
11
+ "nl": "bugfix chirpstack directory bij downlink wachtrij",
12
+ "fr": "bugfix répertoire chirpstack au lien descendant en file d'attente",
13
+ "it": "bugfix chirpstack directory in downlink in coda",
14
+ "es": "bugfix chirpstack directorio en downlink queued",
15
+ "pl": "katalog chirpstock bugfix na downlink w kolejce",
16
+ "uk": "javascript licenses api веб-сайт go1.13.8",
17
+ "zh-cn": "下行链路队列时的 bugfix kirpstack 目录"
18
+ },
6
19
  "0.0.14": {
7
20
  "en": "bugfix chirpstack directory",
8
21
  "de": "bugfix chirpstack verzeichnis",
@@ -80,19 +93,6 @@
80
93
  "pl": "pierwsza wersja dla beta",
81
94
  "uk": "перша версія для бета",
82
95
  "zh-cn": "β的第一个版本"
83
- },
84
- "0.0.8": {
85
- "en": "first implementation of chirpstack",
86
- "de": "erste implementierung von chirpstack",
87
- "ru": "первая реализация chirpstack",
88
- "pt": "primeira implementação de chirpstack",
89
- "nl": "eerste implementatie van tsjirpstack",
90
- "fr": "première mise en œuvre de chirpstack",
91
- "it": "prima implementazione di chirpstack",
92
- "es": "primera implementación de chirpstack",
93
- "pl": "pierwsza realizacja chirpstock",
94
- "uk": "перша реалізація тирпастука",
95
- "zh-cn": "首次实施黑社会"
96
96
  }
97
97
  },
98
98
  "title": "LoRaWAN",
@@ -413,9 +413,11 @@ class directorieshandlerClass {
413
413
  const adapterObjectsAtStart = await this.adapter.getAdapterObjectsAsync();
414
414
  for(const adapterObject of Object.values(adapterObjectsAtStart)){
415
415
  if(adapterObject.type === "channel" && adapterObject.common.name !== "Information"){
416
+ adapterObject._id = this.adapter.removeNamespace(adapterObject._id);
416
417
  const baseDeviceInfo = this.adapter.getBaseDeviceInfo(`${adapterObject._id}.deviceInfo`);
417
418
  if(baseDeviceInfo.obectStartDirectory === adapterObject._id){
418
- devId = baseDeviceInfo.obectStartDirectory;
419
+ devId = baseDeviceInfo.device_id;
420
+ this.adapter.log.warn("Intern: " + devId);
419
421
  break;
420
422
  }
421
423
  }
@@ -451,10 +453,12 @@ class directorieshandlerClass {
451
453
  {
452
454
  devUid = message.devEui;
453
455
  }
456
+ this.adapter.log.warn("DEV UID: " + devUid);
454
457
  if(devUid !== undefined){
455
458
  if(typeof message !== "string"){
456
459
  switch(resolvetype){
457
460
  case this.searchableAttributeNames.deviceId:
461
+ this.adapter.log.warn(await this.getChirpstackAttributValue(topic,message,this.searchableAttributeNames.deviceId));
458
462
  return `${topicResolved?.applicationId}.devices.${devUid}.${await this.getChirpstackAttributValue(topic,message,this.searchableAttributeNames.deviceId)}`; // Hier muss die device id rein. (mussnoch mit async geholt werden)
459
463
 
460
464
  default:
package/main.js CHANGED
@@ -54,7 +54,7 @@ class Lorawan extends utils.Adapter {
54
54
  this.subscribeStatesAsync("*downlink.control.*");
55
55
  this.log.debug(`the adapter start with the config: ${JSON.stringify(this.config)}.`);
56
56
 
57
- /*setTimeout(async () => {
57
+ /* setTimeout(async () => {
58
58
  await this.startSimulation();
59
59
  }, 5000);*/
60
60
  }
@@ -65,9 +65,10 @@ class Lorawan extends utils.Adapter {
65
65
 
66
66
  async startSimulation(){
67
67
 
68
- const topic = "application/d63c10b6-9263-4ab3-9299-4308fa19a2ad/device/a84041f621857cd2/event/up";
69
- const message = {"deduplicationId":"96e4a065-ad5e-402d-a997-7b261072a33c","time":"2024-01-21T17:01:36.641008+00:00","deviceInfo":{"tenantId":"52f14cd4-c6f1-4fbd-8f87-4025e1d49242","tenantName":"ChirpStack","applicationId":"d63c10b6-9263-4ab3-9299-4308fa19a2ad","applicationName":"Benjamin Schmidt","deviceProfileId":"0b46400f-37ec-4f17-8005-168b06159347","deviceProfileName":"Dragino Feuchtesenor","deviceName":"Skimmer","devEui":"a84041f621857cd2","deviceClassEnabled":"CLASS_A","tags":{}},"devAddr":"01fd9738","adr":true,"dr":5,"fCnt":2,"fPort":2,"confirmed":false,"data":"DPYBAAD//wAA","object":{"soilconductivity":0.0,"soiltemperature":-0.1,"volt":3.318,"soilmoisture":0.0},"rxInfo":[{"gatewayId":"50303541b0344750","uplinkId":39169,"gwTime":"2024-01-21T17:01:36.641008+00:00","nsTime":"2024-01-21T17:01:37.695656999+00:00","rssi":-89,"snr":6.25,"rfChain":1,"location":{"latitude":50.69344693065449,"longitude":8.476783633232118},"context":"qESemw==","metadata":{"region_config_id":"eu868","region_common_name":"EU868"},"crcStatus":"CRC_OK"}],"txInfo":{"frequency":868100000,"modulation":{"lora":{"bandwidth":125000,"spreadingFactor":7,"codeRate":"CR_4_5"}}}};
70
-
68
+ //const topic = "application/d63c10b6-9263-4ab3-9299-4308fa19a2ad/device/a84041f621857cd2/event/up";
69
+ //const message = {"deduplicationId":"96e4a065-ad5e-402d-a997-7b261072a33c","time":"2024-01-21T17:01:36.641008+00:00","deviceInfo":{"tenantId":"52f14cd4-c6f1-4fbd-8f87-4025e1d49242","tenantName":"ChirpStack","applicationId":"d63c10b6-9263-4ab3-9299-4308fa19a2ad","applicationName":"Benjamin Schmidt","deviceProfileId":"0b46400f-37ec-4f17-8005-168b06159347","deviceProfileName":"Dragino Feuchtesenor","deviceName":"Skimmer","devEui":"a84041f621857cd2","deviceClassEnabled":"CLASS_A","tags":{}},"devAddr":"01fd9738","adr":true,"dr":5,"fCnt":2,"fPort":2,"confirmed":false,"data":"DPYBAAD//wAA","object":{"soilconductivity":0.0,"soiltemperature":-0.1,"volt":3.318,"soilmoisture":0.0},"rxInfo":[{"gatewayId":"50303541b0344750","uplinkId":39169,"gwTime":"2024-01-21T17:01:36.641008+00:00","nsTime":"2024-01-21T17:01:37.695656999+00:00","rssi":-89,"snr":6.25,"rfChain":1,"location":{"latitude":50.69344693065449,"longitude":8.476783633232118},"context":"qESemw==","metadata":{"region_config_id":"eu868","region_common_name":"EU868"},"crcStatus":"CRC_OK"}],"txInfo":{"frequency":868100000,"modulation":{"lora":{"bandwidth":125000,"spreadingFactor":7,"codeRate":"CR_4_5"}}}};
70
+ const topic = "application/d63c10b6-9263-4ab3-9299-4308fa19a2ad/device/a84041f621857cd2/command/down";
71
+ const message = {"devEui":"a84041f621857cd2","confirmed":false,"fPort":1,"data":"AQAqMA=="};
71
72
  await this.messagehandler?.handleMessage(topic, message);
72
73
  }
73
74
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.lorawan",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "converts the desired lora gateway data to a ioBroker structure",
5
5
  "author": {
6
6
  "name": "BenAhrdt",