Need battery lock in smart mode
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When you focus on solar first charging to get a high as possible solar charge, i don`t want the battery to kick in and fill the negative and positive within the EVCC control loops, especially when there is cloudy weather. The battery is here to collect surplus and provide power when the car is not charging or at home. charging 1 battery with another battery is only extra wearing down of the battery system and on top the battery system is empty when i need it in the evening.
The same counts for low Solar charge % , when between 500-1600 Watts of PV i want my car to charge in solarsmart mode, this works but due to no lock on the battery the battery will start providing the remaining gap till 1600W, this is not wanted and should be pulled from Net power.
Due to current behavior when in the afternoon the car goes out for shopping the battery is empty or so low from balancing the car charge that i cannot do NOM on the house and need to pull additional energy from the net.
Some might say potaato potatoo but to me its a big difference and with a very small change and creating a optional slider we can facilitate both view points just like there is a existing switch for fast charge (Which is the same use case if there is one for fast charge the same arguments raise for solar charge.)
Describe the solution you'd like A clear and concise description of what you want to happen.
This is a simple feature request without much impact that can help a lot of people do more solar without extra wearing down the battery system. People who want the battery to fill the gaps can simply retain the default.
I would love to see a second option under the "Prevent home battery discharge in fast mode and during planned charging". This new option would also lock battery in smart mode when its charging the car.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Fork -> the code i use is on a fork that can do a pull request . https://github.com/MartijnvanGeffen13/evcc/tree/Optiontodisablebatteryonsmartload
Additional context Add any other context or screenshots about the feature request here.
My car is at home 80% of the time so its not a charge only in the everning scenario as most use the systems. I charge almost 70% via solar and this saves me a lot of money.
Discussion where is was advised to create the feature request https://github.com/evcc-io/evcc/discussions/33931#discussioncomment-18580754
Thanks for the detailed writeup. I looked into how the existing safeguard works.
The setting you're referencing ("Prevent home battery discharge in fast mode and during planned charging") is batteryDischargeControl, implemented in core/site_battery.go's dischargeControlActive. It currently holds the battery only when:
- the loadpoint's smart-cost limit is active (planned/cheap-price charging), or
- fast charging is active (
lp.IsFastChargingActive()).
Plain PV/solar (pv/minpv) charging is intentionally excluded today β in that mode the home battery is expected to help fill gaps between PV production and the charging power target, which is the behavior you'd like to make optional.
Adding a third option that also holds the battery during solar-mode EV charging is a well-contained change (extending dischargeControlActive/requiredBatteryMode in core/site_battery.go with a mode check, plus a UI toggle next to the existing one), similar to your fork's approach. However, it's a behavioral/design change to a widely used core control loop, not a bug fix, so it needs maintainer input on whether this should become a configurable option (and how it interacts with the existing "prevent discharge" toggle) before someone builds it. Since you already have a working fork, opening a draft PR from it for maintainers to review the concrete implementation would likely move this forward faster than further discussion here.
π€ Generated with Claude Code
The battery is here to collect surplus and provide power when the car is not charging or at home. charging 1 battery with another battery is only extra wearing down of the battery system and on top the battery system is empty when i need it in the evening.
Did you try using battery priority? Your screenshot shows it's set to 0% which explains your battery drain to empty. When you set it to a higher value evcc will prioritize your home battery.
The battery is here to collect surplus and provide power when the car is not charging or at home. charging 1 battery with another battery is only extra wearing down of the battery system and on top the battery system is empty when i need it in the evening.
Did you try using battery priority? Your screenshot shows it's set to 0% which explains your battery drain to empty. When you set it to a higher value evcc will prioritize your home battery.
But than it will load the battery first instead of the Car first,
Scenario very simple : Fill car first -> EVCC is master of control and absorbs all surplus even if its only 500W extend with netsurplus if below 1500Watt -> if Car is full switch to battery loading and when not loading battery takes care of NOM. During loading Battery should NOT take care of NOM as EVCC does that. Having 2 captains on ship causes unnecessary wear and tear on battery and a worse control loop when in the 500 - 1500 Watt PV surplus range.
When using below the remaining 60% should never come from Battery
Car has highest priority all power should allways flow to Car first and only when full to the battery , and battery should fully ignore (Both charging and discharging) and be disabled when EVCC is charging as EVCC is master of controle flow and my hardware supports 10s EVCC poll.
I do absolutely share this issue and the related PR. Other discussions go into this direction as well. For many users it is important to keep their home battery at a certain level (backup energy, needed for supplying home at night...). At low PV production it should be possible get remaining energy for charging from grid, only. This behavior is presently expected when setting "Batterie als Ladepuffer" to 100% in the battery section of the ui. Text there sais "Hausspeicherenergie wird nicht fΓΌr die Ladepunkte genutzt...." which is not what I observe at the moment (when solar surplus is not set to 100% in the load point section).
The same counts for low Solar charge % , when between 500-1600 Watts of PV i want my car to charge in solarsmart mode, this works but due to no lock on the battery the battery will start providing the remaining gap till 1600W, this is not wanted and should be pulled from Net power.
From my pov it doesn't matter if you deplete your battery now or later- you're preventing grid consumption in any case. If that's not what you want set the solar share to 100% which will prevent battery use.
Seems this is a wontfix.
@andig , thanks for your reply. I think there is a misunderstanding. With the present set of options you have two choices, as you point out in your statement.
- Save home battery and accept that your car might not charge at all. Especially during low season or with small PV (solar share 100%)
- Enable charging your car with less pv surplus and accept that your battery will deplete (smart mode & solar share < 100%)
What many users, me included, need is option ... 3. Enable car charging even if my pv does not supply minimum charger current AND avoid depleting my home battery (take energy from grid instead)
There are various good reasons for this:
- Keep home battery energy as backup power
- Save home battery live cycles
- Use battery during high grid prices
- Avoid transformation losses DC/AC/DC
- ....
Doesn't this make sense to you?
Especially during low season or with small PV (solar share 100%) -> Precisely and exactly for the reasons you mention thx for the backup , and @andig you say: from my pov it doesn't matter if you deplete your battery now or later. (Is the hole battery system not meant to hold power for later when prices are high)
why do we have a block at fast charge than, is that not the same, Or why do we have all the option to only use battery for % of fast charge , all these option are nullified with you pov or what am i missing,
Also i want to point out like in https://github.com/evcc-io/evcc/issues/33873 we clearly show a battery hold for later use and prefer grid use , which shows EVCC doing that already today and is the same we want to archive , prefer grid because of all the reasons mentioned.
Or maybe when setting:
Should we open a bug than that the battery is still used while this setting is 100% than and you use smart mode charging. happy to do that cos that`s a solution to or the root cause however you look at it.
Adding an additional hold battery setting in smart mode is something that's not trivial to explain to normal end-users. When would I flip that switch? With what intention? For "fast" it's easier to explain. Most EVs are able to use more power then users have available in pure surplus. Depleting home battery usually happens very fast here.
The behavior, that most people expect their home battery to "fill in the gaps" in pv surplus scenarios is expected. Optimizing for less battery activity (reduce cycles) is more abstract of a goal.
You're still able to implement this via external automation: a) adjust prioritysoc when smart mode starts, or b) explicitly set battery mode during this period
Adding an additional hold battery setting in smart mode is something that's not trivial to explain to normal end-users. When would I flip that switch? With what intention? For "fast" it's easier to explain. Most EVs are able to use more power then users have available in pure surplus. Depleting home battery usually happens very fast here.
I see your point, that this is easier to explain in fast mode. But on the other hand, most home batteries are much smaller than ev batteries. So they still deplete quite fast, even with lower ev charge rates. So somehow this is not that different from "fast" mode. To me a "save home battery" button is quite intuitive. But if you fear confusion: Having the option to set this behavior a little more hidden in the settings section (save battery in smart mode), is perfectly fine for me as well.
The behavior, that most people expect their home battery to "fill in the gaps" in pv surplus scenarios is expected. Optimizing for less battery activity (reduce cycles) is more abstract of a goal.
I am with you here, when we talk about normal household "gaps" (starting vacuum cleaner, washing machine....). This is, what most home batteries are intended to do and they are able to fill these short term peaks. But an EV is another level, regarding quantity and duration of the energy needed.
You're still able to implement this via external automation: a) adjust prioritysoc when smart mode starts, or b) explicitly set battery mode during this period
I am aware this is an option, but if possible I like to avoid several layers of automation.
You're still able to implement this via external automation: a) adjust prioritysoc when smart mode starts, or b) explicitly set battery mode during this period
That`s why i have the fork atm seen its such a small change i would rather see it in the official branch that weekly pull requests and building from scratch myself.
I have 5 Kwh battery with 4,5 Kwh usable power which means if the Smart mode with 500Watt PV is used it drains the battery within 3,5 hours if its full and than leaves me with no backup at all during power outage or expensive hours etc. And i want to consume the small PV output as its the cheapest free power,
I think @therockami is in the same spot as me as well as a lot of others, i have seen this question surface multiple times now if you back search the history,
@naltatis can you help me understand seen this is such a small change why it would not be adapted (Specially seen optimizer does do similar battery hold if its not smart to release at that moment), i can understand if it functionally would alter the behavior of evcc , but this is a small addition with almost no impact to the code flow or adding complexities for future builds.
Or is there a option to do something like this : say when 100% add a drop down with use battery VS lock battery
The main reason is complexity. Not necessarily lines of code but more the mental concept required for every user to understand what this toggle is actually doing. Also this setting has the potential of unexpected side effects. Say you also have a heat pump that runs in smart mode. It becoming active would lock the battery are would potentially make the whole house draw from grid if weather conditions change. And yes, we could implement exceptions for specific loadpoint types or kW thresholds to not trigger this, but than the small toggle as grown into a non trivial feature.
thank for letting us know i now understand better, i will maintain a fork for this if you dont mind so the few people that want this can use it
@therockami there is a ubuntu build in the release folder, if you need something else you might need to run the build for your OS https://github.com/MartijnvanGeffen13/evcc/tree/Optiontodisablebatteryonsmartload
Let me get back to your points:
Keep home battery energy as backup power
Backup power is usually managed by the inverter, specifically for the backup case afaiu.
Save home battery live cycles
Wouldn't apply here since you'd want to use that power anyway at a later time. Furthermore home batteries are known to die from calendric aging, not from number of cycles.
Use battery during high grid prices
Good point- possible workaround could be manually-controlled battery hold via pi.
Avoid transformation losses DC/AC/DC
I think this doesn't apply either since you're already incurring both kinds of losses, only not at the same time.
But in the end is as @naltatis wrote:
The main reason is complexity.