Audi MMI support

I reinstalled the HACS integration, but can’t even log in anymore. The login browser procedure has now been redesigned, while the android APP still works.

It does seem like sometimes the integration keeps using an invalid access token until a reboot. I think I had this problem 2 or 3 times now and solved it with a reboot. For the last couple of weeks it has been running without problems. Maybe it is triggered by something happening on the server side (eg a reboot) which causes it to no longer accept valid tokens.

My only suggestion now would be to automatically get a whole new token after a certain number of failed (401) requests, so that it would not require a reboot.

hmm, after a restart of mine HA… sensors are still unavailable

There was another change in the API, other projects are also working in this. The Token API requires are new header, which is a crypto hash of some parameters. This needs to be be implemented, otherwise the application can’t request a new token.

Latest update works for me now! Who ever you are that fixed it, thanks!!!

I fixed the login based on the infos from Markus Michels! You can thank him :+1:

2 Likes

hmm, mine are still unavaible? do we need to logout/login again ?

I thanks you also! THANKS. :blush:

I restarted Home Assistant and it just worked. Did you try that?

yeah, i now removed integration, readded
but now i only see 2 entities
the lock and the model entity …

@arjenvr any idea?

i removed integration, readded again filled in username + password + DE as region
it creates the integration
but only see 2 entities :
lock.audi_a4_avant_door_lock and sensor.audi_a4_avant_model

this was a nice example of 3 projects working together :wink:

1 Like

anyone tried the lock function? i get…

2020-10-26 22:45:19 ERROR (MainThread) [custom_components.audiconnect.util] Unable to lock waxxxxxxx: object of type 'NoneType' has no len()
2020-10-26 22:45:22 ERROR (MainThread) [custom_components.audiconnect.util] Unable to unlock waxxxxxxx: object of type 'NoneType' has no len()

I can log in, it shows just two entities (like @pergola.fabio), lock & model. The lock is allways unlocked, locking it fails. Refreshing data results in the following log entries:

2020-10-27 09:15:43 ERROR (MainThread) [custom_components.audiconnect.util] Unable to refresh vehicle data of <vinsnipped>: 403, message='Forbidden', url=URL('https://msg.volkswagen.de/fs-car/bs/vsr/v1/Audi/DE/vehicles/<vinsnipped>/requests')
2020-10-27 09:15:43 ERROR (MainThread) [custom_components.audiconnect.audi_account] Error refreshing vehicle data <vinsnipped> NoneType: None
2020-10-27 09:15:45 ERROR (MainThread) [custom_components.audiconnect.util] Unable to refresh vehicle data of <vinsnipped>: 403, message='Forbidden', url=URL('https://msg.volkswagen.de/fs-car/bs/vsr/v1/Audi/DE/vehicles/<vinsnipped>/requests')
2020-10-27 09:15:45 ERROR (MainThread) [custom_components.audiconnect.audi_account] Error refreshing vehicle data <vinsnipped> NoneType: None

I removed my vin for security reasons (replaced with )

do you have a paid audi connect service? i never had it, when i login to audi website, i dont see the tank level anymore, and the other stuff like before … seems also my warranty was expired last week, not sure if thats the cause of it

do you see all info you saw before on the website/app ?

On the site I see all, incl. tank level. I do have the subscription (the car is leased for 3 years with the subscription).

EDIT and in the app

ok, verry strange then :s

how do you refresh data? i want to see if i see the same errors like you

I run the audiconnect.refresh_vehicle_data service (parameter vim: ). That should normally refresh the data from the car.

ah ok, i see the same error :

2020-10-27 18:48:26 ERROR (MainThread) [custom_components.audiconnect.util] Unable to refresh vehicle data of wauxxxx: 403, message='Forbidden', url=URL('https://msg.volkswagen.de/fs-car/bs/vsr/v1/Audi/DE/vehicles/WAUxxxx/requests')
2020-10-27 18:48:26 ERROR (MainThread) [custom_components.audiconnect.audi_account] Error refreshing vehicle data wauxxx
NoneType: None

Yesterday I’ve had contact with the Audi dealer and they solved my ‘problem’ that my account wasn’t registered as an owner of the car.

Unfortunately still only two entities are created when configuring the integration: lock.audi_a3_sportback_door_lock and sensor.audi_a3_sportback_model.

When I try to refresh the data, I still get a ‘bad gateway’ error message:

Changing the region results in not being able to login to the service at all.