Looks like Volvo released support for a new API, possibel to add this to current integration?
from the site:
This API works for all plug-in hybrid and electric vehicles which are equipped with Google Automotive System (Google built-in). Recharge status data is updated both when the vehicle is parked (key-off) and when a charging session is initiated.
Looks interesting, someone with coding skills should really take a look at this, as the new cars done support / does not show up in the current volvo-on-call integration
I’ve played around with the new API and added a sensor to HA in configuration.yaml. I got a Volvo XC60 2022 with Google and I’ve been waiting for this “update” for over a year :-).
I have a B4 model, and I’m seeking for an integration that will allow me to heat my car, lock it, open it, geolocalize it… this seems to be a no go…
All of these features were possible before Volvo switched to Google automotive. what a regression.
Their integrated OS is SO BAD I had to buy an iphone and use carplay instead of it. Shame on you Volvo.
I worked on this one today since I just received my new 2023 XC40 recharge. With the help of some other implementations (iotbroker), I was able to set up the password grant_type which is somehow not documented, maybe the guys over there did some reverse engineering of the Volvo Cars app or something.
That means I am now able to properly list the information of my car (Connected Vehicle API and Energy API) and expose this stuff to HA without the need to set up the authorization_code flow and therefore a published Volvo app with proper redirect URLs.
Since this a pretty hacky solution I believe the guys at HA won’t allow this as a “proper” integration, so I will invest some time and provide some sort of custom integration for the ones that are interested in it here. But it will surely take me some time to prepare everything, my current test code is written in node_red which is not ideal for simple usage
Since the APIs are currently only available in Europe / Middle East / Africa this will most likely not work for our American / Asian friends, I am not sure though since the docs only mention “published” applications, which is not a requirement in this case.
I just realized that a proper implementation using the flow suggested by Volvo should be possible with the My Home Assistant mechanic.
Unfortunately, I am not able to test it until Volvo accepted and published my application. Using the code flow is only possible once your app is reviewed and published, but it is not possible to test it the intended way until Volvo reviewed and published it, which seems really stupid…
Anyways, I will keep you posted once I got an update from the Volvo dev team.
This won’t work since a lot of custom nodes stuff is going on and it is somewhat broken anyways, but I can provide you my TS example that I used to verify if my setup is working.
Maybe this will help you as well
I know it is ugly, but it might point you in a working direction as long as I have no feedback from Volvo.
@selstam I have absolutely no idea, that is why I described it as “hacky”… I got this part from the iobroker implementation. Since the current Vovlo Cars App is still using the password-flow, I guess to maintain compatibility with “older” cars, someone might have just sniffed this one from the Volvo App or something. Did not verify that though…
Anyway, I’ll be coding a .net bridge for the API calls and assemble it in a REST-based sensor in HASS. Hacky as you say, yes! The bridge will refresh the access token periodically so as long as the application is available it should work - at least until someone gets a complete flow working.
Yeah, the climatization stuff seems quite unpredictable at the moment somehow. I am sometimes able to start it via curl (with some weird errors popping up in the app afterward), but never with my axios implementation - maybe there are some differences in handling empty POST bodies.
But it is not reliable in general, since the API will be changed in an upcoming release, whenever this may be, Volvo may have realized that the implementation is kinda buggy…
Steven, which country are you from please? When I fire up ioBroker and successfully log on to the Volvo service, it states that I have 0 vehicles. I’m in Australia so my assumption is that this is an API call and we are still region blocked.