Custom Integration: Volkswagen WeConnect ID (Europe)

Everything is ready, there was a conflict with a dependency in HA.
I hope after tonights release and the update of the component everything will work again.

1 Like

@mitchztm
@tillsteinbach

Thx Mitch and Till for this quick action. :+1:

1 Like

Thanks Mitch :slight_smile:

Just updated but getting a 500 server error for some reason when I try to add the integration

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 94, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 145, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 148, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 798, in async_init
    flow, result = await task
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 816, in _async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 922, in async_create_flow
    await async_process_deps_reqs(self.hass, self._hass_config, integration)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 384, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 52, in async_get_integration_with_requirements
    return await manager.async_get_integration_with_requirements(domain)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
    await self._async_process_integration(integration, done)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 186, in _async_process_integration
    await self.async_process_requirements(
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 246, in async_process_requirements
    self._raise_for_failed_requirements(name, missing)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 275, in _raise_for_failed_requirements
    raise RequirementsNotFound(integration, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for volkswagen_we_connect_id not found: ['weconnect==0.54.1'].

I also get this in HA logs:

 Logger: homeassistant.util.package
Source: util/package.py:100
First occurred: 6:48:08 PM (2 occurrences)
Last logged: 6:48:14 PM
Unable to install package weconnect==0.54.1: ERROR: Cannot install weconnect==0.54.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts [notice] A new release of pip available: 22.3 -> 23.0.1 [notice] To update, run: pip install --upgrade pip

I am assuming this is the pip version for HA container? As the pip version on my OS is v23.0.1

Ok ignore me, I just see the breaking change now

Need to wait for the new HA release :slight_smile:

OK so error is still there, slightly different version of pip this time

 Logger: homeassistant.util.package
Source: util/package.py:107
First occurred: 8:53:18 PM (3 occurrences)
Last logged: 8:53:29 PM
Unable to install package weconnect==0.54.1: ERROR: Cannot install weconnect==0.54.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts [notice] A new release of pip is available: 23.0 -> 23.0.1 [notice] To update, run: pip install --upgrade pip

Hey, Same issue here:

Logger: homeassistant.util.package
Source: util/package.py:107
First occurred: 9:15:11 PM (3 occurrences)
Last logged: 9:15:28 PM

Unable to install package weconnect==0.54.1: ERROR: Cannot install weconnect==0.54.1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit Dependency Resolution - pip documentation v23.1.dev0 [notice] A new release of pip is available: 23.0 → 23.0.1 [notice] To update, run: pip install --upgrade pip

We need wait for next HA Core Version. See here:

2 Likes

As I understand it was included in the 2023.3.1 that was released yesterday. And as far as I can see, some entities connected to We Connect do actually work now. However, some information is still unavailable for me, like State of Charge. How does it look for you?

Me too. Some sensors work but others, like state-of-charge, dont. I have installed ver 0.1.4

There are still a few errors

Unable to prepare setup for platform volkswagen_we_connect_id.sensor: Platform not found (Exception importing custom_components.volkswagen_we_connect_id.sensor).
Logger: homeassistant.loader
Source: custom_components/volkswagen_we_connect_id/sensor.py:100
Integration: Volkswagen We Connect ID
First occurred: 7:15:23 AM (1 occurrences)
Last logged: 7:15:23 AM

Unexpected exception importing platform custom_components.volkswagen_we_connect_id.sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 779, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 796, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/volkswagen_we_connect_id/sensor.py", line 100, in <module>
    device_class=SensorDeviceClass.energy,
  File "/usr/local/lib/python3.10/enum.py", line 437, in __getattr__
    raise AttributeError(name) from None
AttributeError: energy

Just have to be patient for a fix

New verion is out, and it works

2 Likes

It worked for a short time, but it seems to generate some attribute error, even with the newest Home Assistant version

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config_entries
Source: custom_components/volkswagen_we_connect_id/__init__.py:48
Integration: Volkswagen We Connect ID
First occurred: 05:37:32 (1 occurrences)
Last logged: 05:37:32

Error setting up entry Volkswagen We Connect ID for volkswagen_we_connect_id
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/volkswagen_we_connect_id/__init__.py", line 48, in async_setup_entry
    await hass.async_add_executor_job(_we_connect.update)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 193, in update
    self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
  File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 213, in updateVehicles
    vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict, fixAPI=self.fixAPI,
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 126, in __init__
    self.update(fromDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures, selective=selective)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 220, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force, selective=selective)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 333, in updateStatus
    self.domains[domain.value][key] = className(vehicle=self, parent=self.domains[domain.value], statusId=key,
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/climatization_timer.py", line 22, in __init__
    super().__init__(vehicle=vehicle, parent=parent, statusId=statusId, fromDict=fromDict, fixAPI=fixAPI)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/generic_status.py", line 38, in __init__
    self.update(fromDict=fromDict)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/climatization_timer.py", line 51, in update
    super().update(fromDict=fromDict, ignoreAttributes=(ignoreAttributes + ['timers', 'timeInCar']))
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/generic_status.py", line 106, in update
    newRequest = GenericStatus.Request(localAddress=key, parent=self.requests, fromDict=request)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/generic_status.py", line 150, in __init__
    self.update(fromDict)
  File "/usr/local/lib/python3.10/site-packages/weconnect/elements/generic_status.py", line 155, in update
    self.operation.fromDict(fromDict, 'operation')
  File "/usr/local/lib/python3.10/site-packages/weconnect/addressable.py", line 317, in fromDict
    self.setValueWithCarTime(self.valueType.UNKNOWN, lastUpdateFromCar=None, fromServer=True)
  File "/usr/local/lib/python3.10/enum.py", line 437, in __getattr__
    raise AttributeError(name) from None
AttributeError: UNKNOWN

Seems the problem is occuring intermittently

Reinstalled the integration today, after having completely removed it a couple of weeks ago, when the API change trouble occured. The new installation works perfectly now, with all the entities in my cards back without having to change anything. :slightly_smiling_face: Thanks a lot for a great integration! :+1:

How do you manually poll or force update ?

1 Like

Thanks @hassio40, my integration had only recently stopped working and nothing I tried to fix it worked but I followed your link to VW Germany and accepted everything and then reloaded the integration and my data is refreshing again :smiley:

From what I’ve gathered it looks like the US and EU versions use different applications/websites for all of this connectivity, have you ever had the change to look at the US version as it doesn’t appear there is anything available for my ID.4 here in the states.

GitHub - skagmo/ha_vwid: Volkswagen ID component for Home Assistant appears to be abandoned, or at least not working for me. The VW HACS integration specifically does not support the ID family of vehicles and your integration is the only one that I can find that appears to still be worked on.

I’m not sure if you or anyone else knows of another possibility for those of us with electric vehicles in the states but any assistance would be appreciated.

Your build seems great for the EU folks.

Hi, could someone help?
I try to set the target state of charge via an automation, but fail to do so. I also can’t get it done via the services menu.
(What works though: Reading the SOC and setting the SOC via )

The test command I use is this

service: volkswagen_we_connect_id.volkswagen_id_set_target_soc
data:
  target_soc: 82
  vin: WVWXXXXXXLP002XXX

I used some X to disguise the true VIN. I tried to use instead of the VIN the name that I have given the integration in HA, which is ID3, but it did not work either.
Also tried different formats of the target_soc.

I am sure I am missing something simple but can’t find it. Any help is appreciated. Thanks a lot.

You should use values like 10, 20, 40 etc… the api will not accept values like 82.

    - service: volkswagen_we_connect_id.volkswagen_id_set_target_soc
      data:
        target_soc: 100
        vin: !secret komo_vin

Super, thanks a lot. Works nicely with rounded values to a ten.

It needs to work as it is in your Connect ID app, it only moves in 10 increments