Optimizer: plan goal beyond horizon not visible
Description
I created an active recurring charging plan: charge the vehicle to 50% by 07:00 every day. The vehicle is connected and currently at 17%.
However, the optimizer's AI explanation states that the vehicle will not charge because no charging target is specified.
evcc correctly recognizes the next target:
- effectivePlanSoc: 50
- effectivePlanTime: 2026-11-08T07:00:00+01:00
In the optimizer run at approximately 13:13 on November 7, the vehicle is included in the request, but its entry has no s_goal. The optimization horizon ends at midnight, before the configured target.
I expect my charging plan to be considered and the target to be reached on time. I have not yet tested a complete scheduled charging cycle, so I do not know whether this is only misleading explanation text or whether the plan is not being properly considered.
Is omitting the target expected when it falls outside the current horizon? How is timely charging ensured in this case?
If this behavior is intentional, the explanation should say “no charging target within the current optimization horizon”, rather than implying that no target is configured.
The attached logs confirm that evcc detects the target but excludes it from the current optimization horizon:
"plan beyond forecast range or overrun: 39000.0 at 2026-11-08 07:00:00 +0100 CET slot 70"
The optimizer only calculates 43 slots until midnight. Nevertheless, the AI explanation says no charging target is specified, without mentioning the existing target outside the forecast range.
Not tested with the latest nightly version.
Steps to Reproduce
- Enable the optimizer.
- Create an active recurring vehicle charging plan: every day, 07:00, 50% SoC.
- Connect the vehicle with its SoC below the target.
- Wait for an optimizer run whose horizon ends before the next charging target.
- Generate a new AI explanation.
- The explanation states that no charging target is specified, although evcc recognizes the active vehicle plan.
Configuration (YAML)
network:
schema: https
host: "***"
Configuration (UI)
{
"charger": [
{"id":10,"name":"db:10","type":"template","config":{"template":"semp-sma","uri":"***"},"deviceProduct":"SMA EV Charger (SEMP)"}
],
"country": "",
"currency": "EUR",
"eebus": {"config":{"certificate":{"private":"***","public":"***"},"port":4712,"shipid":"***"},"status":{"qr":"***","ski":"***"}},
"experimental": true,
"gridExportLimit": 0,
"influx": {"database":"","insecure":false,"org":"","password":"","token":"","url":"","user":""},
"interval": 30,
"loadpoints": [
{"id":11,"name":"db:11","alwaysCharge":"off","batteryBoostLimit":100,"charger":"db:10","defaultMode":"smart","limitEnergy":0,"limitSoc":0,"maxCurrent":16,"minCurrent":6,"minSoc":0,"phasesConfigured":0,"planEnergy":0,"planPrecondition":0,"planStrategy":{"continuous":false,"precondition":0},"planTime":"0001-01-01T00:00:00Z","priority":0,"smartCostLimit":null,"smartFeedInPriorityLimit":null,"soc":{"estimate":true,"poll":{"interval":3600000000000,"mode":"charging"}},"solarShare":1,"thresholds":{"disable":{"delay":180000000000,"threshold":0},"enable":{"delay":60000000000,"threshold":0}},"title":"***","ui":{"maxTemp":0,"minTemp":0}}
],
"meter": [
{"id":13,"name":"db:13","type":"template","config":{"template":"fritzdect","ain":"***","password":"***","uri":"***","usage":"charge","user":"***"},"deviceIcon":"heatpump","deviceProduct":"AVM FRITZ!DECT 200","deviceTitle":"***"},
{"id":15,"name":"db:15","type":"template","config":{"template":"fritzdect","ain":"***","password":"***","uri":"***","usage":"charge","user":"***"},"deviceIcon":"cooler","deviceProduct":"AVM FRITZ!DECT 200","deviceTitle":"***"},
{"id":12,"name":"db:12","type":"template","config":{"template":"fritzdect","ain":"***","password":"***","uri":"***","usage":"charge","user":"***"},"deviceIcon":"dishwasher","deviceProduct":"AVM FRITZ!DECT 200","deviceTitle":"***"},
{"id":5,"name":"db:5","type":"template","config":{"id":3,"template":"sma-inverter-modbus","host":"***","modbus":"tcpip","port":502,"usage":"pv"},"deviceProduct":"SMA Wechselrichter (Modbus)","deviceTitle":"***"},
{"id":14,"name":"db:14","type":"template","config":{"template":"fritzdect","ain":"***","password":"***","uri":"***","usage":"charge","user":"***"},"deviceIcon":"laundry","deviceProduct":"AVM FRITZ!DECT 200","deviceTitle":"***"},
{"id":6,"name":"db:6","type":"template","config":{"id":3,"template":"sma-sbs-modbus","capacity":7.6,"host":"***","maxchargepower":"4200","modbus":"tcpip","port":502,"usage":"battery","watchdog":"60s"},"deviceProduct":"SMA Sunny Boy Storage 3.7/5.0/6.0 (Modbus)","deviceTitle":"***"},
{"id":1,"name":"db:1","type":"template","config":{"template":"sma-home-manager","host":"***","usage":"grid"},"deviceProduct":"SMA Sunny Home Manager 2.0"}
],
"mqtt": {"broker":"","caCert":"","clientCert":"","clientID":"","clientKey":"","insecure":false,"password":"","topic":"evcc","user":""},
"ocpp": {"config":{"port":8887},"status":{"stations":[]}},
"ocppforwarder": {"config":[],"status":[]},
"optimizer": true,
"optimizerChargingStrategy": "charge_before_export",
"remote": {"enabled":true},
"residualPower": 0,
"shm": {"deviceId":"***","deviceSerial":"","vendorId":"***"},
"site": {"aux":null,"battery":["db:6"],"consumer":["db:12","db:13","db:14","db:15"],"curtail":null,"ext":null,"grid":"db:1","pv":["db:5"],"title":"***"},
"tariff": [
{"id":19,"name":"db:19","type":"template","config":{"template":"fixed","price":0.09699999999999999},"deviceProduct":"Fester Preis"},
{"id":17,"name":"db:17","type":"template","config":{"template":"grünstromindex","token":"***","zip":"***"},"deviceProduct":"Grünstromindex"},
{"id":18,"name":"db:18","type":"template","config":{"template":"open-meteo","ac":"1000","alphatemp":"-0.004","az":40,"de":"0","dec":28,"dm":"0","efficiency":"100","interval":"1h","kwp":8.9,"lat":"***","lon":"***","rossmodel":"0.0342"},"deviceProduct":"Open-Meteo","deviceTitle":"***"},
{"id":16,"name":"db:16","type":"template","config":{"template":"tibber","token":"***"},"deviceProduct":"Tibber"}
],
"tariffRefs": {"co2":"db:17","feedIn":"db:19","grid":"db:16","planner":"","solar":["db:18"],"temperature":""},
"vehicle": [
{"id":20,"name":"db:20","type":"template","config":{"template":"tesla","accessToken":"***","cache":"15m","capacity":78,"clientId":"***","commandProxy":"https://api.myteslamate.com","icon":"car","priority":0,"refreshToken":"***","title":"***","vin":"***"},"deviceProduct":"Tesla"}
]
}
Logs
[site ] DEBUG 2026/11/07 13:27:09 grid powers: [4209 1965 -19]W
[site ] DEBUG 2026/11/07 13:27:09 grid currents: [18.9 9.03 -1]A
[site ] DEBUG 2026/11/07 13:27:09 pv 1 power: 763W
[site ] DEBUG 2026/11/07 13:27:09 battery 1 power: -3401W
[site ] DEBUG 2026/11/07 13:27:09 battery 1 soc: 37%
[site ] DEBUG 2026/11/07 13:27:10 consumer 4 power: 0W
[site ] DEBUG 2026/11/07 13:27:11 consumer 2 power: 0W
[site ] DEBUG 2026/11/07 13:27:11 consumer 3 power: 1W
[site ] DEBUG 2026/11/07 13:27:12 consumer 1 power: 846W
[site ] DEBUG 2026/11/07 13:27:15 battery has priority at soc 37% (< 60%)
[site ] DEBUG 2026/11/07 13:27:15 site power: 6254W
[lp-1 ] DEBUG 2026/11/07 13:27:15 charger status: B
[lp-1 ] DEBUG 2026/11/07 13:27:15 soc extrapolated: 17.00%
[lp-1 ] DEBUG 2026/11/07 13:27:15 vehicle soc (estimator): 17%
[lp-1 ] DEBUG 2026/11/07 13:27:15 !! plan: plan nil
[lp-1 ] DEBUG 2026/11/07 13:27:15 optimizer: stop, following measured pv surplus
[lp-1 ] DEBUG 2026/11/07 13:27:15 pv charge current: 0A = 0A + -26.8A (6154W @ 1p)
[site ] DEBUG 2026/11/07 13:27:39 ----
[lp-1 ] DEBUG 2026/11/07 13:27:39 charge power: 0W
[site ] DEBUG 2026/11/07 13:27:39 grid power: 4246W
[site ] DEBUG 2026/11/07 13:27:39 grid powers: [3391 886 -31]W
[site ] DEBUG 2026/11/07 13:27:39 grid currents: [15 4.73 -1]A
[site ] DEBUG 2026/11/07 13:27:39 battery 1 power: -3401W
[site ] DEBUG 2026/11/07 13:27:39 pv 1 power: 765W
[site ] DEBUG 2026/11/07 13:27:39 battery 1 soc: 38%
[site ] DEBUG 2026/11/07 13:27:40 consumer 3 power: 1W
[site ] DEBUG 2026/11/07 13:27:41 consumer 2 power: 0W
[site ] DEBUG 2026/11/07 13:27:41 consumer 1 power: 846W
[site ] DEBUG 2026/11/07 13:27:42 consumer 4 power: 0W
[site ] DEBUG 2026/11/07 13:27:45 battery has priority at soc 38% (< 60%)
[site ] DEBUG 2026/11/07 13:27:45 site power: 4346W
[lp-1 ] DEBUG 2026/11/07 13:27:45 charger status: B
[lp-1 ] DEBUG 2026/11/07 13:27:45 soc extrapolated: 17.00%
[lp-1 ] DEBUG 2026/11/07 13:27:45 vehicle soc (estimator): 17%
[lp-1 ] DEBUG 2026/11/07 13:27:45 !! plan: plan nil
[lp-1 ] DEBUG 2026/11/07 13:27:45 optimizer: stop, following measured pv surplus
[lp-1 ] DEBUG 2026/11/07 13:27:45 pv charge current: 0A = 0A + -18.5A (4246W @ 1p)
[site ] DEBUG 2026/11/07 13:28:09 ----
[lp-1 ] DEBUG 2026/11/07 13:28:09 charge power: 0W
[site ] DEBUG 2026/11/07 13:28:09 grid power: 4255W
[site ] DEBUG 2026/11/07 13:28:09 grid powers: [3392 883 -20]W
[site ] DEBUG 2026/11/07 13:28:09 grid currents: [15 4.71 -1.01]A
[site ] DEBUG 2026/11/07 13:28:09 pv 1 power: 777W
[site ] DEBUG 2026/11/07 13:28:09 battery 1 power: -3400W
[site ] DEBUG 2026/11/07 13:28:09 battery 1 soc: 38%
[site ] DEBUG 2026/11/07 13:28:10 consumer 4 power: 0W
[site ] DEBUG 2026/11/07 13:28:11 consumer 2 power: 0W
[site ] DEBUG 2026/11/07 13:28:11 consumer 1 power: 846W
[site ] DEBUG 2026/11/07 13:28:12 consumer 3 power: 1W
[site ] DEBUG 2026/11/07 13:28:15 battery has priority at soc 38% (< 60%)
[site ] DEBUG 2026/11/07 13:28:15 site power: 4355W
[lp-1 ] DEBUG 2026/11/07 13:28:15 charger status: B
[lp-1 ] DEBUG 2026/11/07 13:28:15 soc extrapolated: 17.00%
[lp-1 ] DEBUG 2026/11/07 13:28:15 vehicle soc (estimator): 17%
[lp-1 ] DEBUG 2026/11/07 13:28:15 !! plan: plan nil
[lp-1 ] DEBUG 2026/11/07 13:28:15 optimizer: stop, following measured pv surplus
[lp-1 ] DEBUG 2026/11/07 13:28:15 pv charge current: 0A = 0A + -18.5A (4255W @ 1p)
[site ] DEBUG 2026/11/07 13:28:39 ----
[lp-1 ] DEBUG 2026/11/07 13:28:39 charge power: 0W
[site ] DEBUG 2026/11/07 13:28:39 grid power: 5311W
[site ] DEBUG 2026/11/07 13:28:39 grid powers: [3389 1955 -32]W
[site ] DEBUG 2026/11/07 13:28:39 grid currents: [15.1 8.93 -0.991]A
[site ] DEBUG 2026/11/07 13:28:39 battery 1 power: -3403W
[site ] DEBUG 2026/11/07 13:28:39 pv 1 power: 785W
[site ] DEBUG 2026/11/07 13:28:39 battery 1 soc: 39%
[site ] DEBUG 2026/11/07 13:28:40 consumer 3 power: 1W
[site ] DEBUG 2026/11/07 13:28:41 consumer 1 power: 846W
[site ] DEBUG 2026/11/07 13:28:41 consumer 2 power: 0W
[site ] DEBUG 2026/11/07 13:28:42 consumer 4 power: 0W
[site ] DEBUG 2026/11/07 13:28:45 battery has priority at soc 39% (< 60%)
[site ] DEBUG 2026/11/07 13:28:45 site power: 5411W
[lp-1 ] DEBUG 2026/11/07 13:28:45 charger status: B
[lp-1 ] DEBUG 2026/11/07 13:28:45 soc extrapolated: 17.00%
[lp-1 ] DEBUG 2026/11/07 13:28:45 vehicle soc (estimator): 17%
[lp-1 ] DEBUG 2026/11/07 13:28:45 !! plan: plan nil
[lp-1 ] DEBUG 2026/11/07 13:28:45 optimizer: stop, following measured pv surplus
[lp-1 ] DEBUG 2026/11/07 13:28:45 pv charge current: 0A = 0A + -23.1A (5311W @ 1p)
[site ] DEBUG 2026/11/07 13:29:09 ----
[site ] DEBUG 2026/11/07 13:29:09 optimizer: optimizing 43 slots until 2026-11-08 00:00:00 +0100 CET: grid=43, feedIn=619, solar=431, first slot: 50s
[lp-1 ] DEBUG 2026/11/07 13:29:09 charge power: 0W
[site ] DEBUG 2026/11/07 13:29:09 grid power: 4209W
[site ] DEBUG 2026/11/07 13:29:09 grid powers: [3386 871 -48]W
[site ] DEBUG 2026/11/07 13:29:09 grid currents: [15 4.66 -1.01]A
[site ] DEBUG 2026/11/07 13:29:09 battery 1 power: -3401W
[site ] DEBUG 2026/11/07 13:29:09 pv 1 power: 800W
[site ] DEBUG 2026/11/07 13:29:09 battery 1 soc: 39%
[site ] DEBUG 2026/11/07 13:29:09 optimizer: home slots updated with measured 566Wh: [236 259 291 323] -> [566 489 428 384]
[site ] DEBUG 2026/11/07 13:29:09 plan beyond forecast range or overrun: 39000.0 at 2026-11-08 07:00:00 +0100 CET slot 70
[site ] DEBUG 2026/11/07 13:29:10 consumer 1 power: 846W
[site ] DEBUG 2026/11/07 13:29:11 consumer 3 power: 1W
[site ] DEBUG 2026/11/07 13:29:11 consumer 4 power: 0W
[site ] DEBUG 2026/11/07 13:29:12 consumer 2 power: 0W
[site ] DEBUG 2026/11/07 13:29:15 battery has priority at soc 39% (< 60%)
[site ] DEBUG 2026/11/07 13:29:15 site power: 4309W
[lp-1 ] DEBUG 2026/11/07 13:29:15 charger status: B
[lp-1 ] DEBUG 2026/11/07 13:29:15 soc extrapolated: 17.00%
[lp-1 ] DEBUG 2026/11/07 13:29:15 vehicle soc (estimator): 17%
[lp-1 ] DEBUG 2026/11/07 13:29:15 !! plan: plan nil
[lp-1 ] DEBUG 2026/11/07 13:29:15 optimizer: stop, following measured pv surplus
[lp-1 ] DEBUG 2026/11/07 13:29:15 pv charge current: 0A = 0A + -18.3A (4209W @ 1p)
Version
v0.318.2
System
linux/arm64, CET +01:00
Your reading matches the code. In core/site_optimizer.go (applyPlanGoal), a plan goal is only passed to the optimizer as s_goal when its slot lies inside the current horizon. Otherwise evcc only logs plan beyond forecast range or overrun and omits the goal. Here the horizon ends at 2026-11-08 00:00 (43 slots) and the 07:00 target is slot 70, so the vehicle goes into the request without a target. The horizon is limited by the available tariff and forecast data. Once more data arrives, for example next-day prices, the target should fall inside the horizon and be planned.
The explanation text comes from the external optimizer service, which only sees the request without s_goal. It cannot tell the difference between "no target" and "target beyond the horizon". So the wording is misleading, but the plan itself is not dropped. Your idea of a hint like "no charging target within the current optimization horizon" looks reasonable. It would need a change in the explain payload or the service.
I haven't verified that the vehicle reaches 50% by 07:00 in your setup. Please check the next optimizer runs once the horizon covers 07:00, and report back if the vehicle still isn't scheduled then. A fresh debug log from around that time would help. Also, please try the latest nightly build.
🤖 Generated with Claude Code
Closing since the requested feedback was not provided. You can still comment with requested feedback and we'll reopen.
The plan is not lost. The optimizer only plans as far as price data is available. Before the next day's prices arrive (around 13:00 for Tibber), the horizon ends at midnight and a 07:00 target is left out of the request. Once the prices are in, the target is back and gets planned. The 07:00 target is always inside the horizon well before it is due, and evcc additionally starts charging if the goal can only be reached by charging immediately. So the target is met on time. During that midday gap the vehicle still charges from surplus, only without the target.
The explanation is misleading in that case: it only sees the request, which contains no target, so it reports "no charging target". We'll pass targets beyond the horizon along to the explanation so it can say that the target lies beyond the available price data.
Closing, as charging to the target works as intended.
🤖 Generated with Claude Code
Seems the solution here is to use a merged tariff which provides longer-horizon forecast.
I've linked this issue- plan goal beyond optimizer horizon- to https://github.com/evcc-io/evcc/issues/35543.
If the plan goal is beyond the optimizer horizon, only the part of the plan that would require to be filled inside the horizon, is added to the optimizer goal. That leads to the remaining part being fast-charged.
Another possible heuristic would be to distribute the goal by time across optimizer end of horizon and plan time. Benefit of this approach would be that force-charging beyond optimizer horizon can be avoided. Nothing can be said regarding price. Additional benefit is- since plan goals more often fall inside the optimizer horizon- that the plan display would reflect the active optimizer.
@naltatis wdyt?
Hi @andig , sorry für die späte Rückmeldung! Bei mir fehlten die Tibber-Daten für den nächsten Tag, deswegen keine Planung, meine Vermutung. Ein Neustart hat geholfen, und seit zwei Tagen läuft alles wieder. Also hatte er Problem einen Plan zu gestalten, wenn diverse Infos fehlen, wäre vielleicht Sinnvoll es in die KI-Erklärung mit einzubauen.
Hi @andig , it is very irritating, that the "charger plan" indicates charging at near time intervals, while the optimizer tells, that the car is not to get charged, as the charger target time is out of horizon. It is not clear, what will happen, in this scenario - is the car charged at the indicated time slots (see the charger plan screenshots in #36374 ), or won't there be any charging (as the optimizer tells)?
Please add a response in the charge plan dialog to warn, if the end time is currently out of optimizer horizon.
As the screenshot of the charger plan shows, there is some logic, which detected, that there are some optimal cheap time intervals the following night. It would be very nice, if this logic could be regarded in the optimizer. Because it was really right - the predicted grid costs are much higher the following days, so it was a really good idea, to charge soon.