diff --git a/lib/modules/messagehandler.js b/lib/modules/messagehandler.js index b43f94b..d98bf9b 100644 --- a/lib/modules/messagehandler.js +++ b/lib/modules/messagehandler.js @@ -74,7 +74,6 @@ class messagehandlerClass { const deviceinformations = await this.adapter.getStateAsync(this.idDeviceinformations); if(deviceinformations && deviceinformations.val !== ""){ this.deviceinformations = JSON.parse(deviceinformations.val); - this.adapter.log.warn("1"); } else{ // Generate Infos of all defices and decoded folders @@ -84,7 +83,6 @@ class messagehandlerClass { await this.assignDeviceInformation(adapterObject._id,JSON.parse(uplinkState.val)); } } - this.adapter.log.warn("2"); } } catch(error){ @@ -114,11 +112,13 @@ class messagehandlerClass { case this.adapter.origin.ttn: if(message.uplink_message && message.uplink_message.decoded_payload){ this.deviceinformations[changeInfo.deviceEUI].uplink.decoded = message.uplink_message.decoded_payload; + this.deviceinformations[changeInfo.deviceEUI].uplink.time = message.rx_metadata.time; } break; case this.adapter.origin.chirpstack: if(message.object){ this.deviceinformations[changeInfo.deviceEUI].uplink.decoded = message.object; + this.deviceinformations[changeInfo.deviceEUI].uplink.time = message.rxInfo[0].nsTime; } break; }