Hi @ttrankine. I am sure that there are many others here far better qualified to answer this question than me. So take my advice for what you will.
I assume that the sensor that you are talking about is returning an INSTANTANEOUS value for power ( Watts ). By definition power is an instantaneous value and it can ( may ) change from moment to moment depending on the load on the circuit.
In order to accurately determine the power the sensor would need to know the Voltage ( V ), Current ( I ) and Power Factor ( PF ). The type of sensor that you are using would be a major factor in knowing its intrinsic accuracy.
You can upload both POWER and ENERGY to PVO. The maximum resolution of PVO is in 300 second ( 5 minute ) blocks. You could push values more often but you are limited to the rates set by PVO’s author API Specification — PVOutput documentation and you would only wind up overwriting older data anyway.
You can’t simply SUM the power figures to obtain the ENERGY figure. What you can do is sample the sensor at a certain rate ( up to you ) and calculate an ENERGY value based upon the average POWER figure for that period of time.
EG
Time 0:00 170W
Time 0:05 500W
Time 0:10. 300W
Time 0:15. 475W
In the above example you know the START and END power consumption so you could simply average the POWER figure ( 500 - 170 ) / 2 and multiply by 300s to get ENERGY ( in Joules ) for that interval of time.
If course what you don’t know is if the POWER only shifted to 500W at 4.9999s or at 0.000001s or anything else in between. It could also have risen to 2000W briefly during that 5s block!
The most accurate information really would come from an ENERGY meter that simply tallys that data over time like a utility meter. I think that any attempt to calculate ENERGY from POWER will be less accurate but probably good enough for most cases. The shorter the sample time the smoother your data so if your sensor allows 1s sampling perform 300 samples and update PVO every 5 minutes. I’d be surprised though that in a domestic situation this would really be necessary.
I’m curious to see how you get on and what any other PVO users have to say on the subject.
Grannos.