Closed titiviking closed 2 years ago
Same here, just as I restarted HA after an update. Login with the credentials in browser and app is working fine
same issue here: https://github.com/davidgiga1993/AudiAPI/issues/13
BTW, the official way to connect to audi is described here (but very useless, just one update per week is allowed). However, I can't figure out if the document contains some useful information for our use case: https://www.audi.de/dam/nemo/extended-vehicle/ExVe_Technical_Integration_Guide.pdf
same here after a restart today, was fine before
Unfortunately i have to confirm the issue.
Same here
same here
Same. It would be wonderful (and too much to ask) for VW/Audi to give developers API access to their telematics services.
It has been like that for a few days now, since I upgraded to HA 2021.5.
Same error as well, just watching this for a fix
Audi developer changed again API services without any type of communication!
Well, of course they do. What we use here is not exactly approved by Audi to phrase it carefully ;-) I guess they sell this data instead.
Same.
Same here. Watching this for a work around...
see #95
Thank you so much, @t0bias-r !
However, I copied the four changed files into the appropriate folder in HA (twice) and restarted (twice) - for me, it is still giving an error when adding the integration:
On the first try: Ungültige Anmeldeinformationen
Second try: User input malformed
In HA, this is logged: Logger: homeassistant.util.async Source: util/async.py:132 First occurred: 17:37:47 (3 occurrences) Last logged: 17:54:58
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for audiconnect doing I/O at custom_components/audiconnect/audi_services.py, line 612: markets_rsp = idkproxy_session.get(
Sorry, if I am holding it wrong.
Thanks for your investigation and quite extensive rewrite @t0bias-r ! Unfortunately I also get the authentication error, both with a limited and the main user. Both are working on the website. It does not make any difference if I provide a region or not (I guess because DE is default in coding). I don't get anything in the logs, but this might be due to the log level I set.
What happens if you run the test.py
instead?
xxx@i3serv:/usr/share/hassio/homeassistant/custom_components$ python3 test.py
Traceback (most recent call last):
File "test.py", line 5, in
Edit: I resolved the dependencies, but now test.py will not even accept the parameters. Seems like I'm becoming old. python3 test.py --user "x.y@web.de" --password "my-super-password" --spin "9876" --country "DE"
hm...🤔
it seems that there is an issue in test.py
.
pls change from
task = main(main(sys.argv[1:]))
to
task = main(sys.argv[1:])
and try again
I personally don't use home assistant. I just use the code as a systemd service that forwards the received values using Telnet/SSH to a different home automation system.
That means testing on my side is limited. But what I got from the error message is, that Requests
class seems to be not usable in that way.
So I changed the code to use aiohttp requests provided by AudiAPI
class instead of Requests
class.
Thanks again, @t0bias-r . I can confirm that the Login is now working again with the HA integration. There is one small issue, though, that the name and model used to be the same as in the myAudi app - this is now empty.
So now the entities in HA are called 'none'. Does this make sense? I know you do not use HA, but the model / name parameter, which was filled before, seems to be empty now. Does that make any sense? ;)
That made sense, yes. I changed the graphql query to retrieve more information --> see new commit.
Beside renderings and technical specs, the following items can be queried:
"data": {
"userVehicles": [
{
"vin": "WAUZxxxxxxxx",
"mappingVin": "WAUZxxxxxxxx",
"csid": "%csid%",
"commissionNumber": null,
"devicePlatform": "MBB",
"mbbConnect": true,
"userRole": {
"role": "PRIMARY_USER"
},
"vehicle": {
"classification": {
"driveTrain": "PHEV"
}
"core": {
"modelYear": 2020,
"modelCoding": "4KA0WY"
},
"hifa": {
"factoryPickupDateFrom": "2020-xx-yyT06:00:00.000+00:00",
"factoryPickupDateTill": "2020-xx-yyT08:00:00.000+00:00",
"fbDestination": "DEU760 B"
},
"media": {
"shortName": "Audi A7 Sportback TFSI e",
"longName": "Audi A7 Sportback TFSI e 50 TFSI e quattro S tronic"
},
"pdw": {
"pdwVehicle": false
},
},
"nickname": null
}
]
}
It is working back also for me in HA, just have somme errors in my logs about support_preheater, support_charger and support_climater. Don't have those options in my car that's maybe the reason ...
I have to say that I am struggling - I can not add it anymore, no device and entities get made in HA. This is the error that is logged. I double checked and replaced the new files (2):
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: homeassistant.config_entries Source: custom_components/audiconnect/audi_models.py:133 Integration: Audi Connect First occurred: 10:21:24 (1 occurrences) Last logged: 10:21:24
sorry for the big font :-/
It's in the parent folder. You have to manually download it if you want to use it. If you're running supervised (in Docker), you'll have to resolve some dependencies before you can use it (pip install xxx).
Danke @t0bias-r, for me it's working fine again with those changes done by you!
I have to say that I am struggling - I can not add it anymore, no device and entities get made in HA. This is the error that is logged. I double checked and replaced the new files (2):
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: homeassistant.config_entries Source: custom_components/audiconnect/audi_models.py:133 Integration: Audi Connect First occurred: 10:21:24 (1 occurrences) Last logged: 10:21:24
Error setting up entry for audiconnect
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, 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 260, in get_vehicle_information response.parse(vins["data"]) File "/config/custom_components/audiconnect/audi_models.py", line 149, in parse vehicle.parse(item) File "/config/custom_components/audiconnect/audi_models.py", line 133, in parse self.title = nickname NameError: name 'nickname' is not defined
sorry for the big font :-/
You'll have to manually change / copy all 4 files from the commit (ignore test.py). Or wait until @arjenvrh merged it and there's an update in HACS. Then restart HA and it should work.
@derhappy I replaced all 4 files before, sure. Then i replaced the 2 newly changed. I even replaced all 4 again to double check ;) Which dependencies are you referring to?
I fixed the nickname issue. sorry for that.
The dependencies only come up when you try to execute test.py "outside" of your HA environment.
PS: Now i've got this error message too: support_preheater set to False: 502 Logger: custom_components.audiconnect.audi_connect_account Source: custom_components/audiconnect/audi_connect_account.py:557 Integration: Audi Connect
@t0bias-r should there be a new commit?
@t0bias-r should there be a new commit?
This commit https://github.com/arjenvrh/audi_connect_ha/pull/95/commits/ef91bf081d75e39dbc865227b50f0f5199ae86ef / https://github.com/t0bias-r/audi_connect_ha/commit/ef91bf081d75e39dbc865227b50f0f5199ae86ef fixes this error:
File "/config/custom_components/audiconnect/audi_models.py", line 133, in parse self.title = nickname NameError: name 'nickname' is not defined
Yes, with this, for me everything is working again, thank you very much again, @t0bias-r . Your efforts are very much appreciated :) (For the life of me I could not see the commit in the history - maybe it only took some more time.)
thank you, everything is back working again
@t0bias-r should there be a new commit?
This commit ef91bf0 / t0bias-r@ef91bf0 fixes this error:
File "/config/custom_components/audiconnect/audi_models.py", line 133, in parse self.title = nickname NameError: name 'nickname' is not defined
I don't have any "nickname" in audi_models.py
@t0bias-r should there be a new commit?
This commit ef91bf0 / t0bias-r@ef91bf0 fixes this error:
File "/config/custom_components/audiconnect/audi_models.py", line 133, in parse self.title = nickname NameError: name 'nickname' is not defined
I don't have any "nickname" in audi_models.py
Look at this commit ef91bf0 / t0bias-r@ef91bf0 and ensure that your audi_models.py
is up-to-date
The dependencies only come up when you try to execute test.py "outside" of your HA environment.
PS: Now i've got this error message too: support_preheater set to False: 502 Logger: custom_components.audiconnect.audi_connect_account Source: custom_components/audiconnect/audi_connect_account.py:557 Integration: Audi Connect
same here
2021-12-03 20:59:53 ERROR (MainThread) [custom_components.audiconnect.util] Unable to start pre-heater of vehicle wauzzzf22mn075394: 502, message='Bad Gateway', url=URL('https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/rs/v1/Audi/DE/vehicles/WAUZZZXXXXXXXXX/action')
How I can force to update it on HA?
Thanks again, @t0bias-r . I can confirm that the Login is now working again with the HA integration. There is one small issue, though, that the name and model used to be the same as in the myAudi app - this is now empty.
So now the entities in HA are called 'none'. Does this make sense? I know you do not use HA, but the model / name parameter, which was filled before, seems to be empty now. Does that make any sense? ;)
Can you please explain how you did it, as I still have Invalid credentials info when try to add integration...
I replaced the 4 recently changed files from t0bias latest commit in the audiconnect folder on ha. You can also wait, until @arjenvrh merges the pull request and then update via hacs, restart ha and be done.
Has anyone gotten this to work in the US?
Thanks again, @t0bias-r . I can confirm that the Login is now working again with the HA integration. There is one small issue, though, that the name and model used to be the same as in the myAudi app - this is now empty. So now the entities in HA are called 'none'. Does this make sense? I know you do not use HA, but the model / name parameter, which was filled before, seems to be empty now. Does that make any sense? ;)
Can you please explain how you did it, as I still have Invalid credentials info when try to add integration...
I captured the network traffic of the latest Android myAudi app. Then I did some crypto analysis to understand which headers and requests are required
To me it looks like that Audi has changed all APIs not only the login. E.g. the API to enable/disable the climater is completely different to the current implemenation. I suspect that sooner or later these APIs will be disabled, too and have to be re-programmed.
The location doesn't return anything with the patch from @t0bias-r, everything else is currently working.
I replaced the 4 recently changed files from t0bias latest commit in the audiconnect folder on ha. You can also wait, until @arjenvrh merges the pull request and then update via hacs, restart ha and be done.
ok, so:
For me I got invalid credential info.
The dependencies only come up when you try to execute test.py "outside" of your HA environment. PS: Now i've got this error message too: support_preheater set to False: 502 Logger: custom_components.audiconnect.audi_connect_account Source: custom_components/audiconnect/audi_connect_account.py:557 Integration: Audi Connect
same here
2021-12-03 20:59:53 ERROR (MainThread) [custom_components.audiconnect.util] Unable to start pre-heater of vehicle wauzzzf22mn075394: 502, message='Bad Gateway', url=URL('https://fal-3a.prd.eu.dp.vwg-connect.com/fs-car/bs/rs/v1/Audi/DE/vehicles/WAUZZZXXXXXXXXX/action')
To me it looks like that Audi has changed all APIs not only the login. E.g. the API to enable/disable the climater is completely different to the current implemenation. I suspect that sooner or later these APIs will be disabled, too and have to be re-programmed. Currently, enabling the climater does not work on my Audi, too. I just can stop it.
Has anyone gotten this to work in the US?
I've added a piece of code for US support. Please try after applying these changes: https://github.com/t0bias-r/audi_connect_ha/commit/2ade26f26972139e7b3f34d7ab2c6570616588b2
I replaced the 4 recently changed files from t0bias latest commit in the audiconnect folder on ha. You can also wait, until @arjenvrh merges the pull request and then update via hacs, restart ha and be done.
ok, so:
- Replace 4 files in audiconnect folder
- Add integration into Configuration -> Integration
- insert Audi login data
For me I got invalid credential info.
Have you restarted HA? I also deleted the pycache files for good measure but I think that does absolutely nothing 😉
I replaced the 4 recently changed files from t0bias latest commit in the audiconnect folder on ha. You can also wait, until @arjenvrh merges the pull request and then update via hacs, restart ha and be done.
ok, so:
- Replace 4 files in audiconnect folder
- Add integration into Configuration -> Integration
- insert Audi login data
For me I got invalid credential info.
Have you restarted HA? I also deleted the pycache files for good measure but I think that does absolutely nothing 😉
Thanks! After restart works fine. Just I have missed oil level entitie, do you have the same?
Thanks for the "fix", it looks like a total re-write.
I still get these 2 errors: 2021-12-04 10:35:46 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] support_climater set to False: 403 2021-12-04 10:35:46 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] support_charger set to False: 403
Why?
I got those too. My guess is that the API attempt to discover all functionalities, and that those are unavailable for your car.
I'm ignoring those as I don't have preheat or charger anyway, so even on error I don't care about it.
I don't have a support_charger, so that may be a correct error, but I do have a heater - or is it a heater that exists only in e-cars?
2021-11-26 10:50:56 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Login to Audi service failed, trying again in 10 seconds 2021-11-26 10:51:16 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Login to Audi service failed, trying again in 10 seconds 2021-11-26 10:51:28 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Login to Audi service failed: 503, message='Service Unavailable', url=URL('https://app-api.live-my.audi.com/azs/v1/token') 2021-11-26 11:00:02 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Login to Audi service failed, trying again in 10 seconds 2021-11-26 11:00:13 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Login to Audi service failed, trying again in 10 seconds 2021-11-26 11:00:25 ERROR (MainThread) [custom_components.audiconnect.audi_connect_account] Login to Audi service failed: 503, message='Service Unavailable', url=URL('https://app-api.live-my.audi.com/azs/v1/token')
Debug of custom component does not provide more details... HTTP component neither.
providing URL directly in browser does render some error response:
no healthy upstream
I have no clue though if it can be fixed through code by providing a new/correct endpoint, or if the problem is at audi side...