Audi MMI support

I think because of some changes in 2021.12.2… It was not working even after restart of HA until today morning. Just installed new version of core, restarted and integration is back!

1 Like

Is it possible to preheat an e-tron using this integration?
Can’t get it to work.

I’m not sure there is. I just installed and the only actionable item I see are door locks. I bet the API has it somewhere if we can figure out what the call is.

It’s broken again, I suspect Audi has changed login procedure.

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/audiconnect/audi_services.py:241
Integration: Audi Connect
First occurred: 09:54:33 (1 occurrences)
Last logged: 09:54:33

Error setting up entry <redacted> for audiconnect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/audiconnect/__init__.py", line 106, in async_setup_entry
    return await data.update(utcnow())
  File "/config/custom_components/audiconnect/audi_account.py", line 162, in update
    if not await self.connection.update(None):
  File "/config/custom_components/audiconnect/audi_connect_account.py", line 113, in update
    vehicles_response = await self._audi_service.get_vehicle_information()
  File "/config/custom_components/audiconnect/audi_services.py", line 241, in get_vehicle_information
    "Authorization": "Bearer " + self.audiToken["access_token"],
KeyError: 'access_token'

Here, in DE, it works. Yesterday was a problem during evening, myAudi in Browser wont work too, this morning everything went find.

Still broken for me. It did only break after i restarted HA. Would yopu mind checking that?

I see a pull request in ha integration:

There is a commit that removes the "Bearer " string from the client-id.

Yes, couple of reboot today caused other things (integrate new things), works without problems.
Today my first way was myaudi and i have to confirm some things about data protection to see my car in browser.

And just to confirm: with the PR it works for me.

Since some time I started to see in my log file errors related to this integration. Strangely all the sensors work fine. Any idea what this indicates:

2022-02-12 15:35:06 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Unable to obtain the vehicle shortTerm tripdata of WAUZZZFY1Hxxxxxxx: 403, message='Forbidden', url=URL('https://mal-1a.prd.ece.vwg-connect.com/api/bs/tripstatistics/v1/vehicles/WAUZZZFY1Hxxxxxxx/tripdata/shortTerm?type=list&from=1970-01-01T00:00:00Z&to=2022-02-12T16:05:05Z')
2022-02-12 15:35:06 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Unable to obtain the vehicle longTerm tripdata of WAUZZZFY1Hxxxxxxx: 403, message='Forbidden', url=URL('https://mal-1a.prd.ece.vwg-connect.com/api/bs/tripstatistics/v1/vehicles/WAUZZZFY1Hxxxxxxx/tripdata/longTerm?type=list&from=1970-01-01T00:00:00Z&to=2022-02-12T16:05:06Z')

After the last update, the service to start climatisation is working with the E-Tron thanks to arjenvrh!

Anyone else in the US no longer able to log in? I’m getting errors on startup so I deleted and tried to re-add the integration and it simply gives me “Invalid Credentials.” I’ve confirmed the account is good in both the phone app and the web. My guess is the web has changed and the HA integration doesn’t match it now.

I got the same in DE region, when try to add Audi Connect intergration and place data get info Invalid credentials. Anyone has the same and can help?

This fixed on my side:

Thank you very much! Working!! :slight_smile:

Same here - working again!! Thank you for the folks contributing to this integration.

What change did you exactly made to make it working again? From linked post it seems that only version number was changed from 4.5.1 to 4.6.0 (or I missed something more), but it does not resolve the problem, at least for me…

In the link on the page, in menue, files changed, there are 3 files changed, this change you have to change on your side to make it run.

1 Like

Ups… did not expanded the view :man_facepalming:
Thanks a lot!

I installed this integration about a year ago, but it stopped working (Audi was complaining too much activity I think), so I removed it.

I added it again yesterday.

  1. This time Model reports as unknown, so everything got named with “None/none” in the name instead of my model name.

  2. Anyone know where the poll interval is stored? I forgot to check this when I installed, and want to maybe change it to a longer time (to avoid any potential issue as I may have had the first time I tried this.)

Thanks!

Found it in core.config_entries. Is it safe to change this file, or is there a UI way to update Scan_Interval? I would have thought there should be a UI method, since maybe one might need to update a password, etc., occasionally.