Today I noticed that energy values are not stored anymore when POSTing missing pv data via the Add Batch Status API. Only the power values are stored.
Looking at other problems, this looks like
except that I use the Add Batch Status API, and I do not have values that big.
Did anything change in that API or is there some problem with it?
Details of the POST request I do:
URL: http://pvoutput.org/service/r2/addbatchstatus.jsp
Headers: X-PVoutput-SystemId and X-PVoutput-ApiKey
Body: data=…&c1=1
The value of data is a semi-colon separated sequence of date,time,enery,power values (the date, time, energy and power values are comma-separated), This is as documented on the Help page
Since my inverter and smartmeter only provide lifetime values, I use c1=1
Example: data=20230311,07:20,42006800,24;20230311,07:25,42006804,48&c1=1
NOTE: I do not send the net flag, and I sent max. 100 entries per request (I’m a donating user)
Sending the same data via postman returns an error saying the energy value is too high for the given time.
Bad request 400: Energy value [42006800] too high for [07:20]
I don’t understand why that is: the lifetime values are in watts, as specified in the API docs
Also, until today I was able to send my missing data this way
Update: when I put the c1=1 flag before the data= parameter sending the request via postman succeeds. But the energy values shown on the daily page in PVoutput.org stay 0; this makes me suspect the request body data is cutoff somewhere (possibly on the receiving side). Network tracing shows that the full data is sent.
To get my energy totals right, I manually updated the status with the totals of that particular date and removed all 5 minute status records. But that’s not a desirable solution.
So I removed all 5 minute statusses of the date and posted all data in batches again. Now the daily page shows my energy values correctly.
Will keep an eye on this when using my normal tool to upload missing data.