Open GeoDerp opened 4 weeks ago
It should be noted we have been given permission by Solcast to use their API via the EMHASS application. We have also been given some conditions to follow with the use of the Solcast API for EMHASS:
"The only endpoints that are permitted under this use are the rooftop_sites/* urls from https://docs.solcast.com.au/#f60d61ac-d11e-412e-b47b-af8844cea252"
https://api.solcast.com.au/rooftop_sites/solcast_rooftop_id/forecasts
url, i don't believe any modification is needed."Use a custom User-Agent string in the HTTP requests that you are making so we can attribute traffic that is coming from your service/platform."
'User-Agent': 'EMHASS'
header has been implemented into this PR to adhere."To the extent that you can control how the users access the API, spread out the request times (e.g. by adding a random number of minutes) so that all the requests from your platform don't flood the API at the same time."
The Solcast results should only be seen by the holder of the API key
"If the number of users grows significantly or starts to cause problems that impact our ability to deliver the data to paying customers, Solcast reserves the right to revoke this permission."
A big thank you goes to the team over at Solcast for allowing us the permission to use the API. Its companies like them that can help the community to lower the carbon footprint and power costs.
@davidusb-geek , we are currently running this Solcast PR at home without any issues. Haven't done a thorough test but feel free to pull it in. I could also make some unittests for the PR if requested.
The last few commits added:
weather_forecast_cache_only
runtime parameter. when passed this will force the optimization to only use previously cached data. Otherwise it will produce an error.
Changes
weather_forecast_cache
, for caching results of a weather forecast to Pickle file: (Only supports Solcast as of now)Example: Ran in the morning with day-ahead to store current days forecast data.
Example: Run a couple of times throughout the day to update cached forecast data with the current Solcast data.
Pprogress