How to understand solar prediction and produce a charging / energy management algorithm

I have been trying to establish a sane way to decide how much forced charging my batteries need based on data available.
I have solar prediction data, but the today and tomorrow values change all the time so I am not sure if they are actual 00:00-23:59 values or for the remainder of the day and the next 24 hours. They are also not obviously linked to weather in my location.
I then have a value of how much is left in the battery.
So a simple algorithm if the predictions seemed to make sense would be:

  1. just before low cost power time (which is early morning), check predicted solar and battery curent charge
  2. If good solar and charge is enough, do nothing
  3. If solar will be poor charge
  4. If battery is low, charge anyway.

I would very much appreciate input from anyone with a good understanding of solar prediction and any other cool features of HA that might help with this.

Thank you and regards,
Chris.

1 Like

Before any of your automations will work you need to get a good meteorological service for your specific location with the sensor data you need.
HA can not provide this, bit maybe someone can point you to a service if you write your location.

I am just about to do simular for my upcomming installation
I think ill usr data from Forecast.Solar to predict the wether.

Did you solve / find code for your system?

1 Like

@ledyr-sthlm I have not solved the issue as I find the data from Forecast.Solar is just not sufficiently reliable here in the UK. I would think in a country with decent land mass like Germany or France where weather is a bit more consistent you may find better results.
Here the predicted values for the next 24 hours change so often that if my automation runs at 10pm I might get the decision to use forced charging in the morning and then by 10.30 or 11 the result is to not use forced charging and then an hour later it is a different result again.
I was running my automation at 10pm and making the forced charging decision by hand after an alert of the forcast results and a read of the weather report, but that was just too much hard work and only got me a slightly better than random result.
I do hope your results are better than mine.
As to why I think it is UK related, from my house I can usually see 3 or more distinct weather areas when the forecast is not accurate, where I have lived and stayed in other countries where forecast weather is a bit more uniform over large areas.

1 Like