[FEATURE] Predictive Charging should look past midnight to the next sunrise #410
Replies: 7 comments 9 replies
|
Thanks for the suggestion! 🙌 Here's how this works:
If your idea is very specific to your setup, it may not make it into the core integration — I'll try to suggest a workaround in that case. Feel free to discuss details or alternatives below. |
|
One thing that might help scope this: the midnight cut sits on the energy side only, not on the prices. Where the cut isConsumption is bounded to the calendar day, via This came up before: closing #228, ffunes noted the risk of "leaving the current night insufficiently covered". Same night, and right now it is uncovered by construction. Both inputs are there in timeTomorrow's solar forecast is available all day. Day-ahead prices land around 13:00 CET, and after that a re-plan would have both. Nothing triggers a re-plan on price publication today. Today, hereNL, 10 kWh of Marstek: Correct for the horizon it was given, and the two cheapest hours still go unused. Possible scopeEnding the energy horizon at the next solar onset, kept separate from the |
|
Hi everyone, I would like to chime in on this discussion with my specific use case and a related request. My setup:
The issue I'm facing: EVCC prioritizes the battery and is aware of the SoC, but the battery priority is overrules by EVCC when there is a charging plan or EVCC sees a low grid price where it's allowed to charge from the grid. The problem with the current Predictive Charging logic is that it realizes this too late. By the time it evaluates the low SoC and the lack of remaining solar for the day, the cheap grid charging windows have already passed. Even more problematic: when it does need to charge from the grid, Omnibattery needs to actively "claim" its charging spot/capacity. Currently, EVCC can sometimes counteract by claiming the remaining available grid power. If Omnibattery calculates its plan earlier and schedules a definitive grid-charging block, it could secure its needed charge before the expensive evening hours begin. EVCC should scale down if house or battery starts asking for more power. My current workaround & feature request: It would be fantastic if Predictive Charging could be made more dynamically aware of SoC and zero-remaining-solar situations, so it re-evaluates the charging plan earlier in the afternoon. This would allow it to schedule and claim a 'grid charge' block before EVCC takes all the available grid power or the prices peak. In the meantime, could the "Recalculate prices" action be exposed as a callable service in Home Assistant so we can automate this workaround? Thanks for all the great work on this integration! I know it's difficult, because both EVCC and the battery wants to charge - but someone knows how I can handle this. |
|
after installing omnibattery and playing with it im very happy except im missing 2 features. This one, #270 and #237. |
|
Implemented — this is in the next 1.5.0 beta. What changed:
The failure mode described in this thread — a small top-up sized to reach midnight, battery flat in the small hours, morning peak covered by the grid — is exactly what this addresses: the charge was budgeted to the wrong deadline. Once the beta is out, confirmations on a low-production day would be very welcome, from anyone here on a dynamic contract. And if you had raised the solar safety margin or the grid charge margin to compensate for this gap, it's worth winding those back down afterwards and re-checking. |
|
This is now out in 1.5.0b3, so it can be tested on a real low-production day. Reminder for anyone who padded the solar safety margin to work around the midnight cut: wind it back down and re-check, the plan now sizes the overnight charge against sunrise by itself. |






Uh oh!
There was an error while loading. Please reload this page.
Area of the proposal
Energy management or control strategy
What problem would this solve?
Currently, the energy and consumption predictions reset and operate on a calendar-day window (midnight to midnight).
When using a dynamic energy contract, this creates a significant gap during the morning peak hours (typically 06:00 – 09:00). At midnight, the integration considers the day "done", but the battery needs enough energy stored to bridge the night until the sun actually starts generating power the next morning.
As a result, the battery often runs out of charge during the early morning hours, forcing grid consumption during peak-rate hours right before solar generation begins.
Proposed solution
It would be great to have a prediction horizon that looks ahead beyond midnight—ideally until the expected solar generation onset (or a rolling 24-hour window) rather than cutting off at 00:00.
Specifically:
Solar-onset horizon: When calculating required storage/charge levels for the night, the integration should budget for expected consumption from midnight up to the moment solar production exceeds household load the next morning.
Dynamic price awareness for morning peaks: Take into account high energy tariffs during the morning peak (06:00 – 09:00) when deciding whether to charge from the grid overnight (during low-rate hours).
Example use case
Yesterday i had an unusual low solar production -less than needed to get to midnight on the battery alone-. I have Predictive Charging activated, so the integration charged additional energy from the grid. It calculated it needed to charge only .5kWh. that .5kWh did by far not charge my battery to the max soc (it charged to 76%), and as a result the battery was empty around 3am, with my home running the rest of the morning completely on grid power, including the expensive morning peak hours just before sunrise.
Who would benefit from this?
Most Omnibattery users
Alternatives or workarounds
I adjusted predictive charging settings:
Solar safety marging to 4kWh (which is over 50% of my usable soc) and Grid charge margin to 50%, but this lacks dynamic adjustments based on the actual forecasted solar production and household load for the next morning.
Additional context
Dynamic Contract Provider: Tibber
Solar forecast integration used: Solar forecast ML
Battery: 1x Zendure Solarflow 4000 MIX AC+
Grid type: single fase 1 x 35A
Confirmations
All reactions