This is a Volvo AAOS Cars to MQTT Home Assistant Addon
This addon will serve the data over MQTT, including Autodiscovery for all supported “sensors”, “binary_sensors”, “locks”, “switches” and “device_trackers”. It allows you to start the climate, lock or unlock, and get a bunch of information from your car.
The add-on has been tested with the Mosquitto MQTTaddon but can also be configured to use any other broker if wanted.
Current Release:
Add this Repo to your HomeAssistant
Supported architectures:
Detailed information can be found inside the GitHub repo:
Average speed always indicates 1 on an XC40 BEV (P8). All other sensors work fine. Tried with debug logging on, but it only catches the tail of it and I can’t download the full logs on mobile.
I have no real use for that particular sensor anyway. Home Assistant can no do things that the Volvo app can’t. Like warm you when you forget to close the sunroof. Or schedule preheating depending on how you set your alarm clock.
I found the engine state here: https://api.volvocars.com/connected-vehicle/v2/vehicles/:vin/engine.
I’m not sure if this endpoint delivers usable data. Maybe some of you can take a look if the engineRunning key delivers real and usable data ?
Thanks, same for me…
I don’t know how the volvo app gets the climate state. There is no API endpoint for this. Maybe someone tries to intercept the app’s communication ?
I have been investigating that exact thing also but not found how the Volvo app gets the climate info.
There is now official API for that, not even in the version 2.0 spec.
I have tried to intercept the iOS apps communication but when I enable my http proxy the app stop to function so I think Volvo has implemented some failsafe mechanism to hinder snopers like us
Yes, thats cert pinning. I know how to get arround this, but had no time until now…
With Frida and a rooted android phone, this should be possible. Maybe I will give it a try tomorrow.
So, good news. Traffic interception is working. I successfully removed SSL pinning.
Let’s see what we can get.
EDIT: They are using the same auth and tokens for their app as we do. That’s nice. If there is an endpoint for the climate state, it will be usable for us.
Maybe if the interception between the app and the Volvo servers works. Until now I can’t sniff the traffic to the car, only the login. But it’s work in progress.
Version 1.6.0 is working great here on my North America (US) 2022 C40 BEV. Happy to see this - thanks for your work on it!
As expected, I’m not getting any Energy sensors (except battery charge level) and Location doesn’t work.
In case you’re inclined to do some more model-related filtering, the C40 BEV currently shows sensors for “Sunroof” and “Tank Lid,” neither of which actually exist!