Forecasting Solar Production

Post Reply
User avatar
HughInDevon
Posts: 67
Joined: Wed Jul 31, 2024 4:50 pm

Hi,
I’m trying to use the public (free) daily solar output estimate from the Forecast.Solar integration in Home Assistant. It works but I am confused by the output. Looking at the entity Estimated energy production – tomorrow shows s series of values over the day. I assume these are a series of estimates. However, what I would really like is a single number for the day. Then I can do a simple comparison of actual versus forecast and see how reliable the forecast is. Ideally I would like to collect the data for actual and forecast over a few weeks and graph it but that is a long way beyond my basic HA skills.

I believe PredBat can do something like this but from my first impressions it seems hellaciously complicated and I would like to keep it as simple as I can.

Any suggestions would be most welcome.

Thanks, Hugh
KH10 with 4 off ECS4800 batteries.
20 Jinko 435W panels in 2 strings. 10 on house, south facing, 10 on barn, east facing.
Solar installation active on 27/11/2024. Export MPAN active on 30.12/2024.
Zappi V2 charger and 2 EVs.
Currently on Octopus Intelligent Go tariff.
Home Assistant modbus integration (Now working - ish)
WyndStryke
Posts: 60
Joined: Mon Nov 18, 2024 9:16 pm

Have you tried Solcast? The instructions are in the predbat documentation. It's quite a bit more accurate than the others, from what I can see.

From Solcast, the single figure will be in sensor.solcast_pv_forecast_forecast_today or sensor.solcast_pv_forecast_forecast_tomorrow.

solcast_vs_generation.png
So here you can see the forecast being refined as the day progresses (blue), versus the actual generation (yellow). You can request the forecast up to 10 times per day. So perhaps once every 3 hours overnight, and once every couple of hours during the day.
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

Yes agree Solcast is better but you can still do what you want, using energy production today / tomorrow - the problem is they change throughout the day so you have lots of values.
If you are looking to calculate forecasts maybe pick a time (7am) and load a helper with energy production today then at the end of the day compare the helper with what you achieved and likewise for energy production tomorrow.
User avatar
HughInDevon
Posts: 67
Joined: Wed Jul 31, 2024 4:50 pm

Hi,
Thanks for the replies. I will look at SolCast and see if I can make use of it. My basic problem with all these updating predictions is that I need to act no later than say 02:00 on the day of the prediction. This is the time when I will need to decide to what level the battery is charged. If a sunny day is predicted I will charge to a pre-set level less than 100%. Ideally I would like a range of pre-set charge levels, depending on the forecast. For
example:

Forecast solar production less than 10 kWh. Charge to 100%
Forecast solar production less than 15 kWh. Charge to 80%
Forecast solar production less than 25 kWh. Charge to 70%
Forecast solar production over 25 kWh. Charge to 60%

By 02:00, assuming the Octopus IOG low-tariff periods stay the same, I will have put about 9 kWh into my battery and the level of charge will be at least 60%, so if loads of sunshine is expected, stop charging immediately.

I am still collecting data but it is looking like the domestic energy I need during the day, excluding EV charging, is around 14 kWh. With a margin of say 20%, I think about 17 kWh is a safe level to avoid the shame and ignominy of using any high-tariff grid import. So, considering the worst case of only charging to 60%, that 17 kWh will be made up of at least 10 kWh from the battery and 7 kWh from solar. Should be okay!

Fingers crossed!
Hugh
KH10 with 4 off ECS4800 batteries.
20 Jinko 435W panels in 2 strings. 10 on house, south facing, 10 on barn, east facing.
Solar installation active on 27/11/2024. Export MPAN active on 30.12/2024.
Zappi V2 charger and 2 EVs.
Currently on Octopus Intelligent Go tariff.
Home Assistant modbus integration (Now working - ish)
marcus
Posts: 13
Joined: Thu Aug 10, 2023 8:19 am

Thank you all for the pointer to SolCast, once set up with location, number of panels angle and directions it seems very accurate, time will of course tell!

I've gone for a simple solution with an automation running before midnight using

Code: Select all

entity_id: sensor.solcast_pv_forecast_forecast_tomorrow
which gives you a value in kWh for expected PV tomorrow, I'm just using that.

Had exactly same thoughts as yourself Hugh, I created a few helpers to play with slider input numbers for boundaries and set desired Max SoC % levels for the ECO 2am-5am period to avoid charging overnight just to start exporting the next morning
helpers.png
a snippet of my automation:

Code: Select all

alias: "Energy: set Max SoC ECO based on tomorrow's PV forecast"
description: Sets the Max SoC ECO according to the forecast for tomorrow
triggers:
  - at: "22:15:00"
    trigger: time
conditions: []
actions:
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: sensor.solcast_pv_forecast_forecast_tomorrow
            above: input_number.pv_forecast_high_threshold. <<<<<<< this boundary for kWh forecast from the slider input on the dash
        sequence:
          - target:
              entity_id: input_number.max_soc_eco <<<<<<< this value gets set a the number.max_soc on the inverter somewhere else triggered at 2am
            data:
              value: "{{ states('input_number.max_soc_eco_high') | float(0) }}". <<<<<<< this % from the slider input  on the dash
            action: input_number.set_value

      - conditions:
          - condition: numeric_state
            entity_id: sensor.solcast_pv_forecast_forecast_tomorrow
            above: input_number.pv_forecast_med_threshold
            
                       
            .... med, low and a default .. logging etc
I'm using Octopus FLUX so ECO is a fixed off peak rate 2am-5am

thanks again!
Marcus

House
H1 Series H1-3.7-E Inverter | RS485 Modbus->HA
8x Jinko 300W Mono (3x East facing; 5x South facing - 2400W)
Workshop
H1 Series H1-5.0-E Inverter | RS485 Modbus->HA
7x HV2600 2.6 kWh (5x V2; 2x V1 (Version C)) BMS V2 using this fix
12x Canadian 430W (2 strings South facing - 5160W)
WyndStryke
Posts: 60
Joined: Mon Nov 18, 2024 9:16 pm

You'll find the forecast gradually gets more accurate as time goes by. So if you fancy making the automation a bit more complex/intelligent, you could query it 3 times - once at the start of the charging period, once 1/3 of the way through it, and once 2/3 of the way through it. Then adjust the remaining charge a bit up or down depending on how the forecast changed. Of course it is adding quite a bit to the complexity for a probably small improvement.
Post Reply