audiconnect / audi_connect_ha

Adds an audi connect integration to home assistant
MIT License
237 stars 97 forks source link

Error setting up audiconnect #79

Closed dsantanu closed 3 years ago

dsantanu commented 3 years ago

Hi there,

Everytime I enter the info, I get this failure:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 269, 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 105, in update
    vehicles_response = await self._audi_service.get_vehicle_information()
  File "/config/custom_components/audiconnect/audi_services.py", line 194, in get_vehicle_information
    data = await self._api.get(
  File "/config/custom_components/audiconnect/audi_api.py", line 72, in get
    r = await self.request(
  File "/config/custom_components/audiconnect/audi_api.py", line 55, in request
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url=URL('https://msg.audi.de/myaudi/vehicle-management/v2/vehicles')

What am I missing? Also, what is actually the S-PIN - is it the 10-digit code that comes with the key? Is it failing b'cuz of that?

-S

otterlo commented 3 years ago

i am having same issue whilst i had a full functional integration, i can also not login into audi anymore, perhaps Audi is having server trouble

dsantanu commented 3 years ago

there are some issues with my.audi.com since this morning I think; it's slow but can login eventually. But my actual question was what is exactly that S-PIN?

otterlo commented 3 years ago

I believe that s pin is available in your audi account. I was checking this right now but i cant login anynore due to server trouble

Keulov commented 3 years ago

same issue for me:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 269, 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 105, in update vehicles_response = await self._audi_service.get_vehicle_information() File "/config/custom_components/audiconnect/audi_services.py", line 194, in get_vehicle_information data = await self._api.get( File "/config/custom_components/audiconnect/audi_api.py", line 72, in get r = await self.request( File "/config/custom_components/audiconnect/audi_api.py", line 55, in request raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('https://msg.audi.de/myaudi/vehicle-management/v2/vehicles')

But I don't see a problem using the connect app which is working correctly.

Keulov commented 3 years ago

Sorry for my last comment. Have now seen that my.audi.com isn't available. Guess it will work after fixing maintenance.

dsantanu commented 3 years ago

my.audi.com is now back but I'm still not sure about what that S-PIN is. I cannot find any PIN/Number in my.audi.com account at all. Documentation should really explain a bit on that.

dsantanu commented 3 years ago

okay, I found the PIN: Now it's under Equipment Details in my.audi.com but something definitely wrong with this plugin now - I'm still getting: Failed to setup

dsantanu commented 3 years ago

Okay, I take back what I said - it's working now. It started working after restarting HA.

otterlo commented 3 years ago

Enjoy!