Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loadpoint: add battery boost (experimental) #16599

Merged
merged 25 commits into from
Oct 13, 2024
Merged

Loadpoint: add battery boost (experimental) #16599

merged 25 commits into from
Oct 13, 2024

Conversation

andig
Copy link
Member

@andig andig commented Oct 10, 2024

Refs #12190. Depends on #16274.

If battery boost is enabled, PV modes will try to push the battery into discharging as much as possible. This happens by increasing demand by counting battery charge power as neutral and adding additional vehicle demand on top. Enabling boost will also start charging. Setting is per loadpoint and only available in PV mode.

For time being, API-only:

POST /api/loadpoints/<id>/batteryboost/[0|1]

to enable. Will be disabled when mode is changed.

TODO

  • decide if batteryBuffered should be honored
  • check PV enable timer to start charging

Out of scope

@andig andig added the enhancement New feature or request label Oct 10, 2024
@naltatis
Copy link
Member

Boost flag should be reset on disconnect.

@andig andig added the needs documentation Triggers issue creation in evcc-io/docs label Oct 11, 2024
@VolkerK62
Copy link
Contributor

decide if batteryBuffered should be honored

Yes. I would prefer, if bufferSoc would be respected

decide if (and how) residualPower should be honored

No. I guess, 100W grid consumption is a good choice for that feature.

@andig andig added the experimental Experimental feature label Oct 12, 2024
@andig andig changed the title Loadpoint: add battery boost Loadpoint: add battery boost (experimental) Oct 12, 2024
@naltatis
Copy link
Member

decide if batteryBuffered should be honored

Yes. I would prefer, if bufferSoc would be respected

I wouldn't tie it to bufferSoc. In my use cases I want to activate boost when I want to move energy from battery to the car quickly before I leave during the day. Knowing that the battery will charge back up from solar later. Maybe even discharge to 0% if i know it's a sunny day. This is not the way I use bufferSoc. For me, bufferSoC acts as the home battery soc goal I want to reach at the end of each day.

I'd think we should introduce a dedicated (optional, default 0%) boost-limit which can be configured per loadpoint or set selected when activating boost.

@andig
Copy link
Member Author

andig commented Oct 12, 2024

Leave as-is for testing. Final decision when adding UI.

@naltatis
Copy link
Member

Did a first test with my setup (tesla, go-e, sungrow battery).

  • activating boost leads to use of extra battery power, deactivating returns back to normal operations. so the basics work
  • but the battery power does not increase to the limit thats possible. my sungrow should be able to delivery nearly 10kW and the battery was above 80% (bufferSoc). it stayed in the area of 1-2kW discharge.
  • i tested 1p and 3p. in 1p i reached the current limit but did not get a "phase increase" timer as i would have expected.

Here is log and a screenshot

evcc-20241012-144921-debug.log

Bildschirmfoto 2024-10-12 um 14 46 58

@VolkerK62
Copy link
Contributor

VolkerK62 commented Oct 12, 2024

boost is always 1p-minPower (1380W) independent of active phases?
shouldn´t it be 1380W per phase?

@andig andig requested a review from naltatis October 13, 2024 11:24
@premultiply
Copy link
Member

Ich bin gerade auch dabei beim testen über die für mich unerwartete Abhängigkeit von bufferSoc gestolpert.
Wenn ich die Batterie dazu nehme, dann will ich alles rausholen was geht. Da sind mir die gesetzten Limits egal, denn ich weiss ja bzw. nehme bewusst in kauf dass die Batterie leer wird weil sie z. B. später in Abwesenheit ohnehin wieder ausreichend voll wird.

Copy link
Member

@premultiply premultiply left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Davon abgesehen funktioniert es ansonsten bei mir im Kurztest erwartungsgemäß.

@andig
Copy link
Member Author

andig commented Oct 13, 2024

Dem PR ist das mittlerweile egal- da müsst ihr Euch einigen. Danke für den Test!!!

@VolkerK62
Copy link
Contributor

VolkerK62 commented Oct 13, 2024

bzgl. bufferSoc:
Idee war, dass man eine Grenze setzen kann (falls man nicht komplett entladen will) und dann "fire and forget".
Dazu bietet sich aktuell bufferSoc an.
Erweitert etwas den Gestaltungsspielraum.

Es kann natürlich auch ein separates boost limit sein.

I'd think we should introduce a dedicated (optional, default 0%) boost-limit which can be configured per loadpoint or set selected when activating boost.

@andig andig merged commit 16c467a into master Oct 13, 2024
6 checks passed
@andig andig deleted the feat/battery-boost branch October 13, 2024 16:46
@naltatis naltatis mentioned this pull request Oct 13, 2024
5 tasks
@naltatis
Copy link
Member

Gerade mit dem Nightly getestet. Sieht gut aus. Hat schnell die Max-Entladeleistung erreicht und Phasen korrekt gewechselt.

@heatpumper
Copy link

Hallo zusammen,
das Feature gefällt mir sehr gut, vor allem der Button direkt in der UI.
ich hab gerade nochmal mit dem aktuellen Nightly getested. Der LAdevorgang hat sofort begonnen und ist auf 3,5kw hoch gegangen (15.7 A auf einer Phase).
Zwei Dinge sind mir aufgefallen:

  • Er geht nicht über in den Dreihphasigen Modus
  • Er zieht keinen Strom aus dem Netz

Danach habe ich den Boost deaktiviert und wieder aktiviert.

  • dann sprang er direkt auf 3 Phasig
  • leider war das Auto voll geladen bevor er die Chance hatte, die volle Batterie Leistung aufzunutzen

(Fronius Gen24 Plus, BYD HVS, go-echarger)
evcc-20241018-090855-debug-all.log
evcc-20241018-090827-debug-lp1.log

@andig
Copy link
Member Author

andig commented Oct 18, 2024

Könntest Du mal bitte nur die relevanten Teile exportieren- site und den lp?

@heatpumper
Copy link

Ich komme leider am die Daten nicht mehr ran. Fürs nächste Mal weiß ich das nur die beiden relevant sind.
Nur Der LP (ohne Site) hängt am letzten Post

@andig
Copy link
Member Author

andig commented Oct 18, 2024

Mhhm, das ist tricky:

[lp-1  ] DEBUG 2024/10/18 08:45:53 pv charge battery boost: -11040W = -0W battery - 11040W boost
[lp-1  ] DEBUG 2024/10/18 08:45:53 pv charge current: 50.9A = 0A + 50.9A (-11707W @ 1p)
[lp-1  ] DEBUG 2024/10/18 08:45:53 site power -11707W <= -1299W enable threshold
[lp-1  ] DEBUG 2024/10/18 08:45:53 pv enable in 0s
[lp-1  ] DEBUG 2024/10/18 08:45:53 pv enable timer elapsed
[lp-1  ] DEBUG 2024/10/18 08:45:53 max charge current: 6A
[lp-1  ] DEBUG 2024/10/18 08:45:53 charger enable

Ich denke er schaltet nicht auf 3p weil wir es mit den 230W nicht schaffen, ihn über die 3p Schwelle von 4,2kW zu kicken. Beim zweiten mal klappt das weil er schon lädt und ihm das "enable" nicht den Timer klaut:

[lp-1  ] DEBUG 2024/10/18 08:54:18 pv charge battery boost: -11317W = -277W battery - 11040W boost
[lp-1  ] DEBUG 2024/10/18 08:54:18 available power 12378W > 4140W min 3p threshold
[lp-1  ] DEBUG 2024/10/18 08:54:18 phase scale3p in 0s
[lp-1  ] DEBUG 2024/10/18 08:54:18 switched phases: 3p
[lp-1  ] DEBUG 2024/10/18 08:54:18 phase timer inactive
[lp-1  ] DEBUG 2024/10/18 08:54:18 pv charge current: 18A = 2A + 16A (-11041W @ 3p)

Wir müssen nochmal überlegen, warum ein enable eigentlich nicht die Phasen gleich "richtig" setzt- das wäre ja hier die Lösung.

Ich sehe aus dem Log leider nicht, warum der Einschaltfall diesen Weg nimmt. Eigentlich (tm) sollte er hier auch gleich die Phasen mit setzen.

@heatpumper
Copy link

Wenn es möglich ist die Phasen automatisch richtig zu setzen wäre das super, falls nicht:
Ich vermute die meisten die diese Option nutzen würden haben eher Größere Wechselrichter/Batterien und werden es wohl immer schaffen mindestens dreiphasig zu laden ( sonst lohnt es das kaum). Und vielleicht kann man eine config Option machen die vom Standard 3 Phasen auf 1 Phase für kleine Wechselrichter/ Batterien wechselt.

@andig
Copy link
Member Author

andig commented Oct 18, 2024

Das sollte funktionieren. Würdest Du nochmal einen Test machen wenn ich ein bisschen Logging ergänze?

@heatpumper
Copy link

Klar

andig added a commit that referenced this pull request Oct 18, 2024
@andig
Copy link
Member Author

andig commented Oct 18, 2024

Nightly in 20min- danke! Dann bitte nochmal ab "lädt nicht", nur für den lp reicht.

@heatpumper
Copy link

heatpumper commented Oct 18, 2024

lp1.txt

Das Verhalten war reproduzierbar.
Erst hat er nur 1phasig geladen.
um 18:52 Uhr habe ich den Batterie Boost aus und wieder an gemacht.
dann hat er 3 phasig geladen. EVCC hat deutlich schneller die ideale Ladeleistung gefunden im 3Phasigen Modus als heute morgen.

Ich hab mal einen Vorschlag für die Doku gemacht: Update battery.mdx #643 . Wenn das so passt erstelle ich es auch noch auf Englisch - wenn ich hier mehr Chaos verursache als es hilft lasst es mich wissen.
Ich habe auch ein Screenshot recipie erstellt, aber das war das erste Mal arbeiten mit Playwright und ich konnte es nicht testen, also ist es wahrscheinlich Buggy.

Noch eine Frage:

  • Ab wieviel %SOC hört der Modus auf? Ich hab es in den Go. Dateien nirgendwo gefunden - wo steht das?

@heatpumper
Copy link

Und wenn ich noch einen Vorschlag machen darf: Aus meiner Sicht wäre es Ideal wenn der minimale SOC bis zu dem die Hausbatterie sich entlädt direkt daneben eingestellt werden könnte, beispielsweise so:
Batterieboost

@heatpumper
Copy link

Nachtrag: wenn das Fahrzeug schon lädt, funktioniert es optimal wie gewollt: er geht sofort auf drei Phasen und findet schnell sein Optimum

[lp-1 ] DEBUG 2024/10/19 10:01:27 pv disable timer remaining: 2m30s
[lp-1 ] DEBUG 2024/10/19 10:01:42 charge power: 1326W
[lp-1 ] DEBUG 2024/10/19 10:01:42 charge currents: [5.89 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:01:57 charge power: 1327W
[lp-1 ] DEBUG 2024/10/19 10:01:57 charge currents: [5.89 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:02:12 charge power: 1328W
[lp-1 ] DEBUG 2024/10/19 10:02:12 charge currents: [5.89 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:02:12 detected active phases: 1p
[lp-1 ] DEBUG 2024/10/19 10:02:12 charge total import: 1607.045kWh
[lp-1 ] DEBUG 2024/10/19 10:02:12 charger status: C
[lp-1 ] DEBUG 2024/10/19 10:02:12 soc estimated: 79.31% (vehicle: 79.00%)
[lp-1 ] DEBUG 2024/10/19 10:02:12 vehicle soc: 79%
[lp-1 ] DEBUG 2024/10/19 10:02:12 vehicle soc limit: 100%
[lp-1 ] DEBUG 2024/10/19 10:02:12 vehicle range: 311km
[lp-1 ] DEBUG 2024/10/19 10:02:12 !! pvScalePhases DOWN activePhases: 1, available power: 1088W, scalable: bool
[lp-1 ] DEBUG 2024/10/19 10:02:12 !! pvScalePhases UP maxPhases: 3, available power: 1088W, scalable: bool
[lp-1 ] DEBUG 2024/10/19 10:02:12 !! pvScalePhases EXIT
[lp-1 ] DEBUG 2024/10/19 10:02:12 pv charge current: 4.95A = 6A + -1.05A (240W @ 1p)
[lp-1 ] DEBUG 2024/10/19 10:02:12 projected site power 240W >= 200W disable threshold
[lp-1 ] DEBUG 2024/10/19 10:02:12 pv disable in 1m45s
[lp-1 ] DEBUG 2024/10/19 10:02:12 pv disable timer remaining: 1m45s
[lp-1 ] DEBUG 2024/10/19 10:02:27 charge power: 1328W
[lp-1 ] DEBUG 2024/10/19 10:02:27 charge currents: [5.89 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:02:42 charge power: 1328W
[lp-1 ] DEBUG 2024/10/19 10:02:42 charge currents: [5.89 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:02:57 charge power: 1327W
[lp-1 ] DEBUG 2024/10/19 10:02:57 charge currents: [5.89 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:02:57 detected active phases: 1p
[lp-1 ] DEBUG 2024/10/19 10:02:57 charge total import: 1607.062kWh
[lp-1 ] DEBUG 2024/10/19 10:02:57 charger status: C
[lp-1 ] DEBUG 2024/10/19 10:02:57 soc estimated: 79.33% (vehicle: 79.00%)
[lp-1 ] DEBUG 2024/10/19 10:02:57 vehicle soc: 79%
[lp-1 ] DEBUG 2024/10/19 10:02:57 vehicle soc limit: 100%
[lp-1 ] DEBUG 2024/10/19 10:02:57 vehicle range: 311km
[lp-1 ] DEBUG 2024/10/19 10:02:57 !! pvScalePhases DOWN activePhases: 1, available power: 1216W, scalable: bool
[lp-1 ] DEBUG 2024/10/19 10:02:57 !! pvScalePhases UP maxPhases: 3, available power: 1216W, scalable: bool
[lp-1 ] DEBUG 2024/10/19 10:02:57 !! pvScalePhases EXIT
[lp-1 ] DEBUG 2024/10/19 10:02:57 pv charge current: 5.52A = 6A + -0.482A (111W @ 1p)
[lp-1 ] DEBUG 2024/10/19 10:02:57 pv disable timer reset
[lp-1 ] DEBUG 2024/10/19 10:02:57 pv timer inactive
[lp-1 ] DEBUG 2024/10/19 10:03:12 charge power: 1328W
[lp-1 ] DEBUG 2024/10/19 10:03:12 charge currents: [5.89 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:03:13 set battery boost: true
[lp-1 ] DEBUG 2024/10/19 10:03:13 charge power: 1328W
[lp-1 ] DEBUG 2024/10/19 10:03:13 charge currents: [5.89 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:03:14 detected active phases: 1p
[lp-1 ] DEBUG 2024/10/19 10:03:14 charge total import: 1607.068kWh
[lp-1 ] DEBUG 2024/10/19 10:03:14 charger status: C
[lp-1 ] DEBUG 2024/10/19 10:03:14 soc estimated: 79.34% (vehicle: 79.00%)
[lp-1 ] DEBUG 2024/10/19 10:03:14 vehicle soc: 79%
[lp-1 ] DEBUG 2024/10/19 10:03:14 vehicle soc limit: 100%
[lp-1 ] DEBUG 2024/10/19 10:03:14 vehicle range: 311km
[lp-1 ] DEBUG 2024/10/19 10:03:14 pv charge battery boost: -11100W = -60W battery - 11040W boost
[lp-1 ] DEBUG 2024/10/19 10:03:14 !! pvScalePhases DOWN activePhases: 1, available power: 12370W, scalable: bool
[lp-1 ] DEBUG 2024/10/19 10:03:14 !! pvScalePhases UP maxPhases: 3, available power: 12370W, scalable: bool
[lp-1 ] DEBUG 2024/10/19 10:03:14 available power 12370W > 4140W min 3p threshold
[lp-1 ] DEBUG 2024/10/19 10:03:14 phase scale3p in 0s
[lp-1 ] DEBUG 2024/10/19 10:03:14 switched phases: 3p
[lp-1 ] DEBUG 2024/10/19 10:03:14 phase timer inactive
[lp-1 ] DEBUG 2024/10/19 10:03:14 pv charge current: 18A = 2A + 16A (-11043W @ 3p)
[lp-1 ] DEBUG 2024/10/19 10:03:14 pv timer reset
[lp-1 ] DEBUG 2024/10/19 10:03:14 pv timer inactive
[lp-1 ] DEBUG 2024/10/19 10:03:14 max charge current: 16A
[lp-1 ] DEBUG 2024/10/19 10:03:27 charge power: 0W
[lp-1 ] DEBUG 2024/10/19 10:03:27 charge currents: [0 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:03:42 charge power: 10558W
[lp-1 ] DEBUG 2024/10/19 10:03:42 charge currents: [15.4 15.4 15.4]A
[lp-1 ] DEBUG 2024/10/19 10:03:42 charge total import: 1607.093kWh
[lp-1 ] DEBUG 2024/10/19 10:03:42 charger status: C
[lp-1 ] DEBUG 2024/10/19 10:03:42 soc estimated: 79.38% (vehicle: 79.00%)
[lp-1 ] DEBUG 2024/10/19 10:03:42 vehicle soc: 79%
[lp-1 ] DEBUG 2024/10/19 10:03:42 vehicle soc limit: 100%
[lp-1 ] DEBUG 2024/10/19 10:03:42 vehicle range: 311km
[lp-1 ] DEBUG 2024/10/19 10:03:42 pv charge battery boost: -7564W = -6874W battery - 690W boost
[lp-1 ] DEBUG 2024/10/19 10:03:42 pv charge current: 12.1A = 16A + -3.95A (2724W @ 3p)
[lp-1 ] DEBUG 2024/10/19 10:03:42 max charge current: 12A
[lp-1 ] DEBUG 2024/10/19 10:03:57 charge power: 7908W
[lp-1 ] DEBUG 2024/10/19 10:03:57 charge currents: [11.6 11.5 11.6]A
[lp-1 ] DEBUG 2024/10/19 10:04:12 charge power: 7904W
[lp-1 ] DEBUG 2024/10/19 10:04:12 charge currents: [11.6 11.5 11.6]A
[lp-1 ] DEBUG 2024/10/19 10:04:27 charge power: 7921W
[lp-1 ] DEBUG 2024/10/19 10:04:27 charge currents: [11.6 11.5 11.6]A
[lp-1 ] DEBUG 2024/10/19 10:04:27 detected active phases: 3p
[lp-1 ] DEBUG 2024/10/19 10:04:27 charge total import: 1607.192kWh
[lp-1 ] DEBUG 2024/10/19 10:04:27 charger status: C
[lp-1 ] DEBUG 2024/10/19 10:04:27 soc estimated: 79.54% (vehicle: 79.00%)
[lp-1 ] DEBUG 2024/10/19 10:04:27 vehicle soc: 80%
[lp-1 ] DEBUG 2024/10/19 10:04:27 vehicle soc limit: 100%
[lp-1 ] DEBUG 2024/10/19 10:04:27 vehicle range: 311km
[lp-1 ] DEBUG 2024/10/19 10:04:27 pv charge battery boost: -7495W = -6805W battery - 690W boost
[lp-1 ] DEBUG 2024/10/19 10:04:27 !! pvScalePhases DOWN activePhases: 3, available power: 8437W, scalable: bool
[lp-1 ] DEBUG 2024/10/19 10:04:27 !! pvScalePhases UP maxPhases: 3, available power: 8437W, scalable: bool
[lp-1 ] DEBUG 2024/10/19 10:04:27 !! pvScalePhases EXIT
[lp-1 ] DEBUG 2024/10/19 10:04:27 pv charge current: 12.7A = 12A + 0.747A (-515W @ 3p)
[lp-1 ] DEBUG 2024/10/19 10:04:42 charge power: 0W
[lp-1 ] DEBUG 2024/10/19 10:04:42 charge currents: [0 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:04:57 charge power: 0W
[lp-1 ] DEBUG 2024/10/19 10:04:57 charge currents: [0 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:05:12 charge power: 0W
[lp-1 ] DEBUG 2024/10/19 10:05:12 charge currents: [0 0 0]A
[lp-1 ] DEBUG 2024/10/19 10:05:12 charge total import: 1607.201kWh
[lp-1 ] DEBUG 2024/10/19 10:05:12 charger status: B
[lp-1 ] DEBUG 2024/10/19 10:05:12 charge final energy: 2.370kWh
[lp-1 ] INFO 2024/10/19 10:05:12 stop charging <-
[lp-1 ] DEBUG 2024/10/19 10:05:12 wake-up timer: start
[lp-1 ] DEBUG 2024/10/19 10:05:12 charge total import: 1607.201kWh
[lp-1 ] DEBUG 2024/10/19 10:05:12 vehicle status: B
[lp-1 ] DEBUG 2024/10/19 10:05:12 vehicle soc: 80%
[lp-1 ] DEBUG 2024/10/19 10:05:12 vehicle soc limit: 100%
[lp-1 ] DEBUG 2024/10/19 10:05:12 vehicle range: 313km
[lp-1 ] DEBUG 2024/10/19 10:05:12 limitSoc reached: 80.0% > 80%
[lp-1 ] DEBUG 2024/10/19 10:05:12 charger disable
[lp-1 ] DEBUG 2024/10/19 10:05:12 wake-up timer: stop
[lp-1 ] DEBUG 2024/10/19 10:05:27 charge power: 0W
[lp-1 ] DEBUG 2024/10/19 10:05:27 charge currents: [0 0 0]A ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experimental Experimental feature needs documentation Triggers issue creation in evcc-io/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants