Note: The number of users of this project has grown considerably. This is great. Unfortunately, the operation of solar prognosis (Solarprognose) is not free of charge. The free weather API will soon be exhausted. Currently, as the operator, I pay the costs for the operation of Solarprognose.de. If each user would donate only 5 € per year, this would cover the current operating costs (may increase if bigger webserver required, more weather api requests etc.). Click here to read how you can donate
The Solarprediction API is based on HTTP requests. The response messages are in JSON (JavaScript Object Notation) or XML. Important: To reduce traffic and server load please use a local cache on your webserver. I recommend caching the result for at least one hour (the weather does not change that fast).
Solarprediction API
The HTTP requests for daily or hourly prediction of production should be in the following format:
http://www.solarprognose.de/web/solarprediction/api/v1? access-token=ACCESS-TOKEN &item=ITEM&id=ID Alternative: &item=ITEM&token=TOKEN &type=hourly|daily
&_format=json|xml
&algorithm=mosmix|own-v1|clearsky &day=DAY &start_epoch_time=START_EPOCH_TIME&end_epoch_time=END_EPOCH_TIME &start_day=START_DAY&end_day=END_DAY &snomminixml=true # for snom VoIP telephones
ACCESS-TOKEN
Your API Access Token.
ITEM and ID
ITEM
location or plant or inverter or module_field
ID
The ID is the id of the item.
ITEM and TOKEN
ITEM and TOKEN is required to access items in the prediction which are not public: &item=inverter&token= If you access with your access-token then you can access your private (non-public) items.
Dates and Periods
DAY
allowed values: from -2 to 6
Then you will get the data from the day relative to now. Attention: This may be limited by your plan! The error "STATUS_ERROR_INVALID_END_DAY" may occur if the value is higher than in your plan.
START_DAY
allowed values: from -2 to 6
For requesting data from a specific time period. This defines the start day relative from today. Attention: This may be limited by your plan! The error "STATUS_ERROR_INVALID_END_DAY" may occur if the value is higher than in your plan.
END_DAY
allowed values: from -2 to 6
For requesting data from a specific time period. This defines the end day relative from today. Attention: This may be limited by your plan! The error "STATUS_ERROR_INVALID_END_DAY" may occur if the value is higher than in your plan.
START_EPOCH_TIME
e. g.: 1439650241
For requesting data from a specific time period. This defines the start epoch time. Attention: This may be limited by your plan! The error "STATUS_ERROR_INVALID_END_DAY" may occur if the value is higher than in your plan.
END_EPOCH_TIME
e. g.: 1439650241
For requesting data from a specific time period. This defines the end epoch time. Attention: This may be limited by your plan! The error "STATUS_ERROR_INVALID_END_DAY" may occur if the value is higher than in your plan.
Status Codes
If you are using a invalid api key then you will receive the HTTP Status Code 401 Unauthorized.