audi_connect_ha icon indicating copy to clipboard operation
audi_connect_ha copied to clipboard

Audi sometimes lost connection

Open dnl0319 opened this issue 3 years ago • 9 comments

Hello everyone,

I have the problem that after some time the integration lose the connection to the car. Does someone known why this happens?

This is what it looks like: image image image

dnl0319 avatar Jan 22 '22 17:01 dnl0319

I see similar issues

t0bias-r avatar Jan 29 '22 07:01 t0bias-r

I have the same issue

chemgeek avatar Jan 30 '22 09:01 chemgeek

Issue is referenced here: https://github.com/davidgiga1993/AudiAPI/issues/13#issuecomment-1024899210

I don't have the required knowledge to change the code... can anyone have a look and give it a go ?

should be somewhere around here I guess:

         # Now parse the html body and extract the target url, csfr token and other required parameters
        html = BeautifulSoup(page_reply, "html.parser")
        form_tag = html.find("form")

        form_inputs = html.find_all("input", attrs={"type": "hidden"})
        for form_input in form_inputs:
            name = form_input.get("name")
            form_data[name] = form_input.get("value")```

titiviking avatar Jan 31 '22 14:01 titiviking

audi changed something in the login at the end of last week. pls test #110

t0bias-r avatar Jan 31 '22 14:01 t0bias-r

Yep, thanks a lot. Does it for me. ;-)

titiviking avatar Jan 31 '22 14:01 titiviking

Same here, since yesterday I get this error message.

Tested removing the integration and uploading it again, but it is not possible to set it up hmm.

Login to Audi service failed: 'NoneType' object has no attribute 'get' 18:11:34 – (ERROR) Audi Connect (custom integration) Login to Audi service failed, trying again in 10 seconds 18:11:23 – (ERROR) Audi Connect (custom integration) - message first occurred at 18:11:13 and shows up 2 times

HaxxHaris avatar Jan 31 '22 17:01 HaxxHaris

Same here, since yesterday I get this error message.

Tested removing the integration and uploading it again, but it is not possible to set it up hmm.

Login to Audi service failed: 'NoneType' object has no attribute 'get' 18:11:34 – (ERROR) Audi Connect (custom integration) Login to Audi service failed, trying again in 10 seconds 18:11:23 – (ERROR) Audi Connect (custom integration) - message first occurred at 18:11:13 and shows up 2 times

You have to apply this PR #110

t0bias-r avatar Jan 31 '22 17:01 t0bias-r

Thanks t0bias-r it worked! Do not understand how I could miss your post

HaxxHaris avatar Jan 31 '22 17:01 HaxxHaris

I talked too soon I guess... I'm still facing issues...

ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Unable to obtain the vehicle status report of WAXXXXXXXXXX005XXX: Cannot connect to host fal-3a.prd.eu.dp.vwg-connect.com:443 ssl:default [Try again]

And I also face these errors now after a restart:

2022-02-02 11:00:27 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Unable to obtain the vehicle longTerm tripdata of WAXXXXXXXXXX005XXX: 403, message='Forbidden', url=URL('https://mal-3a.prd.eu.dp.vwg-connect.com/api/bs/tripstatistics/v1/vehicles/WAXXXXXXXXXX005XXX/tripdata/longTerm?type=list&from=1970-01-01T00:00:00Z&to=2022-02-02T11:30:27Z')

Searching the web, it looks like hte Skoda API is almost exactly the same as the Audi API. They seem to have implemented a fix for the latter error message: https://github.com/lendy007/homeassistant-skodaconnect/issues/8

Perhaps some of those implementations can be retro-fitted in this Audi integration ?

titiviking avatar Feb 02 '22 08:02 titiviking