davidusb-geek / emhass

emhass: Energy Management for Home Assistant, is a Python module designed to optimize your home energy interfacing with Home Assistant.
MIT License
260 stars 51 forks source link

weather_forecast_cache (solcast) #300

Open GeoDerp opened 4 weeks ago

GeoDerp commented 4 weeks ago

Changes

Pprogress

GeoDerp commented 3 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"

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

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

GeoDerp commented 2 weeks ago

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

GeoDerp commented 1 week ago

The last few commits added: