Re: SOC BMW
Verfasst: Sa Apr 27, 2024 2:01 pm
Habe es schon mal manuell reinkopiert. Funzt wieder. Danke! Und danke, dass die 1.9x noch mitgepflegt wird!!
Gerne.
rleidner hat geschrieben: ↑Fr Apr 26, 2024 7:37 pm The authentication problem should be repaired with these PR:
1.9: https://github.com/snaptec/openWB/pull/2836
2.x: https://github.com/openWB/core/pull/1589
I did not use the bimmer_connected approach discussed earlier because I wanted to resolve it for 1.9 also.
A future task may be to move to bimmer_connected in later 2.x versions.
Code: Alles auswählen
2024-04-27 21:29:44,067 - {modules.common.configurable_vehicle:56} - {DEBUG:fetch soc_ev1} - Vehicle Instance <class 'modules.vehicles.bmw.config.BMW'>
2024-04-27 21:29:44,067 - {modules.common.configurable_vehicle:57} - {DEBUG:fetch soc_ev1} - Calculated SoC-State CalculatedSocState(imported_start=3598140.0, manual_soc=None, soc_start=20)
2024-04-27 21:29:44,068 - {modules.common.configurable_vehicle:58} - {DEBUG:fetch soc_ev1} - Vehicle Update Data VehicleUpdateData(plug_state=False, charge_state=False, imported=None, battery_capacity=38000, efficiency=89, soc_from_cp=None, timestamp_soc_from_cp=None)
2024-04-27 21:29:44,068 - {modules.common.configurable_vehicle:59} - {DEBUG:fetch soc_ev1} - General Config GeneralVehicleConfig(use_soc_from_cp=False, request_interval_charging=300, request_interval_not_charging=10800, request_only_plugged=False)
2024-04-27 21:29:44,068 - {modules.common.component_context:25} - {DEBUG:fetch soc_ev1} - Update Komponente ['BMW']
2024-04-27 21:29:44,072 - {urllib3.connectionpool:1055} - {DEBUG:fetch soc_ev1} - Starting new HTTPS connection (1): customer.bmwgroup.com:443
2024-04-27 21:29:44,072 - {urllib3.connectionpool:1055} - {DEBUG:fetch soc_ev1} - Starting new HTTPS connection (1): customer.bmwgroup.com:443
2024-04-27 21:29:44,280 - {urllib3.connectionpool:549} - {DEBUG:fetch soc_ev1} - https://customer.bmwgroup.com:443 "POST /gcdm/oauth/authenticate HTTP/1.1" 200 411
2024-04-27 21:29:44,280 - {urllib3.connectionpool:549} - {DEBUG:fetch soc_ev1} - https://customer.bmwgroup.com:443 "POST /gcdm/oauth/authenticate HTTP/1.1" 200 411
2024-04-27 21:29:44,286 - {urllib3.connectionpool:1055} - {DEBUG:fetch soc_ev1} - Starting new HTTPS connection (1): customer.bmwgroup.com:443
2024-04-27 21:29:44,286 - {urllib3.connectionpool:1055} - {DEBUG:fetch soc_ev1} - Starting new HTTPS connection (1): customer.bmwgroup.com:443
2024-04-27 21:29:44,386 - {urllib3.connectionpool:549} - {DEBUG:fetch soc_ev1} - https://customer.bmwgroup.com:443 "POST /gcdm/oauth/authenticate HTTP/1.1" 400 78
2024-04-27 21:29:44,386 - {urllib3.connectionpool:549} - {DEBUG:fetch soc_ev1} - https://customer.bmwgroup.com:443 "POST /gcdm/oauth/authenticate HTTP/1.1" 400 78
2024-04-27 21:29:44,387 - {modules.vehicles.bmw.api:94} - {ERROR:fetch soc_ev1} - bmw.postHTTP: Request failed, StatusCode: 400
2024-04-27 21:29:44,387 - {modules.vehicles.bmw.api:169} - {ERROR:fetch soc_ev1} - bmw.authStage2: Authentication stage 2 Error err=RuntimeError(), type(err)=<class 'RuntimeError'>
2024-04-27 21:29:44,387 - {modules.vehicles.bmw.api:224} - {ERROR:fetch soc_ev1} - bmw.requestToken: Login Error err=RuntimeError(), type(err)=<class 'RuntimeError'>
2024-04-27 21:29:44,388 - {modules.vehicles.bmw.api:278} - {ERROR:fetch soc_ev1} - bmw.fetch_soc: requestData Error, vehicle: 1 err=RuntimeError(), type(err)=<class 'RuntimeError'>
2024-04-27 21:29:44,388 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev1} - BMW: FaultState FaultStateLevel.ERROR, FaultStr <class 'RuntimeError'> (), Traceback:
Traceback (most recent call last):
File "/var/www/html/openWB/packages/modules/common/configurable_vehicle.py", line 66, 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 109, in _get_carstate_by_source
return self.__component_updater(vehicle_update_data)
File "/var/www/html/openWB/packages/modules/vehicles/bmw/soc.py", line 20, in updater
return api.fetch_soc(
File "/var/www/html/openWB/packages/modules/vehicles/bmw/api.py", line 272, in fetch_soc
'code_verifier': code_verifier,
File "/var/www/html/openWB/packages/modules/vehicles/bmw/api.py", line 221, in requestToken
raise
File "/var/www/html/openWB/packages/modules/vehicles/bmw/api.py", line 166, in authStage2
'x-identity-provider': 'gcdm',
File "/var/www/html/openWB/packages/modules/vehicles/bmw/api.py", line 95, in postHTTP
tf = open(storeFile, 'w', encoding='utf-8')
RuntimeError
Kann es sein, dass das noch die alte Version ist?heidanei hat geschrieben: ↑Sa Apr 27, 2024 7:28 pm Hi!
@rleidner: DANKE!!!
Hab mir die Datei auch manuell reinkopiert. Leider klappt's bei mir aber noch nicht. Folgende FM im Log, bei allen drei Autos in meinem Account die Gleiche:Kannst Du damit was anfangen?Code: Alles auswählen
...
Gruß, Michael