Open johanstokking opened 5 years ago
End device lifetime airtime is used to get an indication of battery life.
I don't mind getting my hands dirty here if @rvolosatovs/ @johanstokking are busy with other things.
~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.
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.
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.
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?
google.protobuf.Duration consumed_uplink_airtime
andgoogle.protobuf.Duration consumed_downlink_airtime
to theEndDevice
proto messagegoogle.protobuf.Duration consumed_airtime
toApplicationUplink
google.protobuf.Duration consumed_airtime
toApplicationDownlink
(or whatever we send in theApplicationUp.downlink_sent
fieldOriginal issue: https://github.com/TheThingsIndustries/lorawan-stack/issues/1198 by @htdvisser