TheThingsNetwork / lorawan-stack

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

Show normalized payload in the Console #5758

Open johanstokking opened 1 year ago

johanstokking commented 1 year ago

Summary

Show normalized payload in the Console

References https://github.com/TheThingsNetwork/lorawan-stack/pull/5752#pullrequestreview-1093063800

Current Situation

The new normalized_payload field in ApplicationUplink and ApplicationNormalizedUplink contain a known data schema: JSON Schema and documentation.

There is now very basic support for showing air and wind (https://github.com/TheThingsNetwork/lorawan-stack/commit/425b41a29ef38ecbbc2695abb35f48c34d4434c2), showing values as JSON.

The payload code editor shows normalized_payload{_warnings} as returned fields, but not as prominently as decoded uplink data.

Why do we need this? Who uses it, and when?

I think it would be good UX to show normalized payload if it's available.

Proposed Implementation

Low hanging fruit would be to show the normalized payload nicely in the payload editor. This would need its own code editor. If the normalized payload is present, it might be shown more prominent than decoded payload (but one does not replace the other).

What would be nice in the event view, is to show the values nicely. For example: Air: 25.4 ℃, wind: 4 bft (NNE) (if the normalized_payload were to contain {"air":{"temperature":25.4},"wind":{"speed":6.1,"direction":15}}.

Cherry on the pie would be to render temperature graphs based on historical data retrieved from the storage integration. We still don't want to be come an IoT platform, so this is a sliding edge, but it would be cool.

Contributing

Code of Conduct

KrishnaIyer commented 1 year ago

Also good to atleast have the wireframes for this early in Q3.

kschiffer commented 10 months ago

I've finished designing this feature as part of the general Console UX updates. Planning will follow.