Addstatus.jsp n=1 import export confusion

I’ve been using SBFSpot on a Raspberry Pi 4 to upload 5-minute generation data for many years. Recently I’ve also been uploading daily peak and off-peak energy usage data every night at 00:05. All good, so far.

I thought it was time to add 5-minute import/export data extracted from my electricity smart meter using Home Assistant. But that is not going well :frowning:.

Every 5 minutes Home Assistant uses addstatus.jsp to send data like this:
payload='d=20240919&t=00:05&n=1&v2=0&v4=210'

payload='d=20240919&t=17:15&n=1&v2=0&v4=99'

Here is my system for today.

The power used values being added look to be OK. The calculated energy used values are wildly out. For instance, my off-peak usage (00:00 - 05:30) is 17.9kWh according to my smart meter, but PVOutput only shows 1.511kWh.

I can’t figure out what I’m doing wrong. Can anyone point me in the right direction, before I decide to abandon my inport/export data uploads to PVOutput.

I had a powershell script calling the API, using the bulk import, and it required the inputs to be the accumulated energy (ie KWH), not the instantaneous power (W or KW), your result looks like it could be the same? I had to sum the( 5 minute power * the time (5/60 of an hr) )and send that for the 5 minute readings. Your 17.9 kwh would be approx 1022W average over the 17.5hs, so that looks like the 1511 might have been either the max, or last power reading you sent trhough?? Just guessing, but the numbers look about right.

Thanks for this info. I read the net data specification shown in the API docs. That has v2=power exported and v4=power imported. No mention of having to multiply the values by minutes since last update. Given this info I’m going to take another look to see if I can make more sense of it. The API docs make it look so simple!

The API only needs v2 for the power exported in the last 5-minutes and v4 imported last 5-minutes, but based on the graph the calculated gross consumption power seems to be mirroring the generation.

Your suggestion of multiplying the actual Watts value by 12 (60/5) seems to have worked.

PVOutput shows 14.629kWh (peak) and 6.664kWh (off-peak) for yesterfay.
The meter shows 14.772kWh (peak) and 6.930kWh (off-peak) for yeaerday.
These values are close enough for me to be happy.

When I used to update the daily stats at 00:05 this would set the Credit value to £0.00. I would then have to chose Edit and Save for the Credit value to be recalculated. But no more - so another job saved!