evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Optimizer: Hinweis bei aktivem Ladeziel außerhalb des Planungshorizonts

Open MichaelHoff20 opened this issue 2 weeks ago • 5 comments

Problem

In evcc 0.319.0 mit Optimizer-Automatik für Hausbatterie und Auto ist ein Fahrzeug-Ladeplan auf 55 % bis Montag, 16. November 2026, 08:00 Uhr (Europe/Berlin) gespeichert. Der Ladebildschirm zeigt diesen Plan an.

Die Optimizer-Ansicht reicht am Sonntagvormittag aber nur bis Montag, 00:00 Uhr. Ihre Erklärung sagt sinngemäß, dass kein Ladeziel vorgegeben sei; die SoC-Projektion des Autos bleibt ungefähr bei 14 %. Das vermittelt den Eindruck, der gespeicherte Ladeplan werde ignoriert.

Geprüfter Zusammenhang

Ein rein lesender Zustandsabruf am 15. November um 10:22 Uhr bestätigt:

  • Fahrzeugplan und effektiver Ladeplan: 55 %, Zeitpunkt 2026-11-16T07:00:00Z (= 08:00 Uhr lokal).
  • Optimizer-Automatik: full, Ladepunkt im Modus smart, Fahrzeug verbunden.
  • Tibber-Netzpreise und der aktuelle Planungstarif reichen nur bis 2026-11-16T00:00:00+01:00.
  • Der Optimizer-Lauf von 10:20 Uhr umfasst 55 Zeitschritte bis Mitternacht.
  • Das Auto ist in der Anfrage enthalten; dessen Batterieeintrag hat aber kein s_goal.
  • Die Antwort meldet Optimal.

In core/site_optimizer_request.go, Funktion applyPlanGoal, werden Ziele außerhalb des Vorhersagebereichs nicht als s_goal übergeben. Damit ist dies nach den vorliegenden Daten kein nachgewiesener Fehler des mathematischen Optimizer-Modells. Ein tatsächlich verfehltes Ladeziel ist ebenfalls noch nicht beobachtet; der Abfahrtstermin liegt in der Zukunft.

Gewünschtes Verhalten

Die Oberfläche und die Planerklärung sollten unterscheiden zwischen:

  1. Es ist kein Ladeziel gespeichert.
  2. Ein Ladeziel ist gespeichert, liegt aber außerhalb des aktuellen Optimizer-Horizonts.

Im zweiten Fall wäre ein Hinweis hilfreich, zum Beispiel:

Ladeziel: 55 % bis Montag, 08:00 Uhr. Der aktuelle Optimizer-Plan reicht bis Montag, 00:00 Uhr. Das Ziel liegt außerhalb dieses Plans und ist darin noch nicht berücksichtigt.

Alternativen

Zusätzlich könnte auf die Möglichkeit einer längeren Preisprognose hingewiesen werden. Es geht nicht darum, Preise für unbekannte Stunden als sicher anzunehmen oder das Ziel ungefragt auf Mitternacht vorzuverlegen.

Setup

  • evcc 0.319.0 auf macOS / Mac mini M2
  • Tibber als dynamischer Netzbezugstarif
  • BMW iX1, konfigurierte Kapazität 60 kWh
  • go-e Charger
  • sonnenBatterie, konfigurierte nutzbare Kapazität 20 kWh
  • Optimizer-Automatik: full

Verwandte Beiträge

  • https://github.com/evcc-io/evcc/discussions/35278 beschreibt Ziele jenseits des Planungshorizonts.
  • https://github.com/evcc-io/evcc/issues/35331 behandelt das Zusammenführen von Preisquellen und wurde über PR 35407 geschlossen.
  • Hier geht es konkret um die sichtbare Unterscheidung zwischen fehlendem und außerhalb des Horizonts liegendem Ladeziel.

Screenshots

Die Screenshots zeigen die Optimizer-Erklärung und den gespeicherten Ladeplan. Die oben genannten Request-Felder wurden zusätzlich lokal geprüft.

Optimizer-Ansicht und Erklärung

Ladebildschirm mit gespeichertem Ladeziel

MichaelHoff20 avatar Nov 15 '26 09:11 MichaelHoff20

Your reading matches the code. In core/site_optimizer_request.go (applyPlanGoal), a plan goal is only passed as s_goal when its slot lies inside the current horizon. Otherwise only a debug line plan beyond forecast range or overrun is logged and the vehicle goes into the request without a target. The explanation text is produced by the optimizer service from that request, so it cannot tell "no target" from "target beyond horizon". Distinguishing the two would need a hint from evcc (e.g. in the explain payload or UI) when a stored plan lies past the horizon. That is a feature request rather than a defect in the plan itself.

Related: #35920 (same symptom, open), discussion #35278.

🤖 Generated with Claude Code

github-actions[bot] avatar Nov 15 '26 09:11 github-actions[bot]

Duplicate of #35920. The target is not ignored: before the next day's prices arrive, the horizon ends at midnight and a later target is left out of the request. Once prices cover it, it is planned, and evcc starts charging early if the goal could otherwise not be reached. The misleading "no charging target" in the explanation is tracked there: targets beyond the horizon will be passed to the explanation so it can say they lie beyond the available prices.

🤖 Generated with Claude Code

andig avatar Nov 15 '26 11:11 andig

Hi Andig, You write "Once prices cover it, it is planned, and evcc starts charging early if the goal could otherwise not be reached."

In my case, the optimizer does not use the complete grid tariff forecast - it only uses the next 48h. Please consider an option to use all available forecast data for the optimizer horizon.

In my case, the predicted tariff is optional for charging in the coming night, and the 48h before end of charging plan are not as cheap as the next night.

Which logic is responsible for selection of green charging time intervals in the charging plan? Because there, the cheap times are selected for charging. So only the optimizer does not plan charging. Screenshot_20261117_191917_evcc.jpg

kariburger avatar Nov 17 '26 21:11 kariburger

Which logic is responsible for selection of green charging time intervals in the charging plan? Because there, the cheap times are selected for charging. So only the optimizer does not plan charging.

Unclear what you're asking. Please open new issue.

andig avatar Nov 18 '26 08:11 andig

Hi Andi, please have a look at my ticket #36374. I added there screenshots to document, that the charge plan (which is controlled by the optimizer) highlighted several cheap time intervalls as charging time, even if the optimizer told me in the optimizer view, that there would be no charging target (i.e. charging target later then planning horizon). So I wonder, which logic selected those cheap hours for charging. Pleas provide option to increase planning horizon of optimizer to the time, where prediction data is available.

kariburger avatar Nov 18 '26 08:11 kariburger