Solcast Global Solar Power Forecast Integration

The Energy Dashboard feature introduced support for Forecast.Solar which uses the data from the EU Photovoltaic geographical information system which means that the Asia Pacific region including Australia and New Zealand are not covered.

The initial implementation meant that alternative providers couldn’t be supported but with this PR in 2021.9 the functionality for other providers has been implemented.

The free Solcast Rooftop Solar Sites API provides global coverage (except Antarctica) for fixed systems under 1 MW. The API offers two endpoints live and forecast with live providing an estimation of PV power for 7 days ago to present time while forecast offers Present time to +7 days ahead.

The forecast is updated every 5-15 minutes depending on the region and the returned data is to a 30 minute resolution. The API allows a maximum of 50 API requests per day across all sites and a maximum of two sites for free accounts.

The reason two sites are included free of charge is to enable more accurate forecasts for multiple orientation strings so if any implementation could support combining multiple sites into one forecast that would be optimal.

The API Documentation can be found here: Solcast API Documentation
The link to sign up and setup your location is here: Solar power forecasts for rooftop sites via API

They do say that but in practice it’s actually 50 / day.

Screenshot 2021-09-01 at 16-27-20 Solcast API Toolkit

Well in that case the default refresh value can be every 30 minutes or 60 minutes if using two sites. I would like to see a dynamic option which incorporates sunrise and sunset to maximise the resolution but that may be harder to implement.

Looks good, now when I get the time to try another OS upgrade I can try and make it work :wink:

It does usually give a pretty good forecast. Not sure what happened this morning though. The sun wasn’t even up when it was forecasting 1000W.

Screenshot 2021-09-04 at 13-20-52 Overview - Home Assistant

Really hoping that this is integrated. Solcast offers some additional functionality that is regional specific by allowing for an Inverter AC capacity and PV capacity separately. This is great for regions where Inverter Feed In or max power restrictions are in place, but still allow for more panels to be installed. Where I am located I am limited to 5kW of Inverter AC, but can install 6.6kW of PV with rebates, so nearly everyone will do this. You get more energy production here, even though it is capped to 5W AC output… Forecast.solar can not handle this.

1 Like

Exists already:

https://github.com/dannerph/homeassistant-solcast

I don’t think that supports integration with the Energy Dashboard which is the desire here.

2 Likes

It also has provision for posting tuning measurements which is no longer valid for the free rooftop solar plan.

1 Like

I am using this already, but as Uskompuf has explained it doesn’t integrate into the new Energy Dashboard. The Solcast figures are more accurate for my region in the last weeks.

1 Like

You should be able to do this in a script that calls the sensor update service, uses a time_template and has conditions for sunrise and sunset.

Just set the scan interval to be a very high number to avoid the sensor updating by itself.

Can’t remember where I’ve seen it before but would use these:

Somthing like (this is totally untested and unwarranted!!!)

alias: Update Solcast Sensor
description: ''
mode: single
trigger:
  - platform: time_pattern
    minutes: /30
condition:
  - condition: sun
    after: sunrise
    before: sunset
action:
  - service: homeassistant.update_entity
    target:
      entity_id: sensor.solcast_forecast_data

I’ve just found out that someone is working on this integration and is close to getting it all working (just a time conversion issue). You can see there GitHub post about it here:

1 Like

We now have an integration available here: https://github.com/oziee/ha-solcast-solar

1 Like

There is also an integration if you already have rooftop sites setup on the website and want to use them:

1 Like

No point doing it less than one hour for forecast updates as the HA energy dashboard only updates it’s display hourly too

2 Likes

Ahh yes, that makes sense.

I was curious why your integration makes two requests and not just one, is there much point retrospectively updating old forecasts?

really no :slight_smile:
I guess my thinking was if it was forecast to be 5kw and actually due to cloud change etc was 3kw it would update the graph to reflect it.

also when the integration is first added, the data it gets is only form that hour going forward… there is no previous data sesame ppl would look at it and think somethings wrong

being I only have 1 rooftop and 50 api calls to use, that means 48 with 2 spare polling every hour.

polling at night is pointless, so this is something I will be adding soon as I get some time

I might rem out the polling for actual (or make it a check box) as I would hope that the forecast values polled 30min prior would be updated

2 Likes

I think it is more useful to see what the predicted vs actual was.

Honestly I feel like this is fine and not worth the expense of doubling API calls, maybe only call historical once the first time it is setup?

That would be helpful for people with more then 2 rooftops.

I agree

seeing the graph today I can see why I pulled the past data… Forecast.solar api display the entire data forecast, where as solcast api only shows data from that even hour of half hour from the time it is polled onwards. So starting the poll at midday would only show the forecast from midday on.

So I am going to poll backwards once when the integration first starts to fill in so that it looks good when it first loads…

in the end (this happens to me time to time) if anyone needs to configure it to work differently for them they can fork the repo and customise it to fit their needs. ( I have had to do this a few times)

1 Like

So how many times a day will the integration end up polling?

I would like to keep my other graph that uses rest data that polls every 30 minutes as well as use the integration:

Screenshot 2021-09-25 at 18-40-29 Overview - Home Assistant

I can probably live with reducing the polling rate down to 60 minutes.