ha-solcast-solar: No data from Solcast: No such file or directory

The problem Because the same issue (https://github.com/BJReplay/ha-solcast-solar/issues/92) occurred I upgraded to beta V.4.0.39, then got other errors in the log. I am running HA Core 2024.3.3 with HACS in Debian. Prior Solcast integration from oziee worked normally.

What version of Solcast Integration has the issue? V.4.0.39 Beta

Logs debug/info/error output

Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:294
integration: Solcast PV Forecast (documentation, issues)

Exception in sites_data(): Traceback (most recent call last): File "/home/xxxxx/.homeassistant/custom_components/solcast_solar/solcastapi.py", line 221, in sites_data async with aiofiles.open(apiCacheFileName, 'w') as f: File "/home/xxxxx/homeassistant/lib/python3.11/site-packages/aiofiles/base.py", line 63, in __aenter__ return await self ^^^^^^^^^^ File "/home/xxxxx/homeassistant/lib/python3.11/site-packages/aiofiles/base.py", line 59, in __await__ self._obj = yield from self._coro.__await__() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xxxxx/homeassistant/lib/python3.11/site-packages/aiofiles/threadpool/__init__.py", line 92, in _open f = await loop.run_in_executor(executor, cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/config/solcast-sites.json'
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:163
integration: Solcast PV Forecast (documentation, issues)

Exception in write_api_usage_cache_file(): [Errno 2] No such file or directory: '/config/solcast-usage.json'
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:164
integration: Solcast PV Forecast (documentation, issues)

Traceback (most recent call last): File "/home/xxxxx/.homeassistant/custom_components/solcast_solar/solcastapi.py", line 160, in write_api_usage_cache_file async with aiofiles.open(json_file, 'w') as f: File "/home/xxxxx/homeassistant/lib/python3.11/site-packages/aiofiles/base.py", line 63, in __aenter__ return await self ^^^^^^^^^^ File "/home/xxxxx/homeassistant/lib/python3.11/site-packages/aiofiles/base.py", line 59, in __await__ self._obj = yield from self._coro.__await__() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xxxxx/homeassistant/lib/python3.11/site-packages/aiofiles/threadpool/__init__.py", line 92, in _open f = await loop.run_in_executor(executor, cb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/config/solcast-usage.json'
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:454
integration: Solcast PV Forecast (documentation, issues)

Solcast site count is zero in load_saved_data(); the get sites must have failed, and there is no sites cache

Is there anything else I may do?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (3 by maintainers)

Commits related to this issue

Most upvoted comments

The KeyError at self._site_data_forecasts[site] is odd, possibly indicating a forecast fetch issue.

The list index out of range also possibly indicates a forecast fetch issue.

This is just guessing without seeing a complete debug log of what the forecast get data contains.

The difference in forecast remaining and forecast today is being introduced by the addition of some recent interpolation of the forecast data using a cubic spline. This likely wants tweaking, but is not worth opening a separate issue. I already know about it, and the difference is so minor that it just forms an annoyance.