Re: Cupra Connect SoC
Verfasst: Mo Jul 14, 2025 7:05 pm
Ich habe das brandneue Cupra SoC Modul ausprobiert.
Die GUI ist zwar noch nicht fertig, habe die Daten (User-ID, Passwort, VIN) manuell in der JSON eingetragen.
Beim Abrufen des SoC erhalte ich folgenden Fehler:
P.S: Ist auch ein Cupra Born
Die GUI ist zwar noch nicht fertig, habe die Daten (User-ID, Passwort, VIN) manuell in der JSON eingetragen.
Beim Abrufen des SoC erhalte ich folgenden Fehler:
Code: Alles auswählen
2025-07-14 20:58:03,275 - {modules.common.configurable_vehicle:63} - {DEBUG:fetch soc_ev2} - Vehicle Instance <class 'modules.vehicles.cupra.config.Cupra'>
2025-07-14 20:58:03,275 - {modules.common.configurable_vehicle:64} - {DEBUG:fetch soc_ev2} - Calculated SoC-State CalculatedSocState(imported_start=None, manual_soc=None, soc_start=60.55)
2025-07-14 20:58:03,276 - {modules.common.configurable_vehicle:65} - {DEBUG:fetch soc_ev2} - Vehicle Update Data VehicleUpdateData(plug_state=False, charge_state=False, imported=None, battery_capacity=55000, efficiency=90, soc_from_cp=None, timestamp_soc_from_cp=None, soc_timestamp=1752511457.828435)
2025-07-14 20:58:03,276 - {modules.common.configurable_vehicle:66} - {DEBUG:fetch soc_ev2} - General Config GeneralVehicleConfig(use_soc_from_cp=False, request_interval_charging=300, request_interval_not_charging=900, request_only_plugged=False)
2025-07-14 20:58:03,277 - {modules.common.component_context:29} - {DEBUG:fetch soc_ev2} - Update Komponente ['Cupra']
2025-07-14 20:58:03,283 - {asyncio:59} - {DEBUG:fetch soc_ev2} - Using selector: EpollSelector
2025-07-14 20:58:03,296 - {modules.vehicles.vwgroup.vwgroup:49} - {DEBUG:fetch soc_ev2} - set refreshToken to initial value
2025-07-14 20:58:03,300 - {modules.vehicles.vwgroup.vwgroup:63} - {DEBUG:fetch soc_ev2} - set accessToken to initial value
2025-07-14 20:58:03,616 - {modules.vehicles.cupra.libcupra:239} - {DEBUG:fetch soc_ev2} - Refreshing tokens
2025-07-14 20:58:03,790 - {modules.vehicles.cupra.libcupra:245} - {INFO:fetch soc_ev2} - Reconnecting
2025-07-14 20:58:05,001 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev2} - Cupra: FaultState FaultStateLevel.ERROR, FaultStr <class 'KeyError'> ('Location',), Traceback:
Traceback (most recent call last):
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 73, in update
car_state = self._get_carstate_by_source(vehicle_update_data, source)
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 126, in _get_carstate_by_source
return self.__component_updater(vehicle_update_data)
File "/var/www/html/openWB/packages/modules/vehicles/cupra/soc.py", line 26, in updater
return fetch(vehicle_update_data, vehicle_config, vehicle)
File "/var/www/html/openWB/packages/modules/vehicles/cupra/soc.py", line 19, in fetch
soc, range, soc_ts, soc_tsX = api.fetch_soc(config, vehicle)
File "/var/www/html/openWB/packages/modules/vehicles/cupra/api.py", line 31, in fetch_soc
soc, range, soc_ts, soc_tsX = loop.run_until_complete(a._fetch_soc())
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/var/www/html/openWB/packages/modules/vehicles/cupra/api.py", line 20, in _fetch_soc
return await super().request_data(cupra)
File "/var/www/html/openWB/packages/modules/vehicles/vwgroup/vwgroup.py", line 69, in request_data
self.data = await library.get_status()
File "/var/www/html/openWB/packages/modules/vehicles/cupra/libcupra.py", line 246, in get_status
if await self.reconnect():
File "/var/www/html/openWB/packages/modules/vehicles/cupra/libcupra.py", line 161, in reconnect
url = response.headers['Location']
KeyError: 'Location'