SOC BMW

Alles rund um SoC (Ladezustand des Fahrzeuges). Probleme, Fragen, Fehlfunktionen gehören hier hin
rleidner
Beiträge: 1323
Registriert: Mo Nov 02, 2020 9:50 am
Has thanked: 32 times
Been thanked: 102 times

Re: SOC BMW

Beitrag von rleidner »

Placebo2210 hat geschrieben: Mo Jun 30, 2025 8:35 am Habe auch wieder die 0% drin stehen. Habe jetzt mal den Captcha-Token erneuert, aber dennoch eine 0?
in der App bin ich bei 96%
Du bist auf 2.1.7 Patch3, da passiert das leider noch regelmässig.
Das Erneuern des Captcha-Token ist manchmal mehrfach nötig.
Was steht dazu im SoC-Log?
openWB-2 Standard+ | openWB EVU Kit v2 MID| 9,9kWp mit Kostal Plenticore 8.5 plus | VW ID.3, Kia EV6, Smart EQ forfour
Placebo2210
Beiträge: 173
Registriert: So Feb 20, 2022 9:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: SOC BMW

Beitrag von Placebo2210 »

es steht folgendes drin:

Code: Alles auswählen

2025-06-30 10:33:20,082 - {bimmer_connected.api.client:86} - {ERROR:fetch soc_ev1} - MyBMWAPIError due to HTTPStatusError: {"message":"Request Timeout","statusCode":408}
2025-06-30 10:33:20,087 - {modules.vehicles.bmwbc.api:175} - {ERROR:fetch soc_ev1} - bmwbc.fetch_soc: requestData Error, vnum: 1 err=MyBMWAPIError('HTTPStatusError: {"message":"Request Timeout","statusCode":408}'), type(err)=<class 'bimmer_connected.models.MyBMWAPIError'>
2025-06-30 10:33:20,093 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev1} - BMW & Mini : FaultState FaultStateLevel.ERROR, FaultStr <class 'bimmer_connected.models.MyBMWAPIError'> ('HTTPStatusError: {"message":"Request Timeout","statusCode":408}',), Traceback: 
Traceback (most recent call last):
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/client.py", line 77, in raise_for_status_event_handler
    response.raise_for_status()
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_models.py", line 763, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '408 Request Timeout' for url 'https://cocoapi.bmwgroup.com/eadrax-vcs/v5/vehicle-data/profile'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408

The above exception was the direct cause of the following exception:

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 117, in _get_carstate_by_source
    return self.__component_updater(vehicle_update_data)
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/soc.py", line 20, in updater
    return api.fetch_soc(
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 188, in fetch_soc
    soc, range = loop.run_until_complete(_fetch_soc(user_id, password, vin, captcha_token, vnum))
  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/bmwbc/api.py", line 141, in _fetch_soc
    await account.get_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 114, in get_vehicles
    await self._init_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 92, in _init_vehicles
    vehicle_profile_response = await client.get(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1814, in get
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1702, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1760, in _send_handling_redirects
    raise exc
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1742, in _send_handling_redirects
    await hook(response)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/client.py", line 79, in raise_for_status_event_handler
    await handle_httpstatuserror(ex, log_handler=_LOGGER)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/utils.py", line 89, in handle_httpstatuserror
    raise _ex_to_raise(_err_message) from ex
bimmer_connected.models.MyBMWAPIError: HTTPStatusError: {"message":"Request Timeout","statusCode":408}

2025-06-30 10:33:32,204 - {bimmer_connected.api.authentication:86} - {ERROR:fetch soc_ev1} - MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)
2025-06-30 10:33:32,209 - {modules.vehicles.bmwbc.api:175} - {ERROR:fetch soc_ev1} - bmwbc.fetch_soc: requestData Error, vnum: 1 err=MyBMWAuthError('HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)'), type(err)=<class 'bimmer_connected.models.MyBMWAuthError'>
2025-06-30 10:33:32,216 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev1} - BMW & Mini : FaultState FaultStateLevel.ERROR, FaultStr <class 'bimmer_connected.models.MyBMWAuthError'> ('HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)',), Traceback: 
Traceback (most recent call last):
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 411, in raise_for_status_event_handler
    response.raise_for_status()
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_models.py", line 763, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://customer.bmwgroup.com/gcdm/oauth/authenticate'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401

