springfall2008 / batpred

Home battery prediction and charging automation for Home Assistant, supporting many inverter types
https://springfall2008.github.io/batpred/
118 stars 41 forks source link

Some weird interplay between battery charging and EV charging #247

Closed adamwylde closed 11 months ago

adamwylde commented 11 months ago

Hi @springfall2008

I'm seeing some odd behavior where predbat seems to be not making best use of the overnight cheap window. As you'll see from the below, when it hit 23:30 last night it charged up the battery although not fully despite the dreadful weather, then let it discharge to the house overnight. A few minutes ago the graph suggested it was then going to charge for half an hour at 06:00-06:30 because I have an extra intelligent charging slot then - but now thats plan has disappeared and its not charging up. You can see in the predicition we will run out of battery today.

a0d7b954_appdaemon_2023-11-04T05-55-14.484Z.log

image

image

Any ideas please?

Thanks

adamwylde commented 11 months ago

(I've just set best_soc_min to 9.5 to force it to charge temporarily)

adamwylde commented 11 months ago

A couple of other observations:

I've looked through the log and it looks like I've upload one that doesnt match the images - as I mentioned at some points the plan did show charging during the intelligent slot - the log does show that, the images were slightly later where it had reverted to not charging. Of course, either way, the point is it didnt charge fully, or the whole night like usual, regardless of this bonus slot.

FYI Now that I've set best_soc_min to 9.5, the prediction is showing the 'charge_limit_base' for tomorrow matching todays extra Intelligent slot (6-6:30) which is odd: image

springfall2008 commented 11 months ago

Somehow your plan period seems too short. What do you have it set to in apps.yaml ?

adamwylde commented 11 months ago

Set to defaults:

forecast_hours: 48 forecast_plan_hours: 24

adamwylde commented 11 months ago

Seems to have been fine overnight, maintaining the full battery as expected right through some extra slots this morning. I didnt change anything!

image

springfall2008 commented 11 months ago

I think you need forecast_plan_hours to be 48 in this case, it's confused because the extra slots are assumed to be repeated tomorrow (which they aren't).

That said I normally have the allow car to charge from battery turned off and that has the same effect overall.

What are you other settings, do you have combine charge turned on?

adamwylde commented 11 months ago

Allow car to charge from battery is off. (I'm not overly bothered it showed up tomorrows slots in the plan as by the time they are relevant they disappear anyway). Combine charge slots is on.

I'm largely following your Intelligent settings guide.

Full options below:

image

Thank you

adamzest commented 11 months ago

Having had the car fail to charge overnight I got an extra Intelligent slot this morning which I'm currently in the middle of, and the rest of the plan is now not right, although I'm sure it will fix its-self once this slot has finished! (Best SOC Min is 9.5, so the overnight period this evening should be to the max). You mentioned that the plan needed increasing to prevent the repeating IO slot which I haven't changed, but the overnight charge is well within the next 24 hours and as I say, its min 9.5kwh anyway).

image

Having updated the plan hours to 48 fixes the overnight charge, but also continues to show todays bonus charge on tomorrows plan?

(https://github.com/springfall2008/batpred/files/13293796/a0d7b954_appdaemon_2023-11-08T07-49-57.318Z.log) image [a0d7b954_appdaemon_2023-11-08T07-49-57.318Z.log]

springfall2008 commented 11 months ago

Isn’t the bonus charge the one in green as base, not the one Predbat has picked in yellow?

adamwylde commented 11 months ago

Yes your quite right 🤦‍♂️

I guess it’s working correctly then with 48 hour plan! Thanks


From: Trefor Southwell @.> Sent: Wednesday, November 8, 2023 7:59:05 AM To: springfall2008/batpred @.> Cc: adamwylde @.>; Author @.> Subject: Re: [springfall2008/batpred] Some weird interplay between battery charging and EV charging (Issue #247)

Isn’t the bonus charge the one in green as base, not the one Predbat has picked in yellow?

— Reply to this email directly, view it on GitHubhttps://github.com/springfall2008/batpred/issues/247#issuecomment-1801268816, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJLBFXLOS6NKR7JOEMIRP63YDM3UTAVCNFSM6AAAAAA65LFV6GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGI3DQOBRGY. You are receiving this because you authored the thread.Message ID: @.***>