evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Creating a "Hyundai EU Data Act" Car fails

Open jb-ks opened this issue 1 month ago • 6 comments

Description

The creation of a "Hyundai EU Data Act" car fails with an error message:

"cannot create vehicle type 'template': cannot create vehicle type 'pleos': cannot find vehicle, got: []"

It seems, that this happens after successful query of the state (when I enter an ivalid secret I got another error: "cannot create vehicle type 'template': cannot create vehicle type 'pleos': login failed: unexpected status: 400 (Bad Request) POST https://api.pleos.ai/v1/auth/personal-token")

Steps to Reproduce

  1. In Config create a new Car
  2. Choose "Hyundai EU Data Act"
  3. Fill in User ID & Secret
  4. Save or check runs in an error

Trace: [pleos ] TRACE 2026/10/15 08:27:23 POST https://api.pleos.ai/v1/auth/personal-token [pleos ] TRACE 2026/10/15 08:27:23 {"clientId":"","clientSecret":""} -- {"data":{"accessToken":"****************"},"meta":{"code":200,"message":"Success","success":true,"timestamp":"2026-10-15T06:27:23Z","requestId":"7b7c1c0d-c861-11f1-972d-b3084b3383ed"}} [pleos ] TRACE 2026/10/15 08:27:23 GET https://api.pleos.ai/v1/vehicles/consent [pleos ] TRACE 2026/10/15 08:27:23 {"data":{"vehicles":[]},"meta":{"code":200,"message":"Success","success":true,"timestamp":"2026-10-15T06:27:23Z","requestId":"7b8d32c5-c861-11f1-82f7-bd47fef2eacc"}} [main ] ERROR 2026/10/15 08:27:23 creating vehicle db:16 failed: cannot create vehicle type 'template': cannot create vehicle type 'pleos': cannot find vehicle, got: [] [db ] TRACE 2026/10/15 08:27:23 SELECT * FROM configs WHERE configs.class = 6 0 [db ] TRACE 2026/10/15 08:27:23 SELECT * FROM configs WHERE configs.class = 9 0 [db ] TRACE 2026/10/15 08:27:23 SELECT * FROM configs WHERE configs.class = 5 1 [db ] TRACE 2026/10/15 08:27:23 SELECT * FROM entities WHERE entities.group = 'loadpoint' AND entities.name = 'db:2' ORDER BY entities.id LIMIT 1 1 [lp-1 ] DEBUG 2026/10/15 08:27:23 default vehicle 'db:7' is disabled

Configuration (UI)

{
  "charger": [
    {"id":1,"name":"db:1","type":"template","config":{"template":"tinkerforge-warp-ws","energyMeterIndex":"0","uri":"***"},"deviceProduct":"TinkerForge WARP3 Smart"}
  ],
  "country": "",
  "currency": "EUR",
  "eebus": {"config":{"certificate":{"private":"***","public":"-----BEGIN CERTIFICATE-----
MIIBvTCCAWKgAwIBAgIQY+lsKnk5vlDubB5OkcAjFzAKBggqhkjOPQQDAjA+MQsw
CQYDVQQGEwJERTENMAsGA1UEChMERVZDQzEJMAcGA1UECxMAMRUwEwYDVQQDDAxF
VkNDX0hFTVNfMDEwHhcNMjYwMzI1MjIyMTE3WhcNMzYwMzIyMjIyMTE3WjA+MQsw
CQYDVQQGEwJERTENMAsGA1UEChMERVZDQzEJMAcGA1UECxMAMRUwEwYDVQQDDAxF
VkNDX0hFTVNfMDEwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASQCpX7AAGQMxD5
ocOmxtd/+mtrF29pv+1Lr1RAJSklM7P8uaOVuLZr8ObDn2hEbl6aLubKf2vkCxQp
A6hCLPSdo0IwQDAOBgNVHQ8BAf8EBAMCB4AwDwYDVR0TAQH/BAUwAwEB/zAdBgNV
HQ4EFgQU6dwmcLcgRHP33zP1AP7NRIGOuTAwCgYIKoZIzj0EAwIDSQAwRgIhAO9q
GvF8QLCL1l3fymu5KzAL+IEekIdFp+Oq/oWI55rZAiEAgrqD5tWMjIBQBXZmC6p+
SAYa5H4VLxiR4WSjpcQA+uE=
-----END CERTIFICATE-----
"},"port":4712,"shipid":"EVCC-3030643733343231"},"status":{"qr":"SHIP;SKI:e9dc2670b7204473f7df33f500fecd44818eb930;ID:EVCC-3030643733343231;BRAND:EVCC;TYPE:EnergyManagementSystem;MODEL:HEMS;SERIAL:EVCC-3030643733343231;CAT:2;FPH256:AC12FFB11DFCA84E1047E43C6ABE83FE6A5CED103AAA32AAC4D569ECE6BA7D9F;SPSEC:1C0C76535CD231DBD8D805EAC52B08F2;ENDSHIP;","ski":"e9dc2670b7204473f7df33f500fecd44818eb930"}},
  "experimental": true,
  "gridExportLimit": 0,
  "influx": {"database":"","insecure":false,"org":"","password":"","token":"","url":"","user":""},
  "interval": 15,
  "loadpoints": [
    {"id":2,"name":"db:2","alwaysCharge":"on","batteryBoostLimit":60,"charger":"db:1","defaultMode":"off","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":"Carport","ui":{"maxTemp":0,"minTemp":0},"vehicle":"db:7"}
  ],
  "meter": [
    {"id":13,"name":"db:13","type":"template","config":{"id":71,"template":"kostal-plenticore","baudrate":9600,"capacity":14.8,"comset":"8N1","endianness":"little","host":"192.168.200.35","maxacpower":"0","minsoc":7,"modbus":"tcpip","port":1502,"usage":"battery","watchdog":"60s"},"deviceProduct":"Kostal Plenticore Hybrid","deviceTitle":"Batterie"},
    {"id":11,"name":"db:11","type":"template","config":{"id":71,"template":"kostal-plenticore","baudrate":9600,"comset":"8N1","endianness":"little","host":"192.168.200.35","maxacpower":"0","modbus":"tcpip","port":1502,"usage":"pv","watchdog":"60s"},"deviceProduct":"Kostal Plenticore Hybrid","deviceTitle":"Plenticore M"},
    {"id":3,"name":"db:3","type":"template","config":{"id":71,"template":"kostal-ksem","baudrate":9600,"comset":"8N1","host":"192.168.200.37","modbus":"tcpip","port":502,"usage":"grid"},"deviceProduct":"Kostal Smart Energy Meter"},
    {"id":12,"name":"db:12","type":"template","config":{"id":71,"template":"kostal-plenticore","baudrate":9600,"comset":"8N1","endianness":"little","host":"192.168.200.36","maxacpower":"0","modbus":"tcpip","port":1502,"usage":"pv","watchdog":"60s"},"deviceProduct":"Kostal Plenticore Hybrid","deviceTitle":"Plenticore S"}
  ],
  "mqtt": {"broker":"localhost:1883","caCert":"","clientCert":"","clientID":"","clientKey":"","insecure":true,"password":"***","topic":"evcc","user":"mqtt"},
  "ocpp": {"config":{"port":8887},"status":{"stations":[]}},
  "ocppforwarder": {"config":[],"status":[]},
  "optimizer": false,
  "optimizerChargingStrategy": "charge_before_export",
  "remote": {"enabled":false},
  "residualPower": 100,
  "shm": {"deviceId":"","deviceSerial":"","vendorId":""},
  "site": {"aux":null,"battery":["db:13"],"consumer":null,"curtail":null,"ext":null,"grid":"db:3","pv":["db:11","db:12"],"title":""},
  "tariff": [
    {"id":10,"name":"db:10","type":"template","config":{"template":"fixed","price":0.17},"deviceProduct":"Fester Preis"},
    {"id":9,"name":"db:9","type":"template","config":{"template":"fixed","price":0.32899999999999996},"deviceProduct":"Fester Preis"}
  ],
  "tariffRefs": {"co2":"","feedIn":"db:10","grid":"db:9","planner":"","solar":[],"temperature":""},
  "vehicle": [
    {"id":7,"name":"db:7","type":"template","config":{"template":"hyundai","autodetectdisabled":false,"cache":"15m","capacity":42,"climaterdisabled":false,"icon":"car","language":"de","password":"***","priority":0,"region":"Europe","title":"Inster","user":"***","vin":"***","wakeupdisabled":false},"deviceDisable":true,"deviceProduct":"Hyundai Bluelink"},
    {"id":16,"name":"db:16","type":"template","config":{"template":"pleos","autodetectdisabled":false,"cache":"15m","clientid":"5eea4f59-b0e9-3cd6-945f-47ed690506a4","clientsecret":"***","climaterdisabled":false,"icon":"car","priority":0,"title":"Inster2","wakeupdisabled":false,"welcomecharge":false},"deviceProduct":"Hyundai EU Data Act"}
  ]
}

Version

v0.317.1

System

linux/amd64, CEST +02:00 evcc runs under Home Assistant (which runs as a VM in Proxmox).

jb-ks avatar Oct 15 '26 07:10 jb-ks

Login to the Pleos API succeeds (HTTP 200 with an access token), but GET /v1/vehicles/consent returns an empty list ("vehicles":[]). evcc then has no vehicle to pick and reports cannot find vehicle, got: [] (vehicle/pleos.go, vehicle/pleos/api.go). So the credentials are fine; the API key currently has no vehicle assigned.

This looks like a consent/setup issue on the Hyundai/Pleos side rather than an evcc defect, but I can't confirm that from here. Could you check:

  • In the Hyundai data portal where you created the User ID & Secret, is your Inster explicitly linked/consented to this API key? Does the consent show as active?
  • Was the consent granted after the key was created, and did you wait a bit afterwards (it may take time to propagate)?
  • If it still returns an empty list, does setting the vin (and brand, e.g. hyundai) in the vehicle config change anything?

🤖 Generated with Claude Code

github-actions[bot] avatar Oct 15 '26 07:10 github-actions[bot]

Hello, here is perhaps a start of solution => https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/1939

Yesterday, the kia_uvo intergration stop to work on Home Assistant. The community find a solution for Home Assistant. Perhaps it can help to resolve the issue on EVCC ?

Gouvy83 avatar Oct 15 '26 07:10 Gouvy83

As far as I am aware, there is no way in Pleos Playground to explicitly connect a vehicle via the API (see: https://document.pleos.ai/en/api-reference/vehicle-data-api/getting-started/for-private-users/request-my-vehicle-api-key).

However, I plan to test something else once I have access to the vehicle again:

The myHyundai account being used is not the vehicle's primary account; rather, it is a secondary (shared) account—meaning the vehicle has been shared with it. It is possible that this scenario is not handled correctly by the Pleos API.

jb-ks avatar Oct 15 '26 07:10 jb-ks

For me its still notworking with .18 .To mention I have two hyundai cars, In one account 1 is shared one is owned and in onother accuont, both are shared. TRoed both but I get Failed setup, will retry: Config Not Ready: Error communicating with API: Traceback (most recent call last): File "/config/custom_components/kia_uvo/coordinator.py", line 192, in _async_update_data await self.hass.async_add_executor_job( ...<2 lines>... ) File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 166, in check_and_force_update_vehicles self.check_and_force_update_vehicle(force_refresh_interval, vehicle_id) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 186, in check_and_force_update_vehicle self.update_vehicle_with_cached_state(vehicle_id) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 152, in update_vehicle_with_cached_state self.api.update_vehicle_with_cached_state(self.token, vehicle) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/ApiImplType1.py", line 89, in wrapper return func(self, token, *args, **kwargs) File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 733, in update_vehicle_with_cached_state _check_response_for_errors(response) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/ApiImplType1.py", line 145, in _check_response_for_errors raise error_code_mappingresponse["resCode"] hyundai_kia_connect_api.exceptions.ServiceTemporaryUnavailable: Unavailable remote control - Service Temporary Unavailable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/config/custom_components/kia_uvo/coordinator.py", line 201, in _async_update_data await self.hass.async_add_executor_job( self.vehicle_manager.update_all_vehicles_with_cached_state ) File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 86, in run result = ctx.run(self.task) File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 73, in run return fn(*args, **kwargs) File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 146, in update_all_vehicles_with_cached_state self.update_vehicle_with_cached_state(vehicle_id) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 152, in update_vehicle_with_cached_state self.api.update_vehicle_with_cached_state(self.token, vehicle) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/ApiImplType1.py", line 89, in wrapper return func(self, token, *args, **kwargs) File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 733, in update_vehicle_with_cached_state _check_response_for_errors(response) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/usr/local/lib/python3.14/site-packages/hyundai_kia_connect_api/ApiImplType1.py", line 145, in _check_response_for_errors raise error_code_mappingresponse["resCode"] hyundai_kia_connect_api.exceptions.ServiceTemporaryUnavailable: Unavailable remote control - Service Temporary Unavailable

in the APP all is working.

sebbulbba avatar Oct 15 '26 07:10 sebbulbba

Issue here is the official API from Hyundai/Kia/Genesis via Pleos. So please stop sending things regarding the reverse-engineered solution.

VolkerK62 avatar Oct 15 '26 07:10 VolkerK62

"vehicles":[]

There are no vehicles in your account.

andig avatar Oct 15 '26 08:10 andig