evcc-io / evcc

Sonne tanken ☀️🚘
https://evcc.io
MIT License
3.54k stars 656 forks source link

Hyundai Bluelink: EVCC uses invalid SOC of 0% if BMS takes too long on status request #12722

Closed Kishi85 closed 8 months ago

Kishi85 commented 8 months ago

Describe the bug

If the BMS on a Hyundai (Kona EV 2020 in my case) is sleeping or otherwise busy internally then there is a possible condition where on requesting a status update the Battery SoC will be reported at 0% (which is obviously very very rarely correct as it should not happen during "normal" use), once the BMS is ready a few seconds later (30s are usually more than enough if refreshing manually with the app) the next status update request returns the correct SoC (being >0%).

With EVCC if a wrongly reported 0% is cached for the usual 15 minutes the minimum charge option is active during that time trying to charge the car up to the defined safe SoC at full speed ignoring PV-Mode even though it might be already (far) above that limit.

What should happen is that EVCC ignores the wrongly reported 0% SoC (at least if the last cached SoC is >0% and therefore definitely valid) and just keep working with known the last known SoC from the previous status request until the next scheduled cache update.

Steps to reproduce

  1. Connect Bluelink Car
  2. Wait until PV mode starts charging
  3. If BMS is to slow to react to status update SoC will be 0%
  4. If minimum charge limit is set then car will fast charge until the next scheduled status cache update receiving the real SoC

Configuration details

Not relevant as it is a Bluelink Problem that needs to be worked around.

Log details

Not relevant as it is a Bluelink Problem that needs to be worked around.

What type of operating system are you running?

Linux

Version

No response

andig commented 8 months ago

Log fehlt

Kishi85 commented 8 months ago

Log is not missing as there is nothing relevant in the logs as it is not treated as an error...

Mar 06 12:16:16 evcc evcc[1287901]: [lp-1  ] INFO 2024/03/06 12:16:16 stop charging <-
Mar 06 12:35:35 evcc evcc[1287901]: [lp-1  ] INFO 2024/03/06 12:35:35 start charging ->
Mar 06 13:09:35 evcc evcc[1287901]: [lp-1  ] INFO 2024/03/06 13:09:35 stop charging <-
Mar 06 13:43:55 evcc evcc[1287901]: [lp-1  ] INFO 2024/03/06 13:43:55 start charging ->
Mar 06 14:17:55 evcc evcc[1287901]: [lp-1  ] INFO 2024/03/06 14:17:55 stop charging <-

During the wrongly reported SoC cache period the WebUI simply shows 0% SoC (kicking up minimum charge limit fast charging) nothing more nothing less upon next cache update is correctly displayed and used again.