BJReplay/ha-solcast-solar

Remove auto update at midnight to stop high polling of solcast server

Closed this issue · 3 comments

Possible future issue
The add on is working great , no issues.
Right now sensors get auto-updated around mid-night.
Screenshot 2024-09-15 12 05 51
Screenshot 2024-09-15 12 05 53
Screenshot 2024-09-15 12 05 55
Screenshot 2024-09-15 12 05 58
I remember oziee/ha-solcast-solar mentioned about this at some point. Solcast may get frustrated with their servers being bombarded heavily at certain point(midnight) due to auto-update, they could stop the free service anytime.

Describe the solution you'd like
Totally remove auto update at midnight. Let users decide the time they want sensors to be updated via automation. Also please add note somewhere that the update times be random to the seconds, so that gives a bit of leeway to solcast servers. example 08:13:53, rather than 08:00:00 or 08:15:00

image

Describe alternatives you've considered
Provide additional sensors(may be 10) which can be edited by users. update_time_01, update_time_02 or similar.

You control when the updates occur.

Please review the readme, and your automation which runs updates on a schedule of your choosing.

The readme suggests an automation that includes randomisation as the preferred approach.

There is no update that polls the Solcast servers at midnight - only an update of the local interpolated curve based on the last retrieved forecast.

Feel free to review the readme, and update your automation if you feel that it is out of date.

gcoan commented

Right now sensors get auto-updated around mid-night

Looking at your sensors I think you are mistaking what is happening locally with what is happening after API calls to Solcast.

As explained earlier the polling of solcast is done via your own automation so doesn't automatically happen at midnight.

What you've shown in your screen shots is the 'solar today', 'solar tomorrow' etc forecasts changing. This is the integration automatically moving the forecast data for each day into the correct sensor - day 2 forecast moves to tomorrows forecast, tomorrows forecast moves to todays forecast etc.
All of the data is cached by the solcast integration locally in your HA when an API call to solcast is made in your integration and so the data is already available and there's no midnight call to update the sensors

Spot on @gcoan,
I was analysing this yesterday and this morning. Finally got hold of whats happening at midnight. Shifting previously cached data from one sensor to another. I logged in to say all good and saw your comments.
So all good.
Thank you.