TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
983 stars 310 forks source link

Tracking consumed uplink/downlink Airtime #35

Open johanstokking opened 5 years ago

johanstokking commented 5 years ago

Summary:

We should be able to track the consumed airtime for messages, devices and applications.

What is already there? What do you see now?

We have it in v2, but nothing in v3

What is missing? What do you want to see?


Original issue: https://github.com/TheThingsIndustries/lorawan-stack/issues/1198 by @htdvisser

johanstokking commented 5 years ago

End device lifetime airtime is used to get an indication of battery life.

KrishnaIyer commented 4 years ago

I don't mind getting my hands dirty here if @rvolosatovs/ @johanstokking are busy with other things.

johanstokking commented 4 years ago

~Aggregates need to be calculated by an Event Server consumer.~

The time-on-air itself can be added as uplink message metadata using pkg/toa; that should be fairly straight-forward. I think it's nicest to have this calculated by NS.

neoaggelos commented 4 years ago

I opened #3298 for calculating consumed airtime of uplink messages.

For downlinks this is not straightforward (because the transmission settings are ultimately decided by the GS, so we need #76 and #56 first.

johanstokking commented 3 years ago

For downlinks this is not straightforward (because the transmission settings are ultimately decided by the GS, so we need #76 and #56 first.

Let's do this indeed later.


Start with tracking consumed airtime for uplink messages in the Network Server. This would be a lifetime device specific field. Additionally, store it in the session, so we have both.