API bug adding output with peak time before 10am?

I seem to be having an API problem with submitting outputs with peak output times before 10am, Calling addoutput.jsp with a ‘pt’ time argument beginning with a 0 (e.g. 09:59) results in just a hyphen in the list of outputs. Times from 10:00 onwards are fine. According to https://pvoutput.org/help.html#api-addoutput the format is hh:mm, although I’ve also tried just e.g. 9:59 (in other words without the 0 at the beginning), but that doesn’t help.

If, however, I manally edit the output via the web page (which said the existing time was “N/A”) and select the correct time from the drop down, that does work, so things aren’t completely broken with such times.

Is there something I’m missing or is there a bug in addoutput.jsp?


Please provide the exact API query request, without your API key, that is being sent.

Not sure if this is connected but using SBFSpot on a Pi from a SMA inverter I’ve noticed that if that day’s peak output is 10am or earlier, peak time is not recorded on the daily outputs screen.


Here’s an exact command line my script uses which failed to update the peak time:

curl -s -S -d d=20170715 -d g=9017 -d e=4508 -d pp=1824 -d pt=08:40 -d ‘cm=0mm rain, 0h38m out of 16h20m sun’ -d tm=11 -d tx=19 -d cd=Cloudy -H ‘X-Pvoutput-Apikey: XXXX’ -H ‘X-Pvoutput-SystemId: 2822’ http://pvoutput.org/service/r1/addoutput.jsp

The -d argument to curl is how to provide POST data. And of course it stll works for times from 10am onwards. Also, to be clear, I do get a server response of “OK 200: Added Output”

A bit more information I have is that I know it had stopped working by 23rd Feb 2017, and the last time I submitted a time before that (which worked) was 15th November 2016, so it stopped working some time between those two dates.

Thanks for looking at this.


This has been fixed, please try again.

I can confirm it does work now. Thanks! :smile: