[BUG]: After upgrade to EOS connect version 0.3.35 - EOS_Server OPTIMIZE Request failed: 422 Client Error: Unprocessable Content for url: ...:8503/optimize?start_hour=16
Getting http error 422 calling eos-server via http://192.168.178.193:8503/optimize?start_hour=16 in the EOS connect log since EOS connect version 0.3.35 (assuming eos-server was installed as latest release: 0.3.0 before).
configuration
- eos-server latest release: 0.3.0
- eos-server installed as container unter Proxmos
- EOS Connect: 0.3.35
- HA installed as VE on Proxmos
2026-06-26 16:17:25 ERROR [OPT-EOS] OPTIMIZE Request failed: 422 Client Error: Unprocessable Content for url: http://192.168.178.193:8503/optimize?start_hour=16
Calling: http://192.168.178.193:8503/v1/config
I get the response - does the API of eos_server (akkudocktor) change and the endpoint "http://192.168.178.193:8503/optimize?start_hour=16" is wrong? So the eos-server in general works.
This is the output for configuring eos-server:
...
2026-06-26 16:17:05 INFO [LOAD-IF] Skipping invalid sensor data for 'sensor.total_home_power' at 2026-06-12 19:18:42: state '600.4' cannot be processed (could not convert string to float: ''). This may indicate missing or corrupted data in the database. (check: http://192.168.178.114:8123/history?entity_id=sensor.total_home_power&start_date=2026-06-12T17%3A18%3A42.767103%2B00%3A00&end_date=2026-06-12T21%3A18%3A42.767103%2B00%3A00) 2026-06-26 16:17:05 INFO [LOAD-IF] Skipping invalid sensor data for 'sensor.total_home_power' at 2026-06-12 19:32:05: state '539.2' cannot be processed (could not convert string to float: ''). This may indicate missing or corrupted data in the database. (check: http://192.168.178.114:8123/history?entity_id=sensor.total_home_power&start_date=2026-06-12T17%3A32%3A05.976611%2B00%3A00&end_date=2026-06-12T21%3A32%3A05.976611%2B00%3A00) 2026-06-26 16:17:25 INFO [CHARGE_DEMAND] Optimizer request preparation: max_charge_power=1350 W (source=dynamic, dynamic_max=1350, config_fixed=8400, charging_curve_enabled=True) 2026-06-26 16:17:25 INFO [OPT-EOS] OPTIMIZE request optimization with: http://192.168.178.193:8503/optimize?start_hour=16 - and with timeout: 180 2026-06-26 16:17:25 INFO [OPT-EOS] OPTIMIZE response retrieved successfully in 0 min 0.01 sec for current run 2026-06-26 16:17:25 ERROR [OPT-EOS] OPTIMIZE Request failed: 422 Client Error: Unprocessable Content for url: http://192.168.178.193:8503/optimize?start_hour=16 2026-06-26 16:17:25 ERROR [OPT-EOS] OPTIMIZE Response status: 422 2026-06-26 16:17:25 WARNING [Main] optimize() returned no avg_runtime; keeping previous value: 120 2026-06-26 16:17:25 ERROR [OPTIMIZATION] No control data in optimized response 2026-06-26 16:17:25 INFO [OPTIMIZATION] Gap-fill run: start 16:20:25 (quarter-aligned run follows at 16:30:00) 2026-06-26 16:17:25 INFO [Main] Next optimization at 16:20:25 (based on average runtime of 120 seconds). Sleeping for 3 min 0 seconds 2026-06-26 16:17:26 INFO [CHARGE_DEMAND] Updating slot power (reasons: new_slot): demand=0 Wh, slot=2554s, calculated=0 W, capped=0 W 2026-06-26 16:17:26 INFO [CHARGE_DEMAND] Slot power updated to 0 W (new commitment) 2026-06-26 16:17:26 INFO [Main] Inverter mode set to MODE AVOID DISCHARGE, PV charge rate: 1350 W (-----)
Looking into the eos-server api specification: https://akkudoktor-eos.readthedocs.io/en/latest/akkudoktoreos/serverapi.html
using eos-server latest release: 0.3.0: https://akkudoktor-eos.readthedocs.io/en/latest/develop/CHANGELOG.html
"optimize" endpoint is deprecated - could this be the root cause or missed I something in the configuration.?
Hope this info helps!
thanks for the separation it isn't an API change at EOS - root cause: sometimes HA delivers no value for specific historic requests and therefore the data for the request to the optimizer is not rightly filled -> leads to the 422 with the last improvement - small gaps in incoming data will be filled with last known from this timeslot, so the outgoing data will be always in right size - the filled gaps (if the amount is small) have no real impact to the optimization... (from current point of view ;-) )
Thx for the analysis.
The problem with the 422 is, that the EOS connect Web Interface is not displayed, respectively cannot be used. You get this screen:
caused by the error:
... 2026-07-07 17:06:02 INFO [Main] Starting EOS Connect web server... 2026-07-07 17:06:30 INFO [CHARGE_DEMAND] Updating slot power (reasons: new_slot): demand=0 Wh, slot=3210s, calculated=0 W, capped=0 W 2026-07-07 17:06:30 INFO [CHARGE_DEMAND] Slot power updated to 0 W (new commitment) 2026-07-07 17:07:16 INFO [CHARGE_DEMAND] Optimizer request preparation: max_charge_power=1350 W (source=dynamic, dynamic_max=1350, config_fixed=8400, charging_curve_enabled=True) 2026-07-07 17:07:16 INFO [OPT-EOS] OPTIMIZE request optimization with: http://192.168.178.193:8503/optimize?start_hour=17 - and with timeout: 180 2026-07-07 17:07:16 INFO [OPT-EOS] OPTIMIZE response retrieved successfully in 0 min 0.01 sec for current run 2026-07-07 17:07:16 ERROR [OPT-EOS] OPTIMIZE Request failed: 422 Client Error: Unprocessable Content for url: http://192.168.178.193:8503/optimize?start_hour=17 2026-07-07 17:07:16 ERROR [OPT-EOS] OPTIMIZE Response status: 422 2026-07-07 17:07:16 WARNING [Main] optimize() returned no avg_runtime; keeping previous value: 120 2026-07-07 17:07:16 ERROR [OPTIMIZATION] No control data in optimized response 2026-07-07 17:07:16 INFO [OPTIMIZATION] Quarter-hour aligned run: start 17:13:00, finish at 17:15:00 2026-07-07 17:07:16 INFO [Main] Next optimization at 17:13:00 (based on average runtime of 120 seconds). Sleeping for 5 min 43 seconds 2026-07-07 17:07:17 INFO [Main] Inverter mode set to MODE AVOID DISCHARGE, PV charge rate: 1350 W (-----) 2026-07-07 17:10:00 INFO [Main] Overall state not changed recently - remaining in current state: MODE AVOID DISCHARGE (OOOOO) ,,,
This behavior blocks me.
jep, the dashboard has nothing really to show if there is no usable response from optimizer -> as said above - the root cause shown by your log entries (your first message) is given by missing data from HA for the load prediction - seems missing historic data
with the last fix it should handle an amount of gaps silently ...
please set loglevel to debug and show the full log after starting up until 422 ... (above, I can only see the result but not the messages that maybe caused this behavior...) - with the full log from start also the used version of EOS-connect will be visible...
in this state you can get directly the eos request which is sent to EOS at
Hi,
thx again for the support! Hopefully all requested info is now available.
loglevel now set to "debug". Enclosed you will find der complete logfile till "422":
855a9a00_eos_connect_2026-07-08T07-53-36.720Z.log
The last lines of the debug log show the optimizer request call and the error response:
2026-07-08 09:51:25 INFO [CHARGE_DEMAND] Optimizer request preparation: max_charge_power=5400 W (source=dynamic, dynamic_max=5400, config_fixed=8400, charging_curve_enabled=True) 2026-07-08 09:51:25 INFO [OPT-EOS] OPTIMIZE request optimization with: http://192.168.178.193:8503/optimize?start_hour=9 - and with timeout: 180 2026-07-08 09:51:25 INFO [OPT-EOS] OPTIMIZE response retrieved successfully in 0 min 0.01 sec for current run 2026-07-08 09:51:25 ERROR [OPT-EOS] OPTIMIZE Request failed: 422 Client Error: Unprocessable Content for url: http://192.168.178.193:8503/optimize?start_hour=9 2026-07-08 09:51:25 ERROR [OPT-EOS] OPTIMIZE Response status: 422 2026-07-08 09:51:25 WARNING [Main] optimize() returned no avg_runtime; keeping previous value: 120 2026-07-08 09:51:25 ERROR [OPTIMIZATION] No control data in optimized response 2026-07-08 09:51:25 INFO [OPTIMIZATION] Gap-fill run: start 09:54:25 (quarter-aligned run follows at 10:00:00) 2026-07-08 09:51:25 INFO [Main] Next optimization at 09:54:25 (based on average runtime of 120 seconds). Sleeping for 3 min 0 seconds
2026-07-08 09:51:25 INFO [CHARGE_DEMAND] Updating slot power (reasons: new_slot): demand=0 Wh, slot=515s, calculated=0 W, capped=0 W 2026-07-08 09:51:25 INFO [CHARGE_DEMAND] Slot power updated to 0 W (new commitment) 2026-07-08 09:51:25 INFO [Main] Inverter mode set to MODE AVOID DISCHARGE, PV charge rate: 5400 W (-----)
The https request >x>:8081/json/optimize_request.json shows:
{ "ems": { "pv_prognose_wh": [0, 0, 0, 0, 0, 0, 0, 0, 0, 1299.6, 2914.4, 3492.4, 3612.8, 3933, 4080, 3859.2, 3418.8, 2819.2, 2075.8, 1190.8, 366, 27.2, 0, 0, 0, 0, 0, 0, 0, 41.8, 816.4, 2315.8, 3775.2, 4918.8, 5709.6, 6216.4, 6628.4, 6702.4, 6421, 5887.8, 5023, 3890.4, 2590.4, 1299, 298.8, 25.4, 0, 0], "strompreis_euro_pro_wh": [0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292, 0.000292], "einspeiseverguetung_euro_pro_wh": [0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001, 0.0001], "preis_euro_pro_wh_akku": 0, "gesamtlast": [472.081, 485.925, 459.186, 483.113, 449.705, 442.573, 500.743, 625.847, 788.432, 780.565, 710.356, 836.514, 765.654, 688.078, 580.678, 752.009, 760.62, 1592.302, 1108.211, 883.662, 618.972, 574.978, 660.516, 587.37, 464.064, 478.056, 455.62, 457.864, 458.385, 436.987, 403.092, 645.683, 1252.754, 994.449, 722.442, 944.772, 1130.411, 717.015, 677.911, 716.865, 689.99, 614.881, 553.848, 576.8, 529.771, 610.521, 648.827, 552.409] }, "pv_akku": { "device_id": "battery1", "capacity_wh": 27170, "charging_efficiency": 0.88, "discharging_efficiency": 0.88, "max_charge_power_w": 5400, "initial_soc_percentage": 62, "min_soc_percentage": 10, "max_soc_percentage": 97 }, "inverter": { "device_id": "inverter1", "max_power_wh": 8400, "battery_id": "battery1" }, "eauto": { "device_id": "ev1", "capacity_wh": 27000, "charging_efficiency": 0.9, "discharging_efficiency": 0.95, "max_charge_power_w": 7360, "initial_soc_percentage": 50, "min_soc_percentage": 5, "max_soc_percentage": 100 }, "dishwasher": { "device_id": "additional_load_1", "consumption_wh": 3000, "duration_h": 30 }, "temperature_forecast": [22.4, 22.2, 21.5, 20.4, 20.3, 19.4, 19.8, 20.3, 21, 21.1, 22, 22.1, 22.8, 23.3, 23.7, 23.6, 24.1, 23.7, 23.9, 23.1, 22.1, 20.4, 20, 19, 18.2, 17.9, 17.3, 16.6, 16.1, 15.9, 16.7, 18, 19.8, 21.3, 22.7, 24.3, 25.8, 26.9, 28, 28.4, 28.6, 28.1, 27.6, 26.8, 24.7, 22.5, 20.9, 0], "start_solution": null, "timestamp": "2026-07-08T09:58:10.748169+02:00"
HI, sorry for the delay --- but needed some deeper analysis... and free time ;-)
- 422 will be given, when the request not have the expected amount of entries in the different arrays and for all arrays the same amount e.g. 48 for hourly precision ...
- your request shows 158 entries for price and all the same - but connected to your startup log you configured evcc as price source, eos as server, this leads to the restriction only hourly values = 48 are allowed
- evcc delivers 15min prices - and here were the problem with the transition from 15min to hourly for the request to eos was not right and also not timestamp based...
- with the recent dev update this part should be fixed
feedin price seems something similiar at your request and is on next ... (for testing you can set to fixed and enter the kwh feedin price)
Thx for the great analysis! Correct I switched to evcc with the prices to have one common source. So I will adapt it as soon as possible. Best regards!
so, now the next step ... same as for price source with evcc in summary the newly introduced evvc price and feedin price source was only working correctly with 15min slots for evopt/ local_evopt - but for eos still hourly slots needed and here the transformation was wrong...
now it should be fixed for both