evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Hyundai login not working

Open DL4OCE opened this issue 1 year ago • 46 comments

Describe the bug

When starting evcc, I can see this error message in the log:

[main ] ERROR 2025/10/14 09:52:28 creating vehicle ev0 failed: cannot create vehicle type 'template': cannot create vehicle type 'hyundai': login failed: unexpected status: 400 (Bad Request): Invalid values (4003)

Started a few days, ago. Nothing changed in evcc.yaml. BlueLink app on Android works.

It seems that they have again changed something about their auth method as stated in https://github.com/evcc-io/evcc/discussions/24406

It might be about a CAPTCHA to be solved. Old logins seem to persist until evcc is being restarted due to a cached token.

Steps to reproduce

  1. Restart evcc (latest 209.1)
  2. Look at logs telling you that login at Hyundai fails
  3. Look at evcc's config page that has empty data for Hyundai vehicles

Configuration details

vehicles:
- type: template
  template: hyundai
  user: secret#username
  password: secret#password
  vin: secret#VIN
  title: Kona
  capacity: 39
  language: de
  name: ev0

Log details

[main ] ERROR 2025/10/14 09:52:28 creating vehicle ev0 failed: cannot create vehicle type 'template': cannot create vehicle type 'hyundai': login failed: unexpected status: 400 (Bad Request): Invalid values (4003)

What type of operating system or environment does evcc run on?

Linux

External automation

  • [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.

Nightly build

  • [x] I have verified that the issue is reproducible with the latest nightly build

Version

evcc version 0.209.1 (e233b67e3)

DL4OCE avatar Oct 14 '25 17:10 DL4OCE

Same as Kia, Hyundai seems to have pulled the plug. As customer, try to enforce your rights according to EU Data Act, maybe they will even offer an API that might be usable. See pinned discussion.

andig avatar Oct 14 '25 18:10 andig

Send a direct email to my contacts at Bluelink to see if we can get any insights regarding the EU Data Act and their plans for compliance. However, I’m rather pessimistic about receiving a quick response. It might be worth checking whether we can implement the temporary solution you developed for Kia in the meantime.

igotsoul avatar Oct 14 '25 19:10 igotsoul

We´re getting there, worth to watch: https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/1343#issuecomment-3405174040

igotsoul avatar Oct 15 '25 08:10 igotsoul

Same problem here with a Hyundai IONIQ 5. i believe it can be fixed.

Bueffel76 avatar Oct 15 '25 14:10 Bueffel76

Script to retrieve refresh token is available: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/issues/919#issuecomment-3406816682

cc: @RustyDust

cschlipf avatar Oct 15 '25 15:10 cschlipf

The script works great! Now we just need the step that evcc uses refresh token instead of password like in the KIA change.

holsteiner-kiel avatar Oct 15 '25 17:10 holsteiner-kiel

I patched the code so it might work for Hyundai ;) What architectures do you run evcc on (x86_64, arm64, Windows, Linux?) so I can provide binaries for testing instead of having to run through multiple nightlies.

cc: @cschlipf @holsteiner-kiel

RustyDust avatar Oct 15 '25 19:10 RustyDust

I use it as HomeAssistant Addon on pi5 ;) If you send me the binary, I am able to Change it inside the Container and test it.

holsteiner-kiel avatar Oct 15 '25 19:10 holsteiner-kiel

I patched the code so it might work for Hyundai ;) What architectures do you run evcc on (x86_64, arm64, Windows, Linux?) so I can provide binaries for testing instead of having to run through multiple nightlies.

cc: @cschlipf @holsteiner-kiel

I use evcc in Linux docker on Proxmox

Bueffel76 avatar Oct 15 '25 20:10 Bueffel76

I patched the code so it might work for Hyundai ;) What architectures do you run evcc on (x86_64, arm64, Windows, Linux?) so I can provide binaries for testing instead of having to run through multiple nightlies.

cc: @cschlipf @holsteiner-kiel

I'd love to test it on Linux arm64 (rpi02w).

DL4OCE avatar Oct 15 '25 20:10 DL4OCE

arm64 on Raspian

cschlipf avatar Oct 15 '25 20:10 cschlipf

Linux/RPI ARM64: https://whocares.de/files/evcc_linux_arm64.tar.gz Linux AMD64: https://whocares.de/files/evcc_linux_amd64.tar.gz

MD5-Sums of the binaries: evcc_linux_amd64 : 29a4b4bcdc0f812c784404dec6058eeb evcc_linux_arm64 : 5ab06ed5f1b0a0682ab77a22d80c614b

After unpacking the binaries are named like the archives, just without the extensions. That is done so you can copy them alongside the existing binary and try to run them using

./<binary_name> vehicle -l debug

If it works: hooray ;) If not I'd be interested in the sanitized output.

RustyDust avatar Oct 15 '25 21:10 RustyDust

WIP here: https://github.com/RustyDust/evcc/tree/issue_24418

RustyDust avatar Oct 16 '25 09:10 RustyDust

Thank you very much. Will test today evening.

cschlipf avatar Oct 16 '25 09:10 cschlipf

I tried hard with the new token PW setting it in ʼ ʼ as starting with an 0 (zero) like told at the evcc.yaml, but despite it works at the Kia_Uvo integration, evcc still don't use the cars SOC and so on and stick at kWh like a guest car.

Reason line told, wrong PW.

I use Raspi with HA system and the addon evcc. Also nightly by side to activate, if there will be some fix about the refresh token usage as new PW earlier there.

May I hope for a solution at evcc or earlier the nightly about it ?

Merwases avatar Oct 16 '25 14:10 Merwases

Ok, I got the script running to get my refreshed token from the Hyundai login. I entered the token instead of the PW in the evcc.yaml file, correct? Restarted the server. The car can still not be recognized...

poozu avatar Oct 16 '25 15:10 poozu

That's what I mentioned right before your posting... didn't you read ?... and also not that they are WIP to fix it ?

Merwases avatar Oct 16 '25 15:10 Merwases

There is no change (yet) in the evcc template for Hyundai that the refresh token should be used instead of a password. Neither has there been a change that another URL should be used for authentication. @RustyDust apparantly has a WIP (Work In Progress) that you can patch to your own evcc install to see whether this works or not.

As long as there has not been a merge with the new code to the evcc main branche, the refreshed token will not work. You have to wait for an update, just as you had to wait that kia_uvo was updated to version 2.45.3 to make the refreshtoken functioning.

BravoNLD avatar Oct 16 '25 15:10 BravoNLD

Ok, thanks, then I got this mixed up while reading all the different information and page hops to home assistant, KIA, Hyundai, scripts, etc. Will wait then....

poozu avatar Oct 16 '25 15:10 poozu

Wow. Did anyone actually take the time to read this? Guess not ...

RustyDust avatar Oct 16 '25 16:10 RustyDust