[Newbie] Graph that converts watts/hr to watts

Hi,

I’m new to all this and I hope this makes sense, I’m feeding my home power usage (watts/hour) into InfluxDB every second, so I want to figure out my actual power usage as a 30 minute average (my “wholesale” power company charges me the 30 minute average market rate) and that average should start on the hour, for example lets say these are the averages of my readings for the time period shown:

12:00-12:29:59 - mean 350 watts/hour
12:30-12:59:59 - mean 1500 watts/hour
13:00-13:29:59 - mean 1000 watts/hour
13:30-13:59:59 - mean 320 watts/hour

So a graph that starts on the hour with a 30 minute window period should show:

12:00-12:29:59 - mean 175 watts
12:30-12:59:59 - mean 750 watts
13:00-13:29:59 - mean 500 watts
13:30-13:59:59 - mean 160 watts

Window period 1h, aggregate function: mean on a graph with step interpolation looks good (it’s not plotting on the hour, half past the hour though) it’s mostly working because its watts/hour averaged over an hour.

Thanks.
Richard