geoffreycoan
I thought I had everything working again after the engineer sorted the battery issues but it seems solcast is still giving me issues. If I reload Solcast then everything is fine but leave it alone for a bit and it loses the forecast again. I'm still getting the 429 error despite having set the automation to call solcast to 7.13 past the 8 hour repeat.
Looking at the logs, These errors occur at 04:00:35 which makes me wonder what is calling solcast at this time. The automation I have triggered when it was meant to at 08:07:13 but I didn't get any data until I manually reloaded the integration.
This error originated from a custom integration.
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:141
integration: Solcast PV Forecast (documentation, issues)
First occurred: 04:00:35 (1 occurrences)
Last logged: 04:00:35
SOLCAST - sites_data Solcast.com http status Error 429 - Gathering rooftop sites data.
But also the following Errors:
This error originated from a custom integration.
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:154
integration: Solcast PV Forecast (documentation, issues)
First occurred: 04:00:35 (1 occurrences)
Last logged: 04:00:35
SOLCAST - sites_data Exception error: Traceback (most recent call last): File "/config/custom_components/solcast_solar/solcastapi.py", line 144, in sites_data raise Exception(f"SOLCAST - HTTP sites_data error: Solcast Error gathering rooftop sites data.") Exception: SOLCAST - HTTP sites_data error: Solcast Error gathering rooftop sites data.
This error originated from a custom integration.
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:188
integration: Solcast PV Forecast (documentation, issues)
First occurred: 04:00:35 (1 occurrences)
Last logged: 04:00:35
SOLCAST - sites_usage error: Traceback (most recent call last): File "/config/custom_components/solcast_solar/solcastapi.py", line 177, in sites_usage raise Exception(f"SOLCAST - sites_usage: gathering site data failed. request returned Status code: {status} - Responce: {resp_json}.") Exception: SOLCAST - sites_usage: gathering site data failed. request returned Status code: 429 - Responce: None.
Logger: homeassistant.util.loop
Source: util/loop.py:136
First occurred: 08:07:13 (1 occurrences)
Last logged: 08:07:13
Detected blocking call to open with args ('/config/solcast.json', 'w') inside the event loop by custom integration 'solcast_solar' at custom_components/solcast_solar/solcastapi.py, line 97: with open(self.filename, "w") as f: (offender: /config/custom_components/solcast_solar/solcastapi.py, line 97: with open(self.filename, "w") as f🙂, please create a bug report at https://github.com/BJReplay/ha-solcast-solar/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self.run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in run_once handle.run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in run self.context.run(self.callback, self.args) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1495, in call self.hass.async_run_hass_job(self.job, self.utc_point_in_time) File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job hassjob.target(args) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1808, in pattern_time_change_listener hass.async_run_hass_job(self.job, localized_now, background=True) File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job hassjob.target(*args) File "/usr/src/homeassistant/homeassistant/components/homeassistant/triggers/time_pattern.py", line 86, in time_automation_listener hass.async_run_hass_job( File "/usr/src/homeassistant/homeassistant/core.py", line 941, in async_run_hass_job return self.async_add_hass_job(hassjob, *args, background=background) File "/usr/src/homeassistant/homeassistant/core.py", line 756, in async_add_hass_job task = create_eager_task( File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/components/automation/init.py", line 858, in async_trigger_if_enabled return await self.async_trigger(run_variables, context, skip_condition) File "/usr/src/homeassistant/homeassistant/components/automation/init.py", line 755, in async_trigger return await self.action_script.async_run( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1770, in async_run return await asyncio.shield(create_eager_task(run.async_run())) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 465, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 527, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 765, in async_call_service_step self.hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 830, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/core.py", line 2731, in async_call response_data = await coro File "/usr/src/homeassistant/homeassistant/core.py", line 2774, in execute_service return await target(service_call) File "/config/custom_components/solcast_solar/init.py", line 139, in handle_service_update_forecast await coordinator.service_event_update() File "/config/custom_components/solcast_solar/coordinator.py", line 67, in service_event_update await self.solcast.http_data(dopast=False) File "/config/custom_components/solcast_solar/solcastapi.py", line 543, in http_data await self.serialize_data() File "/config/custom_components/solcast_solar/solcastapi.py", line 97, in serialize_data with open(self.filename, "w") as f: