Kia SoC in der master version

Fragen zur Nutzung, Features, usw..
Antworten
SIDE22
Beiträge: 55
Registriert: Di Feb 11, 2020 8:35 pm
Wohnort: Hagen a.T.W.

Kia SoC in der master version

Beitrag von SIDE22 »

Hallo,
habe mal den kia SoC bei mir eingerichtet allerdings wird nichts angezeigt und im Log tauchen fehler auf
der Kia SoC ist ja noch experimental nur wollte hier einmal den fehler log mitteilen eventuell hilft dies ja weiter

LG
Florian

Code: Alles auswählen

2023-08-23 19:12:33,513 - {modules.vehicles.kia.api:788} - {INFO:fetch soc_ev2} - Kia/Hyundai: Receiving status
2023-08-23 19:12:33,523 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:12:33,523 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:12:33,715 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles/3f5997d3-3695-4616-8030-ad3808e29cf4/ccs2/carstatus/latest HTTP/1.1" 200 None
2023-08-23 19:12:33,715 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles/3f5997d3-3695-4616-8030-ad3808e29cf4/ccs2/carstatus/latest HTTP/1.1" 200 None
2023-08-23 19:12:33,725 - {modules.common.store._api:26} - {DEBUG:fetch soc_ev2} - Raw data CarState(soc=58, range=209.0, soc_timestamp=)
2023-08-23 19:15:22,273 - {modules.common.component_context:24} - {DEBUG:fetch soc_ev2} - Update Komponente ['KIA / Hyundai (experimental)']
2023-08-23 19:15:22,275 - {modules.vehicles.kia.api:829} - {INFO:fetch soc_ev2} - Kia/Hyundai: Update starting
2023-08-23 19:15:22,279 - {modules.vehicles.kia.api:609} - {INFO:fetch soc_ev2} - Kia/Hyundai: Token refresh starting
2023-08-23 19:15:22,289 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:22,289 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:22,468 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/user/oauth2/token HTTP/1.1" 200 668
2023-08-23 19:15:22,468 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/user/oauth2/token HTTP/1.1" 200 668
2023-08-23 19:15:22,478 - {modules.vehicles.kia.api:647} - {DEBUG:fetch soc_ev2} - kia.refreshToken: New access token = eyJhbGci...
2023-08-23 19:15:22,479 - {modules.vehicles.kia.api:686} - {INFO:fetch soc_ev2} - Kia/Hyundai: Requesting vehicle list
2023-08-23 19:15:22,485 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:22,485 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:22,648 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles HTTP/1.1" 200 485
2023-08-23 19:15:22,648 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles HTTP/1.1" 200 485
2023-08-23 19:15:22,658 - {modules.vehicles.kia.api:722} - {DEBUG:fetch soc_ev2} - kia.getVehicleId: VehicleId = 3f5997d3... (SK3 EV 19)
2023-08-23 19:15:22,659 - {modules.vehicles.kia.api:729} - {INFO:fetch soc_ev2} - Kia/Hyundai: Triggering Pre-Wakeup
2023-08-23 19:15:22,665 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:22,665 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:22,831 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/spa/vehicles/3f5997d3-3695-4616-8030-ad3808e29cf4/control/engine HTTP/1.1" 200 79
2023-08-23 19:15:22,831 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/spa/vehicles/3f5997d3-3695-4616-8030-ad3808e29cf4/control/engine HTTP/1.1" 200 79
2023-08-23 19:15:22,840 - {modules.vehicles.kia.api:654} - {INFO:fetch soc_ev2} - Kia/Hyundai: Sending PIN
2023-08-23 19:15:22,849 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:22,849 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:23,032 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "PUT /api/v1/user/pin HTTP/1.1" 200 705
2023-08-23 19:15:23,032 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "PUT /api/v1/user/pin HTTP/1.1" 200 705
2023-08-23 19:15:23,042 - {modules.vehicles.kia.api:677} - {DEBUG:fetch soc_ev2} - kia.refreshToken: control token = eyJhbGci...
2023-08-23 19:15:23,043 - {modules.vehicles.kia.api:759} - {INFO:fetch soc_ev2} - Kia/Hyundai: Triggering Update
2023-08-23 19:15:23,049 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:23,049 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:15:23,261 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v2/spa/vehicles/3f5997d3-3695-4616-8030-ad3808e29cf4/ccs2/carstatus HTTP/1.1" 200 79
2023-08-23 19:15:23,261 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v2/spa/vehicles/3f5997d3-3695-4616-8030-ad3808e29cf4/ccs2/carstatus HTTP/1.1" 200 79
2023-08-23 19:15:23,270 - {modules.vehicles.kia.api:785} - {INFO:fetch soc_ev2} - Kia/Hyundai: Waiting 130 seconds
2023-08-23 19:17:33,338 - {modules.vehicles.kia.api:788} - {INFO:fetch soc_ev2} - Kia/Hyundai: Receiving status
2023-08-23 19:17:33,345 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:17:33,345 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:17:33,506 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles/3f5997d3-3695-4616-8030-ad3808e29cf4/ccs2/carstatus/latest HTTP/1.1" 200 None
2023-08-23 19:17:33,506 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles/3f5997d3-3695-4616-8030-ad3808e29cf4/ccs2/carstatus/latest HTTP/1.1" 200 None
2023-08-23 19:17:33,517 - {modules.common.store._api:26} - {DEBUG:fetch soc_ev2} - Raw data CarState(soc=58, range=211.0, soc_timestamp=)
2023-08-23 19:20:22,322 - {modules.common.component_context:24} - {DEBUG:fetch soc_ev2} - Update Komponente ['KIA / Hyundai (experimental)']
2023-08-23 19:20:22,323 - {modules.vehicles.kia.api:829} - {INFO:fetch soc_ev2} - Kia/Hyundai: Update starting
2023-08-23 19:20:22,327 - {modules.vehicles.kia.api:609} - {INFO:fetch soc_ev2} - Kia/Hyundai: Token refresh starting
2023-08-23 19:20:22,337 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:20:22,337 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:20:22,520 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/user/oauth2/token HTTP/1.1" 200 668
2023-08-23 19:20:22,520 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/user/oauth2/token HTTP/1.1" 200 668
2023-08-23 19:20:22,536 - {modules.vehicles.kia.api:647} - {DEBUG:fetch soc_ev2} - kia.refreshToken: New access token = eyJhbGci...
2023-08-23 19:20:22,546 - {modules.vehicles.kia.api:686} - {INFO:fetch soc_ev2} - Kia/Hyundai: Requesting vehicle list
2023-08-23 19:20:22,556 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:20:22,556 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:20:22,694 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles HTTP/1.1" 509 147
2023-08-23 19:20:22,694 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles HTTP/1.1" 509 147
2023-08-23 19:20:22,704 - {modules.vehicles.kia.api:161} - {ERROR:fetch soc_ev2} - kia.getHTTP:Request failed
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 157, in getHTTP
    error_string = "[" + response_dict['errCode'] + "] " + \
KeyError: 'errCode'
2023-08-23 19:20:22,706 - {modules.vehicles.kia.api:163} - {ERROR:fetch soc_ev2} - kia.getHTTP:Request failed, StatusCode: 509, Error: [XXXX] Unidentified Error {"retCode":"F","resCode":"5091","resMsg":"Exceeds number of requests - Exceeds Number of Requests.","msgId":"739d3863-fcf0-4fbe-9fe9-a92a98e677ae"}
2023-08-23 19:20:22,707 - {modules.vehicles.kia.api:849} - {ERROR:fetch soc_ev2} - kia.fetch_soc: 
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 705, in getVehicleId
    response = getHTTP(url=url, headers=headers)
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 165, in getHTTP
    raise RuntimeError
RuntimeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 844, in fetch_soc
    vehicle_id = getVehicleId(vin, token, brand)
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 719, in getVehicleId
    log.exception("kia.getVehicleId: error: " + response)
UnboundLocalError: local variable 'response' referenced before assignment
2023-08-23 19:20:22,709 - {modules.common.fault_state:52} - {ERROR:fetch soc_ev2} - KIA / Hyundai (experimental): FaultState FaultStateLevel.ERROR, FaultStr <class 'UnboundLocalError'> local variable 'response' referenced before assignment, Traceback: 
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 705, in getVehicleId
    response = getHTTP(url=url, headers=headers)
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 165, in getHTTP
    raise RuntimeError
RuntimeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 37, in update
    self.store.set(self.__component_updater(soc_update_data))
  File "/var/www/html/openWB/packages/modules/vehicles/kia/soc.py", line 20, in updater
    return api.fetch_soc(
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 844, in fetch_soc
    vehicle_id = getVehicleId(vin, token, brand)
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 719, in getVehicleId
    log.exception("kia.getVehicleId: error: " + response)
UnboundLocalError: local variable 'response' referenced before assignment

2023-08-23 19:25:22,371 - {modules.common.component_context:24} - {DEBUG:fetch soc_ev2} - Update Komponente ['KIA / Hyundai (experimental)']
2023-08-23 19:25:22,373 - {modules.vehicles.kia.api:829} - {INFO:fetch soc_ev2} - Kia/Hyundai: Update starting
2023-08-23 19:25:22,377 - {modules.vehicles.kia.api:609} - {INFO:fetch soc_ev2} - Kia/Hyundai: Token refresh starting
2023-08-23 19:25:22,395 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:25:22,395 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:25:27,582 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/user/oauth2/token HTTP/1.1" 200 668
2023-08-23 19:25:27,582 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "POST /api/v1/user/oauth2/token HTTP/1.1" 200 668
2023-08-23 19:25:27,593 - {modules.vehicles.kia.api:647} - {DEBUG:fetch soc_ev2} - kia.refreshToken: New access token = eyJhbGci...
2023-08-23 19:25:27,594 - {modules.vehicles.kia.api:686} - {INFO:fetch soc_ev2} - Kia/Hyundai: Requesting vehicle list
2023-08-23 19:25:27,599 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:25:27,599 - {urllib3.connectionpool:973} - {DEBUG:fetch soc_ev2} - Starting new HTTPS connection (1): prd.eu-ccapi.kia.com:8080
2023-08-23 19:25:27,730 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles HTTP/1.1" 509 147
2023-08-23 19:25:27,730 - {urllib3.connectionpool:452} - {DEBUG:fetch soc_ev2} - https://prd.eu-ccapi.kia.com:8080 "GET /api/v1/spa/vehicles HTTP/1.1" 509 147
2023-08-23 19:25:27,740 - {modules.vehicles.kia.api:161} - {ERROR:fetch soc_ev2} - kia.getHTTP:Request failed
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 157, in getHTTP
    error_string = "[" + response_dict['errCode'] + "] " + \
KeyError: 'errCode'
2023-08-23 19:25:27,742 - {modules.vehicles.kia.api:163} - {ERROR:fetch soc_ev2} - kia.getHTTP:Request failed, StatusCode: 509, Error: [XXXX] Unidentified Error {"retCode":"F","resCode":"5091","resMsg":"Exceeds number of requests - Exceeds Number of Requests.","msgId":"0fc0437b-6f97-4898-9b32-ab7c9abf2acf"}
2023-08-23 19:25:27,743 - {modules.vehicles.kia.api:849} - {ERROR:fetch soc_ev2} - kia.fetch_soc: 
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 705, in getVehicleId
    response = getHTTP(url=url, headers=headers)
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 165, in getHTTP
    raise RuntimeError
RuntimeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 844, in fetch_soc
    vehicle_id = getVehicleId(vin, token, brand)
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 719, in getVehicleId
    log.exception("kia.getVehicleId: error: " + response)
UnboundLocalError: local variable 'response' referenced before assignment
2023-08-23 19:25:27,744 - {modules.common.fault_state:52} - {ERROR:fetch soc_ev2} - KIA / Hyundai (experimental): FaultState FaultStateLevel.ERROR, FaultStr <class 'UnboundLocalError'> local variable 'response' referenced before assignment, Traceback: 
Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 705, in getVehicleId
    response = getHTTP(url=url, headers=headers)
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 165, in getHTTP
    raise RuntimeError
RuntimeError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 37, in update
    self.store.set(self.__component_updater(soc_update_data))
  File "/var/www/html/openWB/packages/modules/vehicles/kia/soc.py", line 20, in updater
    return api.fetch_soc(
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 844, in fetch_soc
    vehicle_id = getVehicleId(vin, token, brand)
  File "/var/www/html/openWB/packages/modules/vehicles/kia/api.py", line 719, in getVehicleId
    log.exception("kia.getVehicleId: error: " + response)
UnboundLocalError: local variable 'response' referenced before assignment
Flocki
Beiträge: 468
Registriert: Fr Aug 28, 2020 12:43 pm

Re: Kia SoC in der master version

Beitrag von Flocki »

a) Dass die Werte nicht gespeichert/angezeigt werden ist ein bekannter Bug, es wird dran gearbeitet
b) Kia hat ein Limit, wieviele Abrufe pro Tag erlaubt sind, dieses hast du anscheinend überschritten. Du solltest also das Intervall zwischen Abrufen deutlich anheben.
SIDE22
Beiträge: 55
Registriert: Di Feb 11, 2020 8:35 pm
Wohnort: Hagen a.T.W.

Re: Kia SoC in der master version

Beitrag von SIDE22 »

Flocki hat geschrieben: Do Aug 24, 2023 5:15 am a) Dass die Werte nicht gespeichert/angezeigt werden ist ein bekannter Bug, es wird dran gearbeitet
b) Kia hat ein Limit, wieviele Abrufe pro Tag erlaubt sind, dieses hast du anscheinend überschritten. Du solltest also das Intervall zwischen Abrufen deutlich anheben.
Mit dem Limit habe ich festgestellt dieses war aber erst nachdem das Auto angesteckt ist weil eingestellt war das er dann alle 5min abfragt aber trotzdem ist der SoC immer auf 0% und verändert sich nicht
Antworten