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)

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

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 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>

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

actual.txt · Last modified: 2023/02/14 10:57 by knutkohl