Volvo Cars integration

I am experiencing the exact same issue right now.
A reboot did not help.

I will wait and re-try after some time and report back.

It’s back after taking your suggestion.
Still have a problem as some of the entities did not come back.

can we also read out the wifi MAC addres of the car?

I waited over night and I am still receiving the message:

I know the credentials are correct as I logged out and back into the account on my phone.

I had to uninstall, wait, then re-install. It worked for me then but I was missing some entities related to battery charge status and level.

This is a screenshot of Volvo On Call. That doesn’t work anymore.

If you want to have your Volvo in HA, you’ll need to install my custom integration “Volvo Cars” which uses their new API. See opening post for details.

Be aware that there might be features missing. The reason is that the new API does not support everything of VOC. On the other hand, they provide also some extras. It depends on your model as well.

1 Like

No, that is not reported by the API. You should be able to see it in your router though (when the car is connected to your WiFi).

Please see Recharge Battery Level Missing in 1.4.3 · Issue #111 · thomasddn/ha-volvo-cars · GitHub

Thanks. Volvo issue.

Thanks for this great add-on. I have it working with my EX30 and as well as the usual HA dashboards and information, I have setup to show information on my iPhone nightstand and Lock Screen showing charge % and range (miles).

2 Likes

I need help with this, why am I getting this?

The API returns an error, but due to a bug in parsing the error message, the error could not be shown properly. However, you should have some more details in the logs of Home Assistant. Can you check if there is something relevant?

The error parsing bug has just been fixed in v1.5.0.

Ez a hiba egy egyéni integråcióból szårmazik.

NaplĂł: custom_components.volvo_cars.coordinator
ForrĂĄs: helpers/update_coordinator.py:319
integråció: Volvo Cars (dokumentåció, problémåk)
ElƑször fordult elƑ: 22:06:34 (3 EsemĂ©nyek)
UtoljĂĄra naplĂłzva: 22:06:50

Unexpected error fetching 01JP2X66E7P5X9A32AA97G55HZ data
Traceback (most recent call last):
  File "/config/custom_components/volvo_cars/volvo/api.py", line 232, in _async_request
    response.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1161, in raise_for_status
    raise ClientResponseError(
    ...<5 lines>...
    )
aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url='https://api.volvocars.com/connected-vehicle/v2/vehicles/XXXXXX'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 319, in __wrap_async_setup
    await self._async_setup()
  File "/config/custom_components/volvo_cars/coordinator.py", line 113, in _async_setup
    vehicle = await self.api.async_get_vehicle_details()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/volvo_cars/volvo/api.py", line 141, 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 175, in _async_get_data_dict
    body = await self._async_get(endpoint, operation)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/volvo_cars/volvo/api.py", line 183, in _async_get
    return await self._async_request(hdrs.METH_GET, endpoint, operation)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/volvo_cars/volvo/api.py", line 253, in _async_request
    error = VolvoCarsErrorResult.from_dict(error_data)
  File "/config/custom_components/volvo_cars/volvo/models.py", line 58, in from_dict
    return cls(**class_data)
TypeError: VolvoCarsErrorResult.__init__() missing 1 required positional argument: 'description'

Hi guys, great work on this!

I have three questions:
1: what’s the use of the exterior/interior entities?
2: turn on and off the climatization

does that mean “start the heater” when its cold outside and “start the car” when its warm outside?
in the app you have “start the car” and “start the heater”.
3: central locking, in the old volvo it was an status on all that said locked or unlocked.
Is that not possible with the new one?

Best regards
// Hans

It looks like you’re unauthorized. The integration should ask you to re-authenticate, but you might need to install v1.5.0 first.

1 Like

Hi Hans, glad you love it!

The answers:

  1. Just images you can use on dashboards or in specific vehicle cards. Depending on your model you’ll have one or multiple exterior images.
  2. It will only do climate stuff (heat in winter and cool in summer - I think). I don’t know if the engine will start for non-BEV cars. The “start engine” feature is supported by the API, however the API user is not granted access to it so we are unable to use it.
  3. It is definitely possible. The “central lock” entity shows if the car is locked or unlocked and you can lock or unlock your car with it.

Thanks for the answer, already installed it and it works as expected.
related to no 3, i do not want to have the possibility to unlock/lock from HA, just read the status


2:
On non-bev cars you must start the engine to get the AC to start.
And during cold days you have the petrol/diesel heater running.
I’m only after the heater function.
If i need to start the car, i use the app. more wife safe that way. :slight_smile:

Regards
// Hans

Thanks for the great integration. Using a Dev key to access the API is a great solution I think.

In the API specification it appears that the charging speed can be modified. This would be a great feature for energy management optimization.

Is assume this API call is not yet added?

I have V60 T6 plugin hybrid and a charger with quite some debugging information. So I could defenatly help with testing and if needed with implementation as well.

Where do you find that you can set the charging speed? I only see GET requests, meaning we can only read the setting, but not modify it.

That was quick :wink:
I think you are correct that the API only allows a get. Just assumed there would also be a set, because that would be much more useful :sweat_smile:.
Thanks again for the great integration.