oziee / ha-solcast-solar Goto Github PK
View Code? Open in Web Editor NEWSolcast Integration for Home Assistant
License: Apache License 2.0
Solcast Integration for Home Assistant
License: Apache License 2.0
Can you store the forecast so it is in place on a restart?
At the moment I think you poll the API on every restart.
I made a mess of my config files today trying to add defaults to all my |float templates.
As a result I did lots of restarts and I ran out of API credits.
If you didn’t poll on restart and just restored the data from a local store, it would prevent this.
Thanks,
Bruce.
After updating to v3.0.9 it looks like I can no longer add each site as a separate forecast.
I have two separate inverters installed and monitored with HA and used to be able to show each forecast in the Energy Dashboard separately. With the update to v3 there's no longer separate forecast entities but just one combined entity which means I can't assign the "east" site forecast to the east inverter and the "west" site forecast to the west inverter.
I'm running the latest commit 06a974a
Logger: custom_components.solcast_solar
Source: custom_components/solcast_solar/__init__.py:301
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 10:00:00 AM (16 occurrences)
Last logged: 11:00:00 AM
Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 274, in update_data lastforecastdate = parse_datetime(lastforecast["period_end"]).replace(tzinfo=timezone.utc).astimezone(tz=None) File "/usr/local/lib/python3.9/site-packages/isodate/isodatetime.py", line 51, in parse_datetime datestring, timestring = datetimestring.split('T') AttributeError: 'datetime.datetime' object has no attribute 'split'
From full log
2021-10-11 11:00:00 WARNING (SyncWorker_6) [custom_components.solcast_solar] self.data is SOMETHING!!!!!
2021-10-11 11:00:00 ERROR (SyncWorker_6) [custom_components.solcast_solar] Traceback (most recent call last):
File "/config/custom_components/solcast_solar/__init__.py", line 274, in update_data
lastforecastdate = parse_datetime(lastforecast["period_end"]).replace(tzinfo=timezone.utc).astimezone(tz=None)
File "/usr/local/lib/python3.9/site-packages/isodate/isodatetime.py", line 51, in parse_datetime
datestring, timestring = datetimestring.split('T')
AttributeError: 'datetime.datetime' object has no attribute 'split'
Just wanted to check.....
Does sensor.energy_production_forecast_today
contain the forecast for the whole of today?
Or just the future part of today ?
In the past I think it showed just the future part of today.
I think it now shows the whole day, but it seems a bit low compared with the data on the Solcast website ?
Just wanted to check what it should be showing before I look into it further.
Thanks
The HA Component is great!
PV tuning is not allowed anymore by Solcast for free tier thereby taking away the option to account for calibrating the solar production data due to trees, shadows, panels in more than one direction etc. for individual installs. Instead now 2 rooftop sites are allowed to account for solar panel arrays in two directions, in free tier.
Can I suggest that adding the functionality for allowing two/multiple rooftop sites, if possible?
Just thought I'd raise this as no one else seems to have this issue.
My forecasts are basically showing peak solar at midnight and vice versa.
I've checked locations and timezones on both Solcast and HA, also tried removing Solcast and reinstalling again.
Extracting the CSV shows the peak at around 2-3am
So I'd say that the forecast data isn't translating to my timezone.
Not keen on a full HA rebuild so I'm out of ideas.
Upgraded to 2.0.3 and on startup got this error?
Logger: custom_components.solcast_solar
Source: custom_components/solcast_solar/__init__.py:339
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 06:56:07 (1 occurrences)
Last logged: 06:56:07
sunrise_call_action: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 290, in sunrise_call_action ac = int(ac) TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
It is my understanding that I could add this under Integrations - but "Solcast PV Solar" does not come up as an option when searching for integrations in HA. (nor on HACS).
My setup:
Version | core-2022.6.7 |
---|---|
Installation Type | Home Assistant Container |
Development | false |
Supervisor | false |
Docker | true |
User | root |
Virtual Environment | false |
Python Version | 3.9.12 |
Operating System Family | Linux |
Operating System Version | 5.4.0-117-generic |
CPU Architecture | x86_64 |
Timezone | Europe/Copenhagen |
Hi!
Since the last update to Home Assistant 2021.12.8 and ha-solcast-solar v2.1.7 I always get the following errors while starting HA:
_```
2022-01-12 07:26:18 WARNING (MainThread) [custom_components.solcast_solar] Could not fetch data from Solcast, try again next day
2022-01-12 07:26:18 ERROR (MainThread) [custom_components.solcast_solar] _fetch_forecasts: Traceback (most recent call last):
File "/home/pi/.homeassistant/custom_components/solcast_solar/init.py", line 654, in _fetch_forecasts
2022-01-12 07:26:14 ERROR (MainThread) [custom_components.solcast_solar] set_state: Traceback (most recent call last):
File "/home/pi/.homeassistant/custom_components/solcast_solar/init.py", line 228, in set_state
In consequence no values can be fetched from solcast.
Anyone any ideas about this?
Before the update to pyhton 3.9 and the newest versions of ha and the integration it worked fine.
Greetings,
juuhee
I have juste update to the last version but all value are yet to zero
No update in over 2 hours now
Also, the forecast line is not showing either.
I then removed solcast and re-added the repository and integration.
2021-11-01 12:53:34 DEBUG (MainThread) [custom_components.solcast_solar] Setting up Solcast for rooftop id XXXX-XXXX-XXXX-XXXX
2021-11-01 12:53:34 DEBUG (MainThread) [custom_components.solcast_solar] registering API limit reset
2021-11-01 12:53:34 DEBUG (MainThread) [custom_components.solcast_solar] registering daily forecast update at 00:00:00
2021-11-01 12:53:34 DEBUG (MainThread) [custom_components.solcast_solar] registered forecast_today sensor sensor.solcast_forecast_today
2021-11-01 12:53:34 DEBUG (MainThread) [custom_components.solcast_solar] registered forecast_today_remaining sensor sensor.solcast_forecast_today_remaining
2021-11-01 12:53:34 DEBUG (MainThread) [custom_components.solcast_solar] registered forecast_tomorrow sensor sensor.solcast_forecast_tomorrow
2021-11-01 12:53:34 DEBUG (MainThread) [custom_components.solcast_solar] registered API count sensor sensor.solcast_remaining_api_count
2021-11-01 12:53:34 DEBUG (MainThread) [custom_components.solcast_solar] registered last_update sensor sensor.solcast_last_updated
2021-11-01 12:53:35 ERROR (MainThread) [custom_components.solcast_solar] sunrise_call_action: Traceback (most recent call last):
File "/config/custom_components/solcast_solar/init.py", line 290, in sunrise_call_action
ac = int(ac)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
2021-11-01 12:53:35 DEBUG (MainThread) [custom_components.solcast_solar] Updating Solcast estimated_actuals data
2021-11-01 12:53:36 DEBUG (MainThread) [custom_components.solcast_solar] Updated API count sensor
2021-11-01 12:53:36 DEBUG (MainThread) [custom_components.solcast_solar] Updated last_update (datetime) that successfully called Solcast API sensor
2021-11-01 12:53:36 DEBUG (MainThread) [custom_components.solcast_solar] Forecast successfully fetched and entity available
2021-11-01 12:53:38 DEBUG (MainThread) [custom_components.solcast_solar] Updated forecasts from Solcast API
2021-11-01 12:53:38 DEBUG (MainThread) [custom_components.solcast_solar] Notified 1 sensor listeners
2021-11-01 12:53:38 DEBUG (MainThread) [custom_components.solcast_solar] Notified 1 sensor listeners
2021-11-01 12:53:38 DEBUG (MainThread) [custom_components.solcast_solar] Notified 1 sensor listeners
2021-11-01 12:53:38 DEBUG (MainThread) [custom_components.solcast_solar] Notified 5 sensor listeners
When I look up the Solcast values, they all show as zero and the API was last polled in January 2000
System:
Solcast via HACS, v3.0.5 beta
Home Assistant Core 2022.6.6
Rebooted multiple times
It seems to be accessing the API ok as it pulled my house/solar configuartion no problem but no forecasting data appears.
Hello,
This is a really great addition and I've just been having a quick look over it. I believe that this uses the Solcast World PV Power API, I was wondering if you considered supporting the rooftop API?
You can configure two sites for panels in different orientations and the API supports setting inverter and panel capacities separately along with defining the installation date to automatically calculate degradation.
Parameters
Hi
I have just installed the intégration in HACS, restart HA and try to find the it in configuration/integration but I do not see it.
I am in HA version 2022.4.4!
Is there any issue?
How can I add it?
regards
hi
the instructions say to add it through integrations. it's not there. it's not in hacs either.
how do i manually install it? i've copied the code to custom_components.
but it doesn't come to life.
i tried copying dannerph/homeassistant-solcast instructions, applying to _solar folder name
check configuration wouldn't allow it.
thanks in advance
After upgrade to the next beta SolCast breaks:
https://rc.home-assistant.io/blog/2022/05/25/release-20226/
This error originated from a custom integration.
Logger: custom_components.solcast_solar
Source: custom_components/solcast_solar/__init__.py:492
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 7:44:57 AM (3 occurrences)
Last logged: 7:44:57 AM
get_forecast_sensor_state: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 432, in get_forecast_sensor_state event_s: list[int] = [event.event_data for event in events] File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2896, in __iter__ return self._iter().__iter__() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2903, in _iter result = self.session.execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1695, in execute conn = self._connection_for_bind(bind) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1536, in _connection_for_bind return self._transaction._connection_for_bind( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind conn = bind.connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py", line 406, in connect return super(Engine, self).connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3234, in connect return self._connection_cls(self, close_with_result=close_with_result) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 96, in __init__ else engine.raw_connection() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3313, in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3280, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 382, in connect return _ConnectionFairy._checkout(self, self._fairy) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout rec = pool._do_get() File "/usr/src/homeassistant/homeassistant/components/recorder/pool.py", line 75, in _do_get check_loop( File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop raise RuntimeError( RuntimeError: Blocking calls must be done in the executor or a separate thread; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job(); at homeassistant/components/recorder/pool.py, line 75: check_loop(
get_forecast_sensor_state: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 482, in get_forecast_sensor_state event_s: list[int] = [event.event_data for event in events] File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2896, in __iter__ return self._iter().__iter__() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2903, in _iter result = self.session.execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1695, in execute conn = self._connection_for_bind(bind) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1536, in _connection_for_bind return self._transaction._connection_for_bind( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind conn = bind.connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py", line 406, in connect return super(Engine, self).connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3234, in connect return self._connection_cls(self, close_with_result=close_with_result) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 96, in __init__ else engine.raw_connection() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3313, in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3280, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 382, in connect return _ConnectionFairy._checkout(self, self._fairy) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout rec = pool._do_get() File "/usr/src/homeassistant/homeassistant/components/recorder/pool.py", line 75, in _do_get check_loop( File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop raise RuntimeError( RuntimeError: Blocking calls must be done in the executor or a separate thread; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job(); at homeassistant/components/recorder/pool.py, line 75: check_loop(
get_forecast_sensor_state: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 457, in get_forecast_sensor_state event_s: list[int] = [event.event_data for event in events] File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2896, in __iter__ return self._iter().__iter__() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2903, in _iter result = self.session.execute( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1695, in execute conn = self._connection_for_bind(bind) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 1536, in _connection_for_bind return self._transaction._connection_for_bind( File "/usr/local/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 747, in _connection_for_bind conn = bind.connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/future/engine.py", line 406, in connect return super(Engine, self).connect() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3234, in connect return self._connection_cls(self, close_with_result=close_with_result) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 96, in __init__ else engine.raw_connection() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3313, in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 3280, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/impl.py", line 382, in connect return _ConnectionFairy._checkout(self, self._fairy) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 868, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.9/site-packages/sqlalchemy/pool/base.py", line 476, in checkout rec = pool._do_get() File "/usr/src/homeassistant/homeassistant/components/recorder/pool.py", line 75, in _do_get check_loop( File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop raise RuntimeError( RuntimeError: Blocking calls must be done in the executor or a separate thread; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job(); at homeassistant/components/recorder/pool.py, line 75: check_loop(
Hi
I ran the Solcast integration update this evening and noted it was showing an error after I had restarted the HA server:
when I click on Configure it was asking me to re-enter my Solcast API and rooftop_ID, so I enter those but it results in this error:
Clicking on the log shows this:
This error originated from a custom integration.
Logger: custom_components.solcast_solar
Source: custom_components/solcast_solar/__init__.py:58
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 8:04:04 PM (1 occurrences)
Last logged: 8:04:04 PM
async_setup_entry: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 33, in async_setup_entry api_key = entry.options[CONF_API_KEY] KeyError: 'api_key'
Not sure what I'm doing wrong?
Thanks for any pointers.
Firstly, thanks for your work on this custom HACS module!
Background: I'm using Home Assistant Core 2022.6.6 and ha-solcast-solar v3.0.5 beta (e1f3bc1). I was using the v2.2.3 release for quite some time with no issues, but recently had to switch because I was affected by the issues post Home Assistant Core 2022.4. My house has two arrays (east and west facing), and I have two sites following the instructions in README.md. I haven't changed my configuration since upgrading from v2.2.3 release to v3.0.5 beta.
Issue Description: The solar forecast in the Home Assistant energy dashboard is double what it should be, which also results in a significant variance between forecast and actuals. Below is a screenshot of solar forecast vs. actual production today. I have confirmed that this isn't an issue with Solcast's forecasts by checking their website for today, screenshot also attached.
Thanks in advance for any pointers or tips!
I've added the repository through HACS and downloaded. when I go to add the integration nothing shows up. have I done something wrong?
Thanks for the work on the Solcast integration, it has been really helpful as I am outside the Forecast Solar regions.
Would it be possible to document how to access the hourly values in the ReadMe, so they can be used in other automations.
I can see that 13.7 kWh is forecast between 1000-1100, but I cannot find this value as an attribute or sensor anywhere?
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:103
First occurred: 4:28:21 AM (4 occurrences)
Last logged: 4:28:23 AM
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for solcast_solar using this method at custom_components/solcast_solar/__init__.py, line 332: event_s: list[int] = [event.event_data for event in events]
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for solcast_solar using this method at custom_components/solcast_solar/__init__.py, line 432: event_s: list[int] = [event.event_data for event in events]
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for solcast_solar using this method at custom_components/solcast_solar/__init__.py, line 482: event_s: list[int] = [event.event_data for event in events]
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for solcast_solar using this method at custom_components/solcast_solar/__init__.py, line 457: event_s: list[int] = [event.event_data for event in events]
Upgrade to SolCast V2.2.0 has failed.
This error originated from a custom integration.
Logger: custom_components.solcast_solar
Source: custom_components/solcast_solar/__init__.py:59
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 2:35:33 PM (1 occurrences)
Last logged: 2:35:33 PM
async_setup_entry: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 37, in async_setup_entry change_tz = entry.options[CONF_CHANGE_TZ_OFFSET] KeyError: 'tz'
Hi,
I just updated to latest V2.0.4 and got this error.
2021-11-02 09:35:41 ERROR (MainThread) [custom_components.solcast_solar] sunrise_call_action: Traceback (most recent call last):
File "/config/custom_components/solcast_solar/init.py", line 291, in sunrise_call_action
ac = int(ac)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Full log for context
2021-11-02 09:35:40 DEBUG (MainThread) [custom_components.solcast_solar] Setting up Solcast for rooftop id XXXX-XXXX-XXXX-XXXX
2021-11-02 09:35:40 DEBUG (MainThread) [custom_components.solcast_solar] registering API limit reset
2021-11-02 09:35:40 DEBUG (MainThread) [custom_components.solcast_solar] registering daily forecast update at 00:00:00
2021-11-02 09:35:40 DEBUG (MainThread) [custom_components.solcast_solar] registered forecast_today sensor sensor.solcast_forecast_today
2021-11-02 09:35:40 DEBUG (MainThread) [custom_components.solcast_solar] registered forecast_today_remaining sensor sensor.solcast_forecast_today_remaining
2021-11-02 09:35:40 DEBUG (MainThread) [custom_components.solcast_solar] registered forecast_tomorrow sensor sensor.solcast_forecast_tomorrow
2021-11-02 09:35:40 DEBUG (MainThread) [custom_components.solcast_solar] registered API count sensor sensor.solcast_remaining_api_count
2021-11-02 09:35:40 DEBUG (MainThread) [custom_components.solcast_solar] registered last_update sensor sensor.solcast_last_updated
2021-11-02 09:35:41 ERROR (MainThread) [custom_components.solcast_solar] sunrise_call_action: Traceback (most recent call last):
File "/config/custom_components/solcast_solar/init.py", line 291, in sunrise_call_action
ac = int(ac)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
2021-11-02 09:35:41 DEBUG (MainThread) [custom_components.solcast_solar] Updating Solcast estimated_actuals data
2021-11-02 09:35:41 DEBUG (MainThread) [custom_components.solcast_solar] Updated API count sensor
2021-11-02 09:35:41 DEBUG (MainThread) [custom_components.solcast_solar] Updated last_update (datetime) that successfully called Solcast API sensor
2021-11-02 09:35:41 DEBUG (MainThread) [custom_components.solcast_solar] Forecast successfully fetched and entity available
2021-11-02 09:35:43 DEBUG (MainThread) [custom_components.solcast_solar] Updated forecasts from Solcast API
2021-11-02 09:35:43 DEBUG (MainThread) [custom_components.solcast_solar] Notified 1 sensor listeners
2021-11-02 09:35:43 DEBUG (MainThread) [custom_components.solcast_solar] Notified 1 sensor listeners
2021-11-02 09:35:43 DEBUG (MainThread) [custom_components.solcast_solar] Notified 1 sensor listeners
2021-11-02 09:35:43 DEBUG (MainThread) [custom_components.solcast_solar] Notified 5 sensor listeners
Running v2.1.2
on 2021.11.2
This is my SolCast csv data:
PvEstimate PvEstimate10 PvEstimate90 PeriodEnd Period
0.541 0.2474 0.5568 2021-11-09T08:30:00Z PT30M
1.2123 0.7447 1.2394 2021-11-09T09:00:00Z PT30M
1.7895 1.0839 1.8247 2021-11-09T09:30:00Z PT30M
2.2794 1.0777 2.3546 2021-11-09T10:00:00Z PT30M
2.4192 1.2531 2.6777 2021-11-09T10:30:00Z PT30M
2.0791 0.9728 2.9737 2021-11-09T11:00:00Z PT30M
1.8533 0.7661 3.1416 2021-11-09T11:30:00Z PT30M
1.2553 0.0526 3.118 2021-11-09T12:00:00Z PT30M
1.1269 0 3.0237 2021-11-09T12:30:00Z PT30M
0.6242 0 2.5329 2021-11-09T13:00:00Z PT30M
0.3652 0 2.2653 2021-11-09T13:30:00Z PT30M
--------
15.54 Total
But today's forecast from the component shows as: 7.8
Tomorrow is:
PvEstimate PvEstimate10 PvEstimate90 PeriodEnd Period
0.0223 0.0045 0.0919 2021-11-10T08:00:00Z PT30M
0.0838 0.0169 0.3526 2021-11-10T08:30:00Z PT30M
0.2949 0.17 0.8953 2021-11-10T09:00:00Z PT30M
0.4142 0.2267 1.3458 2021-11-10T09:30:00Z PT30M
0.5419 0.2525 1.714 2021-11-10T10:00:00Z PT30M
0.577 0.1847 1.9517 2021-11-10T10:30:00Z PT30M
0.6347 0.1595 2.183 2021-11-10T11:00:00Z PT30M
0.6335 0.0822 2.3019 2021-11-10T11:30:00Z PT30M
0.4925 0 2.2168 2021-11-10T12:00:00Z PT30M
0.4001 0 2.2588 2021-11-10T12:30:00Z PT30M
0.0021 0 2.075 2021-11-10T13:00:00Z PT30M
-------
4.097 Total
But tomorrow's forecast from the component shows as: 2.0
I've deleted, updated and logged.
2021-11-09 08:17:03 WARNING (MainThread) [custom_components.solcast_solar] Event: 'solcast_delete_all_forecasts' called.. All Forecast data is being deleted for xxxx-xxxx-xxxx-xxxx
2021-11-09 08:17:11 DEBUG (MainThread) [custom_components.solcast_solar] Updating Solcast estimated_actuals data
2021-11-09 08:17:12 DEBUG (MainThread) [custom_components.solcast_solar] Forecast successfully fetched and entity available
2021-11-09 08:17:12 DEBUG (MainThread) [custom_components.solcast_solar] Updated forecasts from Solcast API
2021-11-09 08:17:12 DEBUG (MainThread) [custom_components.solcast_solar] Update forecast service called for rooftop id xxxx-xxxx-xxxx-xxxx
2021-11-09 08:17:15 DEBUG (MainThread) [custom_components.solcast_solar] {'api_key': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'rooftop_id': xxxx-xxxx-xxxx-xxxx', 'disable_ssl': False, 'auto_fetch_enabled': True, 'auto_fetch_start_hour': 6, 'auto_fetch_end_hour': 17, 'auto_fetch_timer_object': True, 'api_call_counter': 2, 'update_forecast_not_by_time_last_called': '2021-11-09T08:17:08.637514+00:00', 'api_called_forecast_last_called_successfully': '2021-11-09T08:17:11.635097+00:00', 'api_called_past_forecast_last_called_successfully': '2021-11-09T08:17:12.005512+00:00'}
Sorry if this is the wrong way to seek upgrade info. First time doing so.
If upgrading from 3.0.5 to latest 3.0.12 do I still need to head the warning from earlier version?:
"upgrading from v3.0.5 or lover, need to delete the 'solcast.json' file in the HA>config directory to stop any errors"
Known problem.. will fix soon
This results in an error messaged raised when the API count reaches 50.
This error originated from a custom integration.
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:392
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 9 June 2022, 21:00:02 (2 occurrences)
Last logged: 00:00:03
Exceeded Solcast API allowed polling limit
This error originated from a custom integration.
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:413
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 9 June 2022, 21:00:02 (2 occurrences)
Last logged: 00:00:03
Solcast fetch_data error: Traceback (most recent call last): File "/config/custom_components/solcast_solar/solcastapi.py", line 394, in fetch_data raise Exception(f"HTTP error: Exceeded Solcast API allowed polling limit") Exception: HTTP error: Exceeded Solcast API allowed polling limit
I have a "rooftop-site" that is already setup in SolCast.
That site already has all the details of my positioning, tilt and is even tuned (as it got tuned before they stopped tunings small accounts).
Is it possible to use this SiteID to pull data into home assistant, rather than just giving it some basic information on location and tilt?
Thanks
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:103
First occurred: 15:49:01 (5 occurrences)
Last logged: 15:49:29
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for solcast_solar using this method at custom_components/solcast_solar/init.py, line 332: event_s: list[int] = [event.event_data for event in events]
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for solcast_solar using this method at custom_components/solcast_solar/init.py, line 432: event_s: list[int] = [event.event_data for event in events]
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for solcast_solar using this method at custom_components/solcast_solar/init.py, line 482: event_s: list[int] = [event.event_data for event in events]
Detected integration that accesses the database without the database executor; Use homeassistant.components.recorder.get_instance(hass).async_add_executor_job() for faster database operations. Please report issue to the custom component author for solcast_solar using this method at custom_components/solcast_solar/init.py, line 457: event_s: list[int] = [event.event_data for event in events]
I believe that this has only started to happen since upgrading to HA 2022.4.0
Upgraded component and rebooted.
Running 2022.6.4
This error originated from a custom integration.
Logger: custom_components.solcast_solar.solcastapi
Source: custom_components/solcast_solar/solcastapi.py:458
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 09:58:29 (1 occurrences)
Last logged: 09:58:29
Solcast http_data error: Traceback (most recent call last): File "/config/custom_components/solcast_solar/solcastapi.py", line 365, in http_data _data = _olddata['siteinfo'][site['resource_id']]['forecasts'] TypeError: 'float' object is not subscriptable
and
Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:408
Integration: Sensor (documentation, issues)
First occurred: 09:58:29 (2 occurrences)
Last logged: 09:58:29
Error adding entities for domain sensor with platform solcast_solar
Error while setting up solcast_solar platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 397, in state
if value.tzinfo is None:
AttributeError: 'str' object has no attribute 'tzinfo'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 810, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 571, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 408, in state
raise ValueError(
ValueError: Invalid datetime: sensor.api_last_polled has a timestamp device class but does not provide a datetime state but <class 'str'>
and this on poll
This error originated from a custom integration.
Logger: custom_components.solcast_solar.coordinator
Source: custom_components/solcast_solar/coordinator.py:116
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 10:00:10 (1 occurrences)
Last logged: 10:00:10
update_forecast: Traceback (most recent call last): File "/config/custom_components/solcast_solar/coordinator.py", line 84, in update_forecast if last_update < date_now: TypeError: '<' not supported between instances of 'str' and 'datetime.datetime'
This integration stopped working for me on 3 October, it just wouldn't load after I restarted HA one day (then 2021.9.7).
I removed and re-added it yesterday (10 October) (now running HA 2021.10.2) and now I'm getting this error:
Logger: root Source: custom_components/solcast_solar/pv_power_forecasts.py:75 Integration: Solcast PV Forecast (documentation, issues) First occurred: 8:25:44 AM (2 occurrences) Last logged: 8:26:15 AM The rooftop site cannot be found or is not accessible.
I've double-checked my API key and rooftop site id are correct. Multiple restarts of HA yield no improvement. The API usage log on the Solcast website shows no connection attempts since 3 October.
I've tried removing and re-adding the integration, reinstalling, uninstalling and removing the repo from HACS and re-adding+reinstalling. All efforts yield the same resulting error above.
This seems to be occurring every hour.
This error originated from a custom integration.
Logger: custom_components.solcast_solar.coordinator
Source: custom_components/solcast_solar/coordinator.py:109
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 12:00:04 (5 occurrences)
Last logged: 16:00:04
update_forecast: Traceback (most recent call last): File "/config/custom_components/solcast_solar/coordinator.py", line 106, in update_forecast update_callback() File "/config/custom_components/solcast_solar/sensor.py", line 208, in _handle_coordinator_update self._sensor_data = self.coordinator.get_sensor_value(self.entity_description.key) File "/config/custom_components/solcast_solar/coordinator.py", line 128, in get_sensor_value return self.solcast.get_forecast_this_hour() File "/config/custom_components/solcast_solar/solcastapi.py", line 185, in get_forecast_this_hour return round(g[0]['pv_estimate'] * 1000,0) IndexError: list index out of range
2022-06-08 14:00:04 ERROR (MainThread) [custom_components.solcast_solar.coordinator] update_forecast: Traceback (most recent call last):
File "/config/custom_components/solcast_solar/coordinator.py", line 106, in update_forecast
update_callback()
File "/config/custom_components/solcast_solar/sensor.py", line 208, in _handle_coordinator_update
self._sensor_data = self.coordinator.get_sensor_value(self.entity_description.key)
File "/config/custom_components/solcast_solar/coordinator.py", line 128, in get_sensor_value
return self.solcast.get_forecast_this_hour()
File "/config/custom_components/solcast_solar/solcastapi.py", line 185, in get_forecast_this_hour
return round(g[0]['pv_estimate'] * 1000,0)
IndexError: list index out of range
Have attached my solcast.json file (renamed as txt) that's been retrieved.
Hey,
This is really great and I was just wondering if you had any plans to open a PR to add these changes directly into Home Assistant?
Cheers
When the integration is loaded (after HA restart for example), I'm faced with the following error :
set_state: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 256, in set_state self._api_used = int(state) ValueError: invalid literal for int() with base 10: 'unknown'
As a result, all the sensors related to this integration are in the unknown state.
I've tripled check my API key and site-id. The forecast is displayed correctly on toolkit.solcast.com.
I'm using v2.2.3 of the integration, with HA 2022.4.0.
Has anyone been facing this issue ?
yup values are not right
Hi,
would it be possible to add pv_estimate10 and pv_estimate90 to events table?
As I understad here:
ha-solcast-solar/custom_components/solcast_solar/__init__.py
Lines 534 to 535 in 112219d
ha-solcast-solar/custom_components/solcast_solar/__init__.py
Lines 686 to 688 in 112219d
thanks !
Just updated to 2.11 and I'm now getting this error at startup.
This error originated from a custom integration.
Logger: custom_components.solcast_solar
Source: custom_components/solcast_solar/__init__.py:73
Integration: Solcast PV Forecast (documentation, issues)
First occurred: 5:46:32 AM (2 occurrences)
Last logged: 5:46:32 AM
async_setup_entry: Traceback (most recent call last): File "/config/custom_components/solcast_solar/__init__.py", line 48, in async_setup_entry auto_fetch = entry.options[CONF_AUTO_FETCH] KeyError: 'disable_auto_fetching'
This is amazing. Can't wait to try it with the recent changes.
Would be better if api counter didn't reset to zero on an HA restart.
I do often restart do to tweaks.
Could it not maintain the value across the restart so it could keep count. (Even if you can't guarantee that the count is perfect. )
The updated integration is using a lot of calls - 55 calls in 8 hours? (ie. more than the limit!?).
The flat maxed-out line was a couple of template sensors I was using, until I found and installed your integration for the Energy portal, about 3 weeks ago. It was working well, until the update yesterday.
Having some issues (it wouldn't update and maxed out the API calls), last night I removed the integration and custom component (restarting HA) and after the Solcast UTC counter reset this morning, I reinstalled them both "from scratch". It's getting values again, but has already maxed out the API calls so won't get anything tomorrow morning until the counter resets at 11am local time.
I'm not sure how to see/provide the logs from your HACS add-on though?
Thanks for your work on this integration! :-)
Hi,
At 00:00 the forecasts need to be updated as otherwise the "today" forecast is actually showing "yesterday" u too the next update.
I have scripts that run overnight and charge my powerwall based on the forecast.
Last night I had a problem as at 00:15 when it checked the today forecast it read was wrong as it was still the figure from the day before.
Hope that makes sense.
Thanks again !
2021-12-04 11:00:36 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.solcast_forecast_today_huawei (<class 'custom_components.solcast_solar.sensor.SolcastSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 11:00:36 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.solcast_forecast_today_remaining_huawei (<class 'custom_components.solcast_solar.sensor.SolcastSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 11:00:36 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.solcast_forecast_tomorrow_huawei (<class 'custom_components.solcast_solar.sensor.SolcastSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 11:00:36 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.solcast_api_count_huawei (<class 'custom_components.solcast_solar.sensor.SolcastSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 11:00:36 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.solcast_last_updated_huawei (<class 'custom_components.solcast_solar.sensor.SolcastSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 11:00:36 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.solcast_forecast_today_solaredge (<class 'custom_components.solcast_solar.sensor.SolcastSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 11:00:36 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.solcast_forecast_today_remaining_solaredge (<class 'custom_components.solcast_solar.sensor.SolcastSensor'>) implements device_state_attributes. Please report it to the custom component author.
2021-12-04 11:00:36 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.solcast_forecast_tomorrow_solaredge (<class 'custom_components.solcast_solar.sensor.SolcastSensor'>) implements device_state_attributes. Please report it to the custom component author.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.