Volvo2Mqtt: Connect your AAOS Volvo 🚙

Hi.
I have an EX40 2025 for two days now.
Volvo on Call did not show anything so I tried the bridge.
After trying a few parameters it worked here in Austria.

My config:


After logging in and using the OTP method described on GitHub I got this:



To be honest, I don’t know if this is all what is available, but it looks quite good to me, even though spi is “testing only” on the Volvo dev page.

Happy to help if you have any question.

1 Like

So I had to create a new Volvo Id because of reasons and now I cannot add my XC40 BEV to the add-on. I have created a VCCAPIKEY and it seems to work, but the log says this, when starting the add-on:

Sep 08 22:56:25 volvo2mqtt [106] - INFO: Starting volvo2mqtt version v1.9.6
Sep 08 22:56:25 volvo2mqtt [106] - DEBUG: MQTT Credentials - Host core-mosquitto Port: 1883 User: xxx Pass: xxx
Sep 08 22:56:25 volvo2mqtt [106] - INFO: Using login from token file
Sep 08 22:56:25 volvo2mqtt [106] - INFO: Refreshing credentials
Sep 08 22:56:26 volvo2mqtt [106] - DEBUG: VCCAPIKEY xxx works!
Sep 08 22:56:26 volvo2mqtt [106] - DEBUG: [{'key': 'xxx', 'extended': False, 'extended_until': None, 'in_use': False}]
Sep 08 22:56:26 volvo2mqtt [106] - INFO: Using VCCAPIKEY: xxx
Sep 08 22:56:26 volvo2mqtt [106] - DEBUG: [{'key': 'xxx', 'extended': False, 'extended_until': None, 'in_use': True}]
Traceback (most recent call last):
  File "/volvoAAOS2mqtt/main.py", line 15, in <module>
    authorize()
  File "/volvoAAOS2mqtt/volvo.py", line 106, in authorize
    get_vehicles()
  File "/volvoAAOS2mqtt/volvo.py", line 214, in get_vehicles
    raise Exception("No vehicle in account " + settings.volvoData["username"] + " found.")
Exception: No vehicle in account [email protected] found.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

I have replaced all personal data with x’s. As you can see the exception says “No vehicle in account xxx found”. I don’t get the “Waiting for OTP code …” line and no code is sent to my mailbox.

What’s wrong? Is there some stale property (the OTP code?) from before that is messing things up? I have uninstalled and re-installed the add-on to be sure, but still this problem …

@Dielee How do I delete the old token to get a new OTP code?

I can’t find the volvo_otp entity in my Home assistant to enter the otp code
The volvo2mqtt is started and in the log it says:
Sep 09 18:49:01 volvo2mqtt [106] - INFO: Waiting for otp code… Please check your mailbox and post your otp code to the following mqtt topic “volvoAAOS2mqtt/otp_code”. Retry 11/24

Confirm working V60 T6 2023 NL/EUR

Thanks - this is exactly what I was looking for (also running HA Core so needed a docker application).

Unfortunately I keep getting ‘exited error 139’ and have no idea why. Any insight as to what’s could be causing this would be much appreciated.

I think error 139 means segment fault, stack overflow or something like that. Have you tried setting debug=true and also double check all the information you have provided, mqtt ip address, volvo id’s etc.

I’ve set debug=true but the container never starts and so logs are empty. Fairly certain all other info is correct (I run an mqtt broker for z2m) but it doesn’t seem to even reach that stage.

UPDATE: Appears it had to do with the python3.9-slim base image in the dockerfile. 3.9.20-slim works fine.

Nearly there and I get an OTP code by email but the entity text.volvo_otp is not created

*Nevermind. Didn’t install MQTT in addition to MQTT Broker. Once I did was all set. Thanks

Something odd with your host system, try deleting the image and pull it again otherwise you’ll have to look through the host logs to see if there is any clue. Your host is using a supported CPU?

Yes pretty sure it is (rpi5). My understanding is that the 3.9-slim tag should be pulling 3.9.20-slim anyway as it is the latest in the series so I’m not sure why directly referencing 3.9.20-slim works while 3.9-slim does not.

I am in North America and can’t use the add-on any longer. I had installed quite some time ago and then that region became blocked. I turned off the startup of the add-on hoping that as some point it would become available again. I finally decided to uninstall. The uninstall went well but I keep seeing in my log requests for image resources that contain my vin. I thought perhaps there as a card I had created or installed that was making these calls but I don’t see one. Any idea where calls such as -

2024-09-24 09:13:10.577 ERROR (MainThread) [homeassistant.components.image] image.volvo_vin_number_exterior_image: Error getting new image from https://cas.volvocars.com/image/dynamic/MY24_2317/256/exterior-v3/H8/70700/UC0000/R145/TC05/_/2G03/TJ04/TP02/LR02/_/GR03/T101/NP03/TM02/JG02/CB03/EV02/JB0B/T214/LF01/_/VP07/UF02/FH02/_/_/_/TR06/_/default.png?market=se&client=gox-graph|public-api-engineering&angle=1&bg=00000000&w=1920: Client error ‘403 Forbidden’ for url ‘https://cas.volvocars.com/image/dynamic/MY24_2317/256/exterior-v3/H8/70700/UC0000/R145/TC05/_/2G03/TJ04/TP02/LR02/_/GR03/T101/NP03/TM02/JG02/CB03/EV02/JB0B/T214/LF01/_/VP07/UF02/FH02/_/_/_/TR06/_/default.png?market=se&client=gox-graph|public-api-engineering&angle=1&bg=00000000&w=1920’

For more information check: 403 Forbidden - HTTP | MDN

are coming from? I’d like to clean them up.
Thanks

It works like a charm!!
Only sending commands like lock / unlock and activating climate control doesn’t seems to work.
anyone got that working ok?

Volvo still needs to update the API to support the EX30

Nope. In holland it is working with the EX30

Clearly not

Volvo

It is working :wink:

Im really sorry, I should have made it more clear for you; Volvo still needs to update the API to support the lock / unlock and climate control activation.

Ahhh check!

I’m loving having this data to had thanks!!

Re: Battery Target Charge Level : has anybody got this pulling through for EX30?
(I’m using MQTT)