The above exception was the direct cause of the following exception:

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 117, in _get_carstate_by_source
    return self.__component_updater(vehicle_update_data)
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/soc.py", line 20, in updater
    return api.fetch_soc(
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 188, in fetch_soc
    soc, range = loop.run_until_complete(_fetch_soc(user_id, password, vin, captcha_token, vnum))
  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/bmwbc/api.py", line 141, in _fetch_soc
    await account.get_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 114, in get_vehicles
    await self._init_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 86, in _init_vehicles
    vehicle_list_response = await client.post(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1699, in _send_handling_auth
    request = await auth_flow.__anext__()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 88, in async_auth_flow
    await self.login()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 137, in login
    token_data = await self._login_row_na()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 199, in _login_row_na
    response = await client.post(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1702, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1760, in _send_handling_redirects
    raise exc
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1742, in _send_handling_redirects
    await hook(response)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 413, in raise_for_status_event_handler
    await handle_httpstatuserror(ex, module="AUTH", log_handler=_LOGGER)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/utils.py", line 89, in handle_httpstatuserror
    raise _ex_to_raise(_err_message) from ex
bimmer_connected.models.MyBMWAuthError: HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)

2025-06-30 10:59:44,760 - {bimmer_connected.api.authentication:86} - {ERROR:fetch soc_ev1} - MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)
2025-06-30 10:59:44,765 - {modules.vehicles.bmwbc.api:175} - {ERROR:fetch soc_ev1} - bmwbc.fetch_soc: requestData Error, vnum: 1 err=MyBMWAuthError('HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)'), type(err)=<class 'bimmer_connected.models.MyBMWAuthError'>
2025-06-30 10:59:44,772 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev1} - BMW & Mini : FaultState FaultStateLevel.ERROR, FaultStr <class 'bimmer_connected.models.MyBMWAuthError'> ('HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)',), Traceback: 
Traceback (most recent call last):
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 411, in raise_for_status_event_handler
    response.raise_for_status()
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_models.py", line 763, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://customer.bmwgroup.com/gcdm/oauth/authenticate'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401

The above exception was the direct cause of the following exception:

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 117, in _get_carstate_by_source
    return self.__component_updater(vehicle_update_data)
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/soc.py", line 20, in updater
    return api.fetch_soc(
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 188, in fetch_soc
    soc, range = loop.run_until_complete(_fetch_soc(user_id, password, vin, captcha_token, vnum))
  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/bmwbc/api.py", line 141, in _fetch_soc
    await account.get_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 114, in get_vehicles
    await self._init_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 86, in _init_vehicles
    vehicle_list_response = await client.post(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1699, in _send_handling_auth
    request = await auth_flow.__anext__()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 88, in async_auth_flow
    await self.login()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 137, in login
    token_data = await self._login_row_na()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 199, in _login_row_na
    response = await client.post(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1702, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1760, in _send_handling_redirects
    raise exc
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1742, in _send_handling_redirects
    await hook(response)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 413, in raise_for_status_event_handler
    await handle_httpstatuserror(ex, module="AUTH", log_handler=_LOGGER)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/utils.py", line 89, in handle_httpstatuserror
    raise _ex_to_raise(_err_message) from ex
bimmer_connected.models.MyBMWAuthError: HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)

Protokoll des letzten Updates
Protokoll des Remote-Dienstes
Protokoll des SmartHome Dienstes
Protokoll der Datenmigration
rleidner
Beiträge: 1323
Registriert: Mo Nov 02, 2020 9:50 am
Has thanked: 32 times
Been thanked: 102 times

Re: SOC BMW

Beitrag von rleidner »

Placebo2210 hat geschrieben: Mo Jun 30, 2025 9:01 am es steht folgendes drin:

Code: Alles auswählen

2025-06-30 10:33:20,082 - {bimmer_connected.api.client:86} - {ERROR:fetch soc_ev1} - MyBMWAPIError due to HTTPStatusError: {"message":"Request Timeout","statusCode":408}
Ok, Fehler 408, also in 2.1.7 neues captcha Token, evtl. mehrfach wie im Wiki beschrieben.
In 2.1.8 wird das besser, da ist aber auch noch ein PR offen.
openWB-2 Standard+ | openWB EVU Kit v2 MID| 9,9kWp mit Kostal Plenticore 8.5 plus | VW ID.3, Kia EV6, Smart EQ forfour
Placebo2210
Beiträge: 173
Registriert: So Feb 20, 2022 9:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: SOC BMW

Beitrag von Placebo2210 »

ich teste es heute mittag nochmals, habe jetzt 4x Token erneuert und bleibt bei 0
rleidner
Beiträge: 1323
Registriert: Mo Nov 02, 2020 9:50 am
Has thanked: 32 times
Been thanked: 102 times

Re: SOC BMW

Beitrag von rleidner »

Placebo2210 hat geschrieben: Mo Jun 30, 2025 9:59 am ich teste es heute mittag nochmals, habe jetzt 4x Token erneuert und bleibt bei 0
Was steht im soc log?
openWB-2 Standard+ | openWB EVU Kit v2 MID| 9,9kWp mit Kostal Plenticore 8.5 plus | VW ID.3, Kia EV6, Smart EQ forfour
Placebo2210
Beiträge: 173
Registriert: So Feb 20, 2022 9:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: SOC BMW

Beitrag von Placebo2210 »

lass mich kurz schauen:

Code: Alles auswählen

2025-06-30 11:39:40,224 - {bimmer_connected.api.authentication:86} - {ERROR:fetch soc_ev1} - MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)
2025-06-30 11:39:40,230 - {modules.vehicles.bmwbc.api:175} - {ERROR:fetch soc_ev1} - bmwbc.fetch_soc: requestData Error, vnum: 1 err=MyBMWAuthError('HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)'), type(err)=<class 'bimmer_connected.models.MyBMWAuthError'>
2025-06-30 11:39:40,237 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev1} - BMW & Mini : FaultState FaultStateLevel.ERROR, FaultStr <class 'bimmer_connected.models.MyBMWAuthError'> ('HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)',), Traceback: 
Traceback (most recent call last):
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 411, in raise_for_status_event_handler
    response.raise_for_status()
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_models.py", line 763, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://customer.bmwgroup.com/gcdm/oauth/authenticate'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401

The above exception was the direct cause of the following exception:

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 117, in _get_carstate_by_source
    return self.__component_updater(vehicle_update_data)
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/soc.py", line 20, in updater
    return api.fetch_soc(
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 188, in fetch_soc
    soc, range = loop.run_until_complete(_fetch_soc(user_id, password, vin, captcha_token, vnum))
  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/bmwbc/api.py", line 141, in _fetch_soc
    await account.get_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 114, in get_vehicles
    await self._init_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 86, in _init_vehicles
    vehicle_list_response = await client.post(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1699, in _send_handling_auth
    request = await auth_flow.__anext__()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 88, in async_auth_flow
    await self.login()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 137, in login
    token_data = await self._login_row_na()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 199, in _login_row_na
    response = await client.post(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1702, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1760, in _send_handling_redirects
    raise exc
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1742, in _send_handling_redirects
    await hook(response)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 413, in raise_for_status_event_handler
    await handle_httpstatuserror(ex, module="AUTH", log_handler=_LOGGER)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/utils.py", line 89, in handle_httpstatuserror
    raise _ex_to_raise(_err_message) from ex
bimmer_connected.models.MyBMWAuthError: HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)

2025-06-30 12:09:37,697 - {bimmer_connected.api.authentication:86} - {ERROR:fetch soc_ev1} - MyBMWAuthError due to HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)
2025-06-30 12:09:37,710 - {modules.vehicles.bmwbc.api:175} - {ERROR:fetch soc_ev1} - bmwbc.fetch_soc: requestData Error, vnum: 1 err=MyBMWAuthError('HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)'), type(err)=<class 'bimmer_connected.models.MyBMWAuthError'>
2025-06-30 12:09:37,751 - {modules.common.fault_state:49} - {ERROR:fetch soc_ev1} - BMW & Mini : FaultState FaultStateLevel.ERROR, FaultStr <class 'bimmer_connected.models.MyBMWAuthError'> ('HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)',), Traceback: 
Traceback (most recent call last):
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 411, in raise_for_status_event_handler
    response.raise_for_status()
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_models.py", line 763, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'https://customer.bmwgroup.com/gcdm/oauth/authenticate'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401

The above exception was the direct cause of the following exception:

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 117, in _get_carstate_by_source
    return self.__component_updater(vehicle_update_data)
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/soc.py", line 20, in updater
    return api.fetch_soc(
  File "/var/www/html/openWB/packages/modules/vehicles/bmwbc/api.py", line 188, in fetch_soc
    soc, range = loop.run_until_complete(_fetch_soc(user_id, password, vin, captcha_token, vnum))
  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/bmwbc/api.py", line 141, in _fetch_soc
    await account.get_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 114, in get_vehicles
    await self._init_vehicles()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/account.py", line 86, in _init_vehicles
    vehicle_list_response = await client.post(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1699, in _send_handling_auth
    request = await auth_flow.__anext__()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 88, in async_auth_flow
    await self.login()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 137, in login
    token_data = await self._login_row_na()
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 199, in _login_row_na
    response = await client.post(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1702, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1760, in _send_handling_redirects
    raise exc
  File "/home/openwb/.local/lib/python3.9/site-packages/httpx/_client.py", line 1742, in _send_handling_redirects
    await hook(response)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/authentication.py", line 413, in raise_for_status_event_handler
    await handle_httpstatuserror(ex, module="AUTH", log_handler=_LOGGER)
  File "/home/openwb/.local/lib/python3.9/site-packages/bimmer_connected/api/utils.py", line 89, in handle_httpstatuserror
    raise _ex_to_raise(_err_message) from ex
bimmer_connected.models.MyBMWAuthError: HTTPStatusError: invalid_client - Client authentication failed (e.g., login failure, unknown client, no client authentication included or unsupported authentication method)
ich erneuere noch 1x, nun gehts wieder ....:
rleidner
Beiträge: 1323
Registriert: Mo Nov 02, 2020 9:50 am
Has thanked: 32 times
Been thanked: 102 times

Re: SOC BMW

Beitrag von rleidner »

rleidner hat geschrieben: Do Jun 26, 2025 9:11 am Ich habe eben PR https://github.com/openWB/core/pull/2489 gemacht.
Die Retry-Logik in der letzten Version war noch nicht ganz sauber und wird damit korrigiert.
Bisher wurde nur 1 Retry durchgeführt.
Der PR ist jetzt im Master/2.1.8
openWB-2 Standard+ | openWB EVU Kit v2 MID| 9,9kWp mit Kostal Plenticore 8.5 plus | VW ID.3, Kia EV6, Smart EQ forfour
Extrahirn
Beiträge: 53
Registriert: Fr Dez 04, 2020 8:13 pm
Has thanked: 1 time
Been thanked: 5 times

Re: SOC BMW

Beitrag von Extrahirn »

Ok, danke für die Info.
Ich habe jetzt auf die OpenWB Version

2025-06-30 15:14:39 +0200 [7d795430d] 2.1.8-Alpha.2 Master

Aktualisiert.

Starte mit dem Testen.
OpenWB standard Series 2+ | MINI SE
Extrahirn
Beiträge: 53
Registriert: Fr Dez 04, 2020 8:13 pm
Has thanked: 1 time
Been thanked: 5 times

Re: SOC BMW

Beitrag von Extrahirn »

SoC Abfrage funktioniert.

Ich musste das Testen aber abbrechen,
Weil die OpenWB in der Nacht abgestürzt ist.
Neustart nur mit LS aus und wieder ein.
Das ist ein dickes Problem, aber das gehört
In einen anderen thread.
OpenWB standard Series 2+ | MINI SE
Antworten