ha-solcast-solar: Cannot connect to Solcast, so the integration will obviously fail
The problem
Hello everyone
Hopefully I’m asking my question in the right place. I have successfully downloaded and installed the Solcast integration. A corresponding API query automation is running in the background and the solcast.json is present. Unfortunately, I am not getting any values in the Solcast service entities. Reloading the Solcat integration several times has not been successful so far. Do you have any idea where I could start to fix this?
Thank you very much for your help
What version of Solcast Integration has the issue?
v4.0.35
What version of Home Assistant are you using?
No response
Diagnostics information
No response
Logs debug/info/error output
2024-07-09 11:57:38.070 INFO (MainThread) [custom_components.solcast_solar] SOLCAST - Service call: update_forecasts
2024-07-09 11:57:38.072 ERROR (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - http_data error: Traceback (most recent call last):
File "/config/custom_components/solcast_solar/solcastapi.py", line 1013, in buildforecastdata
self._forecasts_start_idx = self.calcForecastStartIndex()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/solcast_solar/solcastapi.py", line 1031, in calcForecastStartIndex
_LOGGER.debug("SOLCAST - calcForecastStartIndex midnight_utc %s, idx %s, len %s", midnight_utc, idx, len(self._data_forecasts))
^^^
UnboundLocalError: cannot access local variable 'idx' where it is not associated with a value
2024-07-09 11:57:38.077 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_total_kwh_forecast_day st 2024-07-08 22:00:00 end 2024-07-09 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 11:57:38.077 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_day 0 st 2024-07-08 22:00:00 end 2024-07-09 22:00:00 st_i 0 end_i 0 h.len 0
2024-07-09 11:57:38.078 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_peak_w_day st 2024-07-08 22:00:00 end 2024-07-09 22:00:00 st_i 0 end_i 0 res None
2024-07-09 11:57:38.078 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_peak_w_time_day st 2024-07-08 22:00:00 end 2024-07-09 22:00:00 st_i 0 end_i 0 res None
2024-07-09 11:57:38.079 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_total_kwh_forecast_day st 2024-07-09 22:00:00 end 2024-07-10 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 11:57:38.079 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_day 1 st 2024-07-09 22:00:00 end 2024-07-10 22:00:00 st_i 0 end_i 0 h.len 0
2024-07-09 11:57:38.079 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_peak_w_day st 2024-07-09 22:00:00 end 2024-07-10 22:00:00 st_i 0 end_i 0 res None
2024-07-09 11:57:38.079 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_peak_w_time_day st 2024-07-09 22:00:00 end 2024-07-10 22:00:00 st_i 0 end_i 0 res None
2024-07-09 11:57:38.080 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_total_kwh_forecast_day st 2024-07-10 22:00:00 end 2024-07-11 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 11:57:38.080 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_day 2 st 2024-07-10 22:00:00 end 2024-07-11 22:00:00 st_i 0 end_i 0 h.len 0
2024-07-09 11:57:38.081 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_total_kwh_forecast_day st 2024-07-11 22:00:00 end 2024-07-12 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 11:57:38.081 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_day 3 st 2024-07-11 22:00:00 end 2024-07-12 22:00:00 st_i 0 end_i 0 h.len 0
2024-07-09 11:57:38.081 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_total_kwh_forecast_day st 2024-07-12 22:00:00 end 2024-07-13 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 11:57:38.082 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_day 4 st 2024-07-12 22:00:00 end 2024-07-13 22:00:00 st_i 0 end_i 0 h.len 0
2024-07-09 11:57:38.082 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_total_kwh_forecast_day st 2024-07-13 22:00:00 end 2024-07-14 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 11:57:38.082 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_day 5 st 2024-07-13 22:00:00 end 2024-07-14 22:00:00 st_i 0 end_i 0 h.len 0
2024-07-09 11:57:38.082 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_total_kwh_forecast_day st 2024-07-14 22:00:00 end 2024-07-15 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 11:57:38.084 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_day 6 st 2024-07-14 22:00:00 end 2024-07-15 22:00:00 st_i 0 end_i 0 h.len 0
2024-07-09 11:58:00.158 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'cloud_coverage' when rendering '{{ tagesvorhersage['weather.forecast_home'].forecast[1].cloud_coverage }}'
2024-07-09 11:59:00.157 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'cloud_coverage' when rendering '{{ tagesvorhersage['weather.forecast_home'].forecast[1].cloud_coverage }}'
2024-07-09 12:00:00.156 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'cloud_coverage' when rendering '{{ tagesvorhersage['weather.forecast_home'].forecast[1].cloud_coverage }}'
2024-07-09 12:00:00.193 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_n_hour st 2024-07-09 10:00:00 end 2024-07-09 11:00:00 st_i 0 end_i 0 res 0
2024-07-09 12:00:00.194 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_remaining_today st 2024-07-09 10:00:00 end 2024-07-09 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 12:00:00.194 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_n_hour st 2024-07-09 11:00:00 end 2024-07-09 12:00:00 st_i 0 end_i 0 res 0
2024-07-09 12:00:00.195 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_custom_hours st 2024-07-09 10:00:00 end 2024-07-09 11:00:00 st_i 0 end_i 0 res 0
2024-07-09 12:00:00.195 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_power_n_mins st 2024-07-09 09:50:00 end 2024-07-09 10:10:00 st_i 0 end_i 0 res 0
2024-07-09 12:00:00.195 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_power_n_mins st 2024-07-09 10:20:00 end 2024-07-09 10:40:00 st_i 0 end_i 0 res 0
2024-07-09 12:00:00.195 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_power_n_mins st 2024-07-09 10:50:00 end 2024-07-09 11:10:00 st_i 0 end_i 0 res 0
2024-07-09 12:05:00.195 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_n_hour st 2024-07-09 10:00:00 end 2024-07-09 11:00:00 st_i 0 end_i 0 res 0
2024-07-09 12:05:00.195 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_remaining_today st 2024-07-09 10:05:00 end 2024-07-09 22:00:00 st_i 0 end_i 0 res 0
2024-07-09 12:05:00.196 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_n_hour st 2024-07-09 11:00:00 end 2024-07-09 12:00:00 st_i 0 end_i 0 res 0
2024-07-09 12:05:00.196 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_forecast_custom_hours st 2024-07-09 10:05:00 end 2024-07-09 11:05:00 st_i 0 end_i 0 res 0
2024-07-09 12:05:00.196 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_power_n_mins st 2024-07-09 09:55:00 end 2024-07-09 10:15:00 st_i 0 end_i 0 res 0
2024-07-09 12:05:00.197 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_power_n_mins st 2024-07-09 10:25:00 end 2024-07-09 10:45:00 st_i 0 end_i 0 res 0
2024-07-09 12:05:00.197 DEBUG (MainThread) [custom_components.solcast_solar.solcastapi] SOLCAST - get_power_n_mins st 2024-07-09 10:55:00 end 2024-07-09 11:15:00 st_i 0 end_i 0 res 0
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16
I wonder if this could possibly somehow be IPv6 related. If DNS returns a v6 address to use then your v6 config in your router could be weird. DNS may have returned v4 for the
curl.You could try turning v6 off in the HA network configuration.
(edit)
dig -6 ...doesn’t work for me, as I have no local v6 DNS configured, so HA would always use v4.(edit) Are any other Internet-dependant integrations failing?