Forecast.Solar

Restful API for Solar plant production and Weather forecast data

User Tools

Site Tools


actual

Table of Contents

Adjust forecast

(Personal account upwards)

You can send actual production data to adjust the forecast matching your actual real production, it will affect only the actual day, not the next days.

There are 2 methods to adjust your forecast according to your actual plant production.

The POST method, based on location, will affect your location and the locations nearby, some kilometers in the vicinity.

The GET method, based on location and plane, will only affect this API request.

:!:   Please note that if you send correction data very early in the day, this can have a massive effect on the daily forecast!

POST

You can submit the actual relative plant production for your location.

:!:   Production value here must given always in kWh/kWp (relative)   :!:

Send a POST request to this URL:

https://api.forecast.solar/:apikey/actual/:lat/:lon

URI parameters:

  • :apikey - personal API key; string
  • :lat - latitude of location, -90 (south) … 90 (north); float
  • :lon - longitude of location, -180 (west) … 180 (east); float

POST data:

  • value - required; actual relative plant production in kWh/kWp; float
  • timestamp - optional; a unix timestamp or any datetime string parsable by PHP strtotime(); int or string, default now

cUrl example

curl --request POST 'https://api.forecast.solar/<your API key>/actual/<latitude>/<longitude>' \
     --form 'value="<float kWh/kWp>"' --form 'timestamp="<int or string>"'

This will respond HTTP code 201 on success, 400 on error.

Just in case, to delete the actual value just send an empty POST without data

curl --request POST 'https://api.forecast.solar/<your API key>/actual/<latitude>/<longitude>'

This will respond HTTP code 204 on success, 400 on error.

This will affect your location and locations in a radius nearby.

GET

You can also submit the actual absolute plant production direct during a forecast request.

:!:   Production value here must given always in kWh (absolute)   :!:

With any call for a forecast

https://api.forecast.solar/:apikey/estimate/...

you can direct add a query parameter

?actual=<float kWh>
actual.txt · Last modified: 2023/04/22 17:04 by knutkohl