ha-solcast-solar: forecast not updating because of api limit reached

Describe the bug forecast not updating because of api limit reached. It has worked for a few days I think and new I see this error.

To Reproduce Steps to reproduce the behavior: No Idea. I was in hospital after I updated to the latest version of solcast and didn’t really monitor after I did the update.

Expected behavior That it updates. The api limit can’t be reached yet.

Screenshots afbeelding

Logs

`Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.solcast_solar.solcastapi
Bron: custom_components/solcast_solar/solcastapi.py:2313
integratie: Solcast PV Forecast (documentatie, problemen)
Eerst voorgekomen: 08:06:12 (9 gebeurtenissen)
Laatst gelogd: 08:16:17

The API is busy, pausing 77 seconds before retry
The API is busy, pausing 92 seconds before retry
The API is busy, pausing 117 seconds before retry
The API is busy, pausing 132 seconds before retry
The API is busy, pausing 149 seconds before retry`
`Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.solcast_solar.solcastapi
Bron: custom_components/solcast_solar/solcastapi.py:2337
integratie: Solcast PV Forecast (documentatie, problemen)
Eerst voorgekomen: 08:18:46 (1 gebeurtenissen)
Laatst gelogd: 08:18:46

API was tried 10 times, but all attempts failed`
`Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.solcast_solar.solcastapi
Bron: custom_components/solcast_solar/solcastapi.py:1981
integratie: Solcast PV Forecast (documentatie, problemen)
Eerst voorgekomen: 08:18:46 (1 gebeurtenissen)
Laatst gelogd: 08:18:46

Forecast update for site x failed so not getting remaining sites`
`Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.solcast_solar.solcastapi
Bron: custom_components/solcast_solar/solcastapi.py:2005
integratie: Solcast PV Forecast (documentatie, problemen)
Eerst voorgekomen: 08:18:46 (1 gebeurtenissen)
Laatst gelogd: 08:18:46

At least one site forecast failed to fetch, so forecast has not been built`

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 43 (10 by maintainers)

Most upvoted comments

P.S. Have been re-netflixing Three Body Problem. Is still good second time around. Less blurry, too.

Just revert the change here?

Yeah, nah. It’s a force fetch. Can’t update the API used, as that’s against the current simple implementation “rules” of “auto-update should only mess with that counter or it will get lost”.

Force is force. It’s up to the user to be mindful of actual total used count above what auto-update will consume. Which brings my brain back to instrumentation of this, and added complexity, which brings my brain back to Urdu can’t deal.

(If you’re listening, @billy-solcast, how about into the suggestions box: Including api used in the response for a forecast fetch? That’s low cost, single call and could be used to re-adjust an internal counter…)

I think it is the api is busy

@hwb45, they do get feisty at times. I have built in retries to try tenaciously, unlike Oziee versions that just tossed their toes in the air at the first smell of a 429. But sometimes… bad things happen.

Unexplained things have happened in this issue report, including a raised exception, which should not happen, nor be possible, but that may be because @bert1111 (to misquote @BJReplay, and no offence intended) may have tried sacrificing a chicken or some other unnatural act to try and revive something that was simply a temporary error, as noted in the readme.

(You didn’t go the voodoo route @bert1111, did you, by changing API keys and expecting a different result? 🤣 I’m still interested in the exception that you got that should not be, though. I cannot explain it, and that code was tested many times just days ago. Weird. If you did use voodoo it would be useful to know…)

2024-10-17 11:27:17.736 INFO (MainThread) [custom_components.solcast_solar] Service call: update_forecasts
2024-10-17 11:27:17.737 DEBUG (MainThread) [custom_components.solcast_solar.coordinator] Checking for stale usage cache
2024-10-17 11:27:17.739 INFO (MainThread) [custom_components.solcast_solar.solcastapi] Getting forecast update for site 4220-0dc5-b46c-5b6e
2024-10-17 11:27:17.740 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Polling API for site xxxxxxxxxx lastday 2024-10-24 numhou
rs 181
2024-10-17 11:27:17.741 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Fetch data url: https://api.solcast.com.au/rooftop_sites/xxxxxxxxxxxxxxx/forecasts
2024-10-17 11:27:17.741 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Fetching forecast
2024-10-17 11:27:18.857 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Fetch successful
2024-10-17 11:27:18.857 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] API returned data, using force fetch so not incrementing API counter
2024-10-17 11:27:19.414 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] HTTP session returned data type <class 'dict'>
2024-10-17 11:27:19.415 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] HTTP session status 200/Success
2024-10-17 11:27:19.415 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] 363 records returned
2024-10-17 11:27:19.480 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Forecasts dictionary length 5855
2024-10-17 11:27:19.482 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Undampened forecasts dictionary length 1056
2024-10-17 11:27:19.892 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] HTTP data call processing took 0.477 seconds
2024-10-17 11:27:19.898 INFO (MainThread) [custom_components.solcast_solar.solcastapi] Getting forecast update for site cee7-9c91-f834-32ad
2024-10-17 11:27:19.899 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Polling API for site xxxxxxxxxxxxxxx lastday 2024-10-24 numhours 181
2024-10-17 11:27:19.902 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Fetch data url: https://api.solcast.com.au/rooftop_sites/cxxxxxxxxxxxxxxxxxxxxxxx/forecasts
2024-10-17 11:27:19.902 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Fetching forecast
2024-10-17 11:27:21.066 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Fetch successful
2024-10-17 11:27:21.067 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] API returned data, using force fetch so not incrementing API counter
2024-10-17 11:27:21.614 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] HTTP session returned data type <class 'dict'>
2024-10-17 11:27:21.615 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] HTTP session status 200/Success
2024-10-17 11:27:21.615 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] 363 records returned
2024-10-17 11:27:21.664 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Forecasts dictionary length 5855
2024-10-17 11:27:21.666 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Undampened forecasts dictionary length 1056
2024-10-17 11:27:22.059 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] HTTP data call processing took 0.444 seconds
2024-10-17 11:27:22.547 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Data for 2024-10-17 contains all 48 records
2024-10-17 11:27:22.548 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Data for 2024-10-18 contains all 48 records
2024-10-17 11:27:22.549 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Data for 2024-10-19 contains all 48 records
2024-10-17 11:27:22.550 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Data for 2024-10-20 contains all 48 records
2024-10-17 11:27:22.551 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Data for 2024-10-21 contains all 48 records
2024-10-17 11:27:22.554 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Data for 2024-10-22 contains all 48 records
2024-10-17 11:27:22.556 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Data for 2024-10-23 contains all 48 records
2024-10-17 11:27:22.559 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Data for 2024-10-24 contains all 48 records
2024-10-17 11:27:22.560 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Calculating splines
2024-10-17 11:27:22.612 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Build forecast processing took 0.546 seconds
2024-10-17 11:27:22.947 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Saved forecast cache /config/solcast.json
2024-10-17 11:27:23.003 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] Saved forecast cache /config/solcast-undampened.json
2024-10-17 11:27:23.003 INFO (MainThread) [custom_components.solcast_solar.solcastapi] Forecast update completed successfully