This PR implements the API endpoint /api/usage/daily to fetch the most recent daily meter reading, which usually occurs at midnight of the previous day.
I've got another PR I'm working on that correctly parses 15min data. Unfortunately, the data provided by SMT does not contain the actual meter readings, it contains deltas.
Using this PR to fetch the previous days' midnight meter reading, and using a proper 15min data delta set, you can calculate the meter values every 15m, which is more desirable when storing into a time series database like influx, for presentations into grafana.
This PR implements the API endpoint /api/usage/daily to fetch the most recent daily meter reading, which usually occurs at midnight of the previous day.
I've got another PR I'm working on that correctly parses 15min data. Unfortunately, the data provided by SMT does not contain the actual meter readings, it contains deltas.
Using this PR to fetch the previous days' midnight meter reading, and using a proper 15min data delta set, you can calculate the meter values every 15m, which is more desirable when storing into a time series database like influx, for presentations into grafana.