Solcast Global Solar Power Forecast Integration

I am having issues like this, 1pm nice bright day, forecast solar for this hour is 0kwh.
reboot HA, and it obviously pulls new data, working again.

Edit: So, after some more digging, it seems for me that the Solcast integration is having an issue with pulling data, and the REST API that I still had in config was working???

I removed the rest from config and the sensors are all 0.

I clearly have no idea what I am doing with this one… taking a break.

I finally got around to adding forecasts (via Solcast) to the energy section.

But it’s really weird?! It’s forecasting 0 production when the sun is at its peak and producing at night?

Help?

Go to your Solcast account, edit the site and make sure your location is set correctly.

Yup. Solcast is configured right. Shows the right timing now and everything

My location in HA is right too. Both are showing pins where my house is. Timezones both check out too.

Then is your Home Assistant location and timezone set correctly?

Yup. I checked that too.

HA
image

Solcast
image

I’m out of ideas then. :man_shrugging:

LOL. Thanks anyway, would’ve been nice if it worked but I’m not going to lose sleep over it. There’s clearly some kind of 12 hour offset going on.

Mine is working fine for same time zone:

It doesn’t help you specifically, only to say it does sound like something isn’t right in the settings somewhere.

Hi Guys,

I have been noticing something strange happening with my Solcast forecasting data. Everything worked fine last year through the summer and autumn with the Todays, Tomorrow & The day after tomorrow numbers making sense and being fairly accurate.

However now it seems like the data I pull through HA is way too high for the actual productions. I have looked through all the config files trying to find what I might have changed to mess up the reporting but using the developer tools and entering the entity: ‘sensor.solcast_forecast’ for today at the time of writing this post, I get a state reading of 8.9 kWh but this is impossible for my location in Cambridge, UK. The total forecast for today was 15.4kWH!

If i go on to the Solcast website and my location (roof top) then I see sensible and accurate data:

This morning I set up the HACS integration ‘Solcast PV Solar’ (GitHub - oziee/ha-solcast-solar: Solcast Integration for Home Assistant) in case it pulled the correct Solcast site data but I get the same forecasts as my original configuration gets:

I’m at a bit of a loss to resolve this as the Solcast website roof top seems to give more likely correct numbers but they dont seem to get pulled through by HA and either my configuration files set up or the new integration that I installed today…Anyone come across this or have a suggestion?

Thanx Chris.

is this Solar Forecast graph from coming from home assistant ?

never mind, found it in another thread :slight_smile:

ok, so how would you graph forecast in kw? the energy dashboard shows kwh but I want kw :slight_smile:

I tried to graph kw with apex charts, but it does seem off, though kwh forecast in the energy dashboard seems to be quite accurate.

I have two rooftop sites on solcast, and create a SQL sensors which basically dumps forceast into a string from database events table:

    - platform: sql
      db_url:  insert_db_here
      queries:
        - name: Solcast Total Forecast Longterm
          query: >
            select 1 as state,
            (select concat('[',GROUP_CONCAT(event_data), ']') from events where event_type='e6331e973645645f241487cf6fae74b9' group by event_type) as west,
            (select concat('[',GROUP_CONCAT(event_data), ']') from events where event_type='9cd5fbc56a558d1907aa0423d5e2c308' group by event_type) as south
          column: "state"

Which gives me sensor sensor.solcast_total_forecast_longterm with two attributes south and west which contain json data, e.g:

state: 1
west: [{"period_end": "2022-02-09T13:00:00+02:00", "pv_estimate": 0.54885}, .... ]
south: [{"period_end": "2022-02-09T13:00:00+02:00", "pv_estimate": 0.9862},....]

And then tried to render it with apex charts and overlay it with current solar production from my inverter:

  - type: custom:apexcharts-card
            graph_span: 36h
            apex_config:
              chart:
                height: 200px
            span:
              start: day
              offset: -6h
            now:
              show: true
              label: Now
            header:
              show: true
              title: Actual vs Forecast
              show_states: true
            series:
              - entity: sensor.solar_active_power
                name: Actual
                transform: return x / 1000;
                stroke_width: 2
                unit: kW
                fill_raw: last
                color: '#0da035'
                group_by:
                  func: avg
                  duration: 30min
                show:
                  legend_value: false
                extend_to_end: false
              - entity: sensor.solcast_total_forecast_longterm
                type: line
                extend_to_end: false
                unit: kW
                stroke_width: 1
                name: Forecast
                type: area
                show:
                  legend_value: false
                  in_header: 'raw'
                data_generator: |
                  const south = JSON.parse(entity.attributes.south);
                  return JSON.parse(entity.attributes.west).map((record, index) => {
                          return [
                            new Date(record.period_end).getTime(),
                            Number(record.pv_estimate) + Number(south[index].pv_estimate)
                          ];
                        });

Yet the kwh from energy seem to match:

but the kw forcast not so:

anything simpler? I know that there are people using both the integration and manual fetching but … maybe this could all be done via integration itself?

Do you have interval duration correct when converting interval energy to average power?

Forecasts are in half hourly intervals. Need to multiply energy (kWh) by two to get power (kW).

Yep, thanks. That did the trick, working nicely !

2 Likes

As of the latest HA and HACS version it still doesn’t. I suggest to add this post to the installation docs.

Can somebody explain me, how I can manually update the forecast? I read on github that I simply have to call the event “solcast_update_all_forecasts”, but I can’t’ make it work. Can somebody post a working automation to update the forecast?

alias: New Automation
description: ''
mode: single
trigger:
  - platform: time_pattern
    minutes: '0'
    seconds: '0'
condition:
  - condition: sun
    before: sunset
    after: sunrise
action:
  - event: solcast_update_all_forecasts
    event_data: {}

1 Like

Last night I upgraded HS to 2022.6.3 and my Solcast forecasts have disappeared from the Energy tab.

Any clues on what’s happened to it?

Thanks.

It is broken until oziee can complete a new release. The issue is trackable on github if you like but no way to resolve it unless you downgrade for now.

v3.0.3_beta is currently out to play with and works with the latest HA 2022.6+

read the readme for important changes etc

2 Likes