API POST addbatchoutput of generation data results in consumption data (Automatic Upload) being zeroed

Hi, I recently started using https://github.com/jwillemsen/saj_collector to post generation data to pvoutput.org which uses https://github.com/johnf/pvoutput. In parallel, pvoutput is still fetching my consumption data from flukso.net (Automatic Uploads) - this has been working well for years.

Now the odd thing is, since I started uploading my generation data, my day-totals for consumption are being zeroed out.

Not being a ruby programmer :slight_smile: - using tcpdump, I’ve determined a POST to /service/r2/addbatchoutput.jsp being made, looks like this (condensed & newlines added for readability):


This seems to be valid data according to https://pvoutput.org/help.html#api-addbatchoutput; the generation data is correctly being uploaded.

Omitting the empty (and not required) fields results in the same zeroed fields for my consumption.

So I guess this is an API bug?

pvoutput system_id = 29573

P.S. It seems that I can “restore” the consumption total using MORE -> Recalculate, but obviously I would have to do that monthly for the month that has passed, first checking all 30 days… not a lot of fun.

The current behaviour of Add Batch Output is to blank out existing fields if it is not provided.

Add Output does not have this problem and will leave data alone if nothing is provided.

There will be a fix in the future to make align Add Batch Output with Add Output.

Thanks @bankstownbloke, that restriction was not on the API help page :slight_smile:
Look forward to the fix.

I’m also using Add Output via the saj_collector ruby libraries I suppose (5-minute intervals), but the Add Batch Output (uploading daily totals) seemed like a good way to “catch” any missing data that resulted from connectivity or PC issues.