-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Network layer BatteryPercentage to ApplicationUplink #7427
Comments
I think this is worth an extra field.
I don't think this field should be sticky, that is, always included. I think it should only be there when there's a new value. To query the latest battery percentage, we already have NS API. |
Hmm how do we track this though? We'd need to store the state that there's a new value and set/unset that or something. Also if the first uplink that contains an updated value is missed by the data sink (integration), then they'd miss the update. I get the idea but it feels like this adds a complication. |
NS receives the value in
True. OK. Then, how about we add it, as |
Ok so we send the value every message but indicate the last update using |
Yes, something like this: {
...
"received_at": "2024-12-12T12:36:21Z",
"uplink_message": {
"f_cnt": 42,
...
"last_battery_percentage": {
"f_cnt": 24,
"value": 93,
"received_at": "2024-12-12T12:14:01Z"
}
} |
ACK sounds good 👍 |
Summary
Add Network layer
BatteryPercentage
toApplicationUplink
.Current Situation
Battery (value/percentage/capacity etc) is usually a part of the application payload for many devices. The format here is left to the device implementation.
However, LoRaWAN supports the
DevStatus
commands to allow the Network Server to queryBatteryPercentage
from end devices and the format of this value is standardized.Why do we need this? Who uses it, and when?
Some customers choose not to send this data in the application payload but use the LoRaWAN network layer value.
In TTS we already store this in the end device.
We just have to append this to the ApplicationUplink similar to what we do with the Packet Error Rate.
The downside is that this adds an extra field which bloats the uplink message.
@johanstokking: Do you see any side effects of doing this?
Proposed Implementation
LatestBatteryPercentage
toApplicationUplink
.DevStatusReq
was never sent or sent a very long time ago)ApplicationUplink
.Contributing
Validation
Code of Conduct
The text was updated successfully, but these errors were encountered: