-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding XC40 2019 Diesel fails #33
Comments
Can you:
|
home-assistant_volvo_cars_2025-01-10T15-43-46.159Z.log Done, if you need more info - let met know :) |
I see what the issue is: "No relationship to UUID". You probably don't have access to that car with the specified account. Do you see both cars on https://www.volvocars.com/uk/account/my-cars/? Forgot to say this, and it's not the cause of the problem, but don't use the same API key for both cars, unless you'll set the update interval to a larger value. You can create multiple API keys. |
So I restarted HA so that the log would be easier to clean up. I deleted the previous XC40 entry, disabled the V90 entry and enabled debug logging. I then added the XC40 entry and it worked! I then re-enabled the V90 entry and that's working too. I did not see your comments about UUID before doing this. So I guess what I should do is delete the XC40 again, set up a new API key and then re-add the XC40 with the new API key? I have the debug log if you would like it but I guess it will show it going through without any problem? |
That is one option. The second option is to set a higher update interval on both entries. Look for the "Data update interval" entity of both cars. In a next release there will be an option to change the API key without needing to re-configure the entry. Then you could lower the interval again.
I don't need it for now. |
I am getting a problem adding a second car. My first car (V90 XC 2021) works fine and the level of information is great! When I do 'add entry' for the second car (XC40 2019 Diesel) it fails to initialise. It keeps retrying so I have disabled it. The system log has the following error info (I have removed the VIN and replaced with '*'):
Logger: custom_components.volvo_cars.coordinator
Source: helpers/update_coordinator.py:321
integration: Volvo Cars (documentation, issues)
First occurred: 12:42:49 (23 occurrences)
Last logged: 13:43:43
Unexpected error fetching XC40 data
Traceback (most recent call last):
File "/config/custom_components/volvo_cars/volvo/api.py", line 210, in _async_request
response.raise_for_status()
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1158, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url='https://api.volvocars.com/connected-vehicle/v2/vehicles/***********************'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 321, in __wrap_async_setup
await self._async_setup()
File "/config/custom_components/volvo_cars/coordinator.py", line 105, in _async_setup
vehicle = await self.api.async_get_vehicle_details()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/volvo_cars/volvo/api.py", line 132, in async_get_vehicle_details
data = await self._async_get_data_dict(_API_CONNECTED_ENDPOINT, "")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/volvo_cars/volvo/api.py", line 164, in _async_get_data_dict
body = await self._async_get(endpoint, operation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/volvo_cars/volvo/api.py", line 172, in _async_get
return await self._async_request(hdrs.METH_GET, endpoint, operation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/volvo_cars/volvo/api.py", line 218, in _async_request
raise VolvoAuthException from ex
custom_components.volvo_cars.volvo.models.VolvoAuthException
I can see both cars in the app and can switch between them etc. I am using the same Volvo ID login details for both entries, I am using the same API key for both vehicles. The VIN is obviously different and the Friendly name is different.
I am doing something wrong?
Originally posted by @MJBirtwistle in #3 (comment)
The text was updated successfully, but these errors were encountered: