mitch-dc / volkswagen_we_connect_id

Apache License 2.0
202 stars 53 forks source link

No Data from Server #264

Closed AgentP38 closed 4 months ago

AgentP38 commented 4 months ago

Version of the custom_component

V0.2.3

Installation method (hacs / manual)

hacs

Installation method of hass (venv, docker, hassio,...)

hassio

Configuration


Add your configuration here.

Describe the bug

No data Available for the cars from Volkswagen. -- look at the log --- all entities are unavailable

Debug log


Unexpected error fetching volkswagen_we_connect_id data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/volkswagen_we_connect_id/__init__.py", line 63, in async_update_data
    await hass.async_add_executor_job(update, _we_connect)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/volkswagen_we_connect_id/__init__.py", line 223, in update
    api.update(updatePictures=False)
  File "/usr/local/lib/python3.12/site-packages/weconnect/weconnect.py", line 194, in update
    self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
  File "/usr/local/lib/python3.12/site-packages/weconnect/weconnect.py", line 232, in updateVehicles
    raise catchedRetrievalError
  File "/usr/local/lib/python3.12/site-packages/weconnect/weconnect.py", line 221, in updateVehicles
    self.__vehicles[vin].update(fromDict=vehicleDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures,
  File "/usr/local/lib/python3.12/site-packages/weconnect/elements/vehicle.py", line 228, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force, selective=selective)
  File "/usr/local/lib/python3.12/site-packages/weconnect/elements/vehicle.py", line 340, in updateStatus
    data: Optional[Dict[str, Any]] = self.weConnect.fetchData(url, force)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/weconnect/weconnect.py", line 399, in fetchData
    raise RetrievalError(f'Could not fetch data. Status Code was: {statusResponse.status_code}')
weconnect.errors.RetrievalError: Could not fetch data. Status Code was: 502
AgentP38 commented 4 months ago

After 2 restarts data is back