I am collecting the following data into influxdb from smartthings:
power: current value in kW
energy: cumulated value in kWh
With a very simple request I can display the power consumption over time in grafana: SELECT mean("value") FROM "power" WHERE $timeFilter GROUP BY time($__interval), "deviceName" fill(previous)
What I am looking for now is to build a request that will profile my power consumption over a day, averaging each minute of the day over a period of time.
So that graph would only display 1 day from 0 to 24h and draw a line that would be my average consumption per (1|10|30?) minute(s) increments over the selected period.
This looks like a simple concept to me but I am not sure how to explain it, that’s maybe why I wasn’t able to find that answer yet
Let me know what you think about that, any help is appreciated.
Thank you
Hi
I have: SELECT non_negative_derivative(last("value"), 1d) FROM "device_119_usage" WHERE $timeFilter GROUP BY time(1d) fill(linear)
where device_119_usage is momentary power usage
Also time range I set to 1M.
So I get daily usage in kWh in separate bars for every day.
Thanks @xury but this is not what I am looking for, at least I don’t think so.
What I am looking is 1 graph over one 24h period that gives me my average consummation hour per hour for the selected period.
for example, for a selected period of last 7 days, I want that graph to show me 24 points on the x-axis:
average of power consumption between 0am to 1am over the last 7 days
average of power consumption between 1am to 2am over the last 7 days
average of power consumption between 2am to 3am over the last 7 days
…
average of power consumption between 11pm to 0am over the last 7 days
Does that make more sense explained like that ?
Thanks for your help !
Hi @cben0ist,
Did you have success during the last year? I am trying to achieve the same and could not find any sources for it here or via Google.
Regards
Alex