Open MikaelHoogen opened 2 years ago
Okey, it's been so much trouble with mine. Starting to think that my car is faulty. Feels like i'm beta testing and pay premium
It's not just you. To be honest, I forgot that I dropped the car off at the dealer a few days ago because there were so many issues and I needed them fixed. I can't test š
Ah it sucks. With each update they fix some bugs and introduce a couple of new ones. Can you get the status of the odometer? Empty in the response for me
Just tested climate:
post: https://api.volvocars.com/connected-vehicle/v1/vehicles/MY-VIN/commands/climatization-start
response: { "status": 202, "operationId": "34c2559a-1f12-4dee-814d-b43f4592a664", "async": { "status": "RUNNING", "id": "65a1d1ff-1642-4980-a842-2c56ebc7f38c", "href": "https://api.volvocars.com/connected-vehicle/v1/vehicles/MY-VIN/requests/65a1d1ff-1642-4980-a842-2c56ebc7f38c", "expires": "2023-08-07T16:26:31Z" } }
Just tested climate:
post: https://api.volvocars.com/connected-vehicle/v1/vehicles/MY-VIN/commands/climatization-start
response:
{ "status": 202, "operationId": "34c2559a-1f12-4dee-814d-b43f4592a664", "async": { "status": "RUNNING", "id": "65a1d1ff-1642-4980-a842-2c56ebc7f38c", "href": "https://api.volvocars.com/connected-vehicle/v1/vehicles/MY-VIN/requests/65a1d1ff-1642-4980-a842-2c56ebc7f38c", "expires": "2023-08-07T16:26:31Z" } }
Fantastic! Looks like we can get the C40 working with Home Assistant šš
I have an early 2022 XC40 and it's still not working. I'm still getting "resource not found" when using my VIN:
{
"status": 404,
"operationId": "3a9b1549-310c-4dc2-9195-2c36a83773b5",
"error": {
"message": "NOT_FOUND",
"description": "resource not found"
}
}
I have an early 2022 XC40 and it's still not working. I'm still getting "resource not found" when using my VIN:
{ "status": 404, "operationId": "3a9b1549-310c-4dc2-9195-2c36a83773b5", "error": { "message": "NOT_FOUND", "description": "resource not found" } }
Same here with my 22.5 XC60 Recharge. I've tried every possible combination of my app's API key, connected vs. extended API access token, both in Postman and using the sandbox, and I get nothing but errors.
I was able to make calls against the Demo vehicle, but when I try against my own account, even when querying my specific vin, which I already know, I get nada.
Maybe the C40 is the only AAOS model this works with so far?
Maybe the C40 is the only AAOS model this works with so far?
If only we had someone from Volvo to tell us what the status is on this. Oh wait...
Has anyone revisited this since the latest update that added CarPlay? Not that it should, but maybe it was a big enough change to have made a difference. I don't see any, but I'm not the best at testing these things. The API documentation still says: "Note: This API works for all connected vehicles up to model year 2021, excluding the XC40 Recharge BEV."
Has anyone revisited this since the latest update that added CarPlay? Not that it should, but maybe it was a big enough change to have made a difference. I don't see any, but I'm not the best at testing these things. The API documentation still says: "Note: This API works for all connected vehicles up to model year 2021, excluding the XC40 Recharge BEV."
As far as I'm aware, we tested on the CarPlay update.
Hi! New API from Volvo just released https://developer.volvocars.com/apis/energy/specification/
This is great! It's only a matter of time until they release an API for the GA cars similar to the connected vehicle API, or even better, update the connected vehicle API to allow it!
P.S. I found an email! developer.portal(at)volvocars.com
Looks like this new API is the way forward, this from the info text:
Note: 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.
seems https://api.volvocars.com/connected-vehicle/v1/vehicles now returns my vehicle VIN too. Which failed previously.
I am not a expert on this, but finnaly manage to get some data from the API
{
"status": 200,
"operationId": "xxx",
"data": {
"batteryChargeLevel": {
"value": "50.0",
"unit": "percentage",
"timestamp": "2022-09-11T13:53:51.900Z"
},
"electricRange": {
"value": "220",
"unit": "kilometers",
"timestamp": "2022-09-11T13:53:51.900Z"
},
"estimatedChargingTime": {
"value": "2047",
"unit": "minutes",
"timestamp": "2022-09-11T13:53:51.900Z"
},
"chargingConnectionStatus": {
"value": "CONNECTION_STATUS_CONNECTED_AC",
"timestamp": "2022-09-11T13:53:51.900Z"
},
"chargingSystemStatus": {
"value": "CHARGING_SYSTEM_IDLE",
"timestamp": "2022-09-11T13:53:51.900Z"
}
}
}
Sorry for spam, but looks like connected API now also work: https://api.volvocars.com/connected-vehicle/v1/vehicles/XXX/battery-charge-level
Response bodyDownload{ "status": 200, "operationId": "xxxy", "data": { "batteryChargeLevel": { "value": "50.0", "unit": "percentage", "timestamp": "2022-09-11T13:53:51.876Z" } } }
Would getting the location of the car work? I know it's a long shot, since it's not even available in the app.
@IceBotYT - no, looks like the API do not has that yet.
Can anyone confirm which models are you suddenly getting data back for? I'm trying again with our 2022.5 XC60 Recharge and still getting nothing.
Get vehicle list:
{
"status": 200,
"operationId": "b4cb362f-8275-4a64-89ff-81febcb29ec8",
"data": [],
"pagination": {
"limit": 0,
"total": 0
}
}
Get details on my VIN:
{
"status": 404,
"operationId": "3b193bbe-7f71-4342-87a8-0918dec734a2",
"error": {
"message": "NOT_FOUND",
"description": "resource not found"
}
}
We're testing with the 2022 C40 Recharge. Is yours a Google Automotive car?
Yep. AAOS. Feels like maybe the APIs are still only working against full EVs (40 models).
Yep. AAOS. Feels like maybe the APIs are still only working against full EVs (40 models).
Hi
Yes, I have a full EV XC40 2022 model.
@rschend I'm not getting anything either, and I have both an XC60 Hybrid (2018) and a C40 EV (2022) on my account. I get the same responses you do: the API request to list vehicles "works," in a sense, in that it authenticates and returns a 200 status code. But the data section of the response is empty. And using my VIN (for either car) returns a 404.
I wonder if it's a regional thing? I'm in North America.
In any case, I appreciate that it's apparently being worked on.
@rschend I'm not getting anything either, and I have both an XC60 Hybrid (2018) and a C40 EV (2022) on my account. I get the same responses you do: the API request to list vehicles "works," in a sense, in that it authenticates and returns a 200 status code. But the data section of the response is empty. And using my VIN (for either car) returns a 404.
I wonder if it's a regional thing? I'm in North America.
In any case, I appreciate that it's apparently being worked on.
Oh that's interesting that not even your 2018 XC60 works, since that's Sensus and afaik, those all still work fine with the API. I was about to say, it feels like Sensus cars still work...and XX40 models on AAOS now work, but all other models on AAOS are left out of the party.
FWIW, I was always able to get responses on the Connected API for our 2019 XC40 (gas only) before we traded it in for this new XC60 Recharge. I wonder if the Sensus-based hybrids ever worked?
Also in NA, by the way.
The older Volvo On Call (VOC) API still works for the 2018 XC60, so it's possible the new Connected API is currently in a semi-broken state I guess, and I'll wait for it to settle down.
I too was able to get info on the XC60 from the Connected API a week or two ago.
I also CAN'T access my 2022 XC40 (Pure Electric) using the new api. I also get error 404.
Also, the old https://api.volvocars.com/connected-vehicle/v1/vehicles is also not showing my VIN....
This new Energy API isn't pulling any data for me. July 2022 XC60 PHEV (AAOS) - UK
curl -X 'GET' \
'https://api.volvocars.com/energy/v1/vehicles/MY-VIN/recharge-status/battery-charge-level?vcc-api-key=<API KEY>' \
-H 'accept: application/vnd.volvocars.api.energy.vehicledata.v1+json' \
-H 'vcc-api-key: <API KEY>' \
-H 'Authorization: Bearer <ACCESS TOKEN>'
{
"status" : 404,
"operationId" : "1f7bfe0e-a840-4145-a925-659218448197",
"error" : {
"message" : "NOT_FOUND",
"description" : "resource not found"
}
}%
This works in Sweden on a XC40 pure:
api.volvocars.com/energy/v1/vehicles/[MY VIN]/recharge-status/battery-charge-level
{
"status": 200,
"operationId": "46d50433-4e88-4378-a163-9177bb02e22b",
"data": {
"batteryChargeLevel": {
"value": "70.0",
"unit": "percentage",
"timestamp": "2022-09-15T07:31:57.855Z"
}
}
}
I have an XC40 pure in Australia and I am getting the āresource not foundā response for a battery charge level request.
I also get a successful (status: 200) but empty response when querying for the list of vehicles for my Volvo ID
This new Energy API isn't pulling any data for me. July 2022 XC60 PHEV (AAOS) - UK
curl -X 'GET' \ 'https://api.volvocars.com/energy/v1/vehicles/MY-VIN/recharge-status/battery-charge-level?vcc-api-key=<API KEY>' \ -H 'accept: application/vnd.volvocars.api.energy.vehicledata.v1+json' \ -H 'vcc-api-key: <API KEY>' \ -H 'Authorization: Bearer <ACCESS TOKEN>' { "status" : 404, "operationId" : "1f7bfe0e-a840-4145-a925-659218448197", "error" : { "message" : "NOT_FOUND", "description" : "resource not found" } }%
Weird. It works for my XC60 Recharge 2022. I also get the data using the connected-vehicle-api. There I can read battery level but not fuel. All endpoints in the energy api works as expected.
I can also use the connected-vehicle-api api to read locked / unlocked of all windows and doors and lock / unlock the car.
This new Energy API isn't pulling any data for me. July 2022 XC60 PHEV (AAOS) - UK
curl -X 'GET' \ 'https://api.volvocars.com/energy/v1/vehicles/MY-VIN/recharge-status/battery-charge-level?vcc-api-key=<API KEY>' \ -H 'accept: application/vnd.volvocars.api.energy.vehicledata.v1+json' \ -H 'vcc-api-key: <API KEY>' \ -H 'Authorization: Bearer <ACCESS TOKEN>' { "status" : 404, "operationId" : "1f7bfe0e-a840-4145-a925-659218448197", "error" : { "message" : "NOT_FOUND", "description" : "resource not found" } }%
Weird. It works for my XC60 Recharge 2022. I also get the data using the connected-vehicle-api. There I can read battery level but not fuel. All endpoints in the energy api works as expected.
I can also use the connected-vehicle-api api to read locked / unlocked of all windows and doors and lock / unlock the car.
For an full electric XC40 it is working, should you not leave the "vcc-api-key=
BTW: did someone already solve the volvo OAuth 2 procedure in their home automation?
https://developer.volvocars.com/apis/docs/authorisation/ _"To start the authorisation process you need to have client credentials for the Volvo ID identity system. This is done by publishing your application on your account page. Once the publishing process is done, we will send you the client credentials needed to continue. The client credentials consist of; a client_id and a client_secret."__
After checking that there was an integration with home assistant (a few months ago) and receiving my new car (xc60 2023) this week, it was with great disappointment that I now realized that the integration is broken for most of us / new cars :| :|
Installed and there are no new entities or errors on the logs.
It would be great if this can get reworked, unfortunately I don't have enough knowledge to help much other then be available to test anything needed!
@molobrakos , is this something that you could help with?
BTW: did someone already solve the volvo OAuth 2 procedure in their home automation?
https://developer.volvocars.com/apis/docs/authorisation/ "To start the authorisation process you need to have client credentials for the Volvo ID identity system. This is done by publishing your application on your account page.
At the "application" submission, you also need a legal disclaimer of your application. I've a draft available for my node Red configuration, but has someone already created this in the past already?
In commercial solutions you would have 1 application (and secret/id) handling multiple users (Volvo IDs). In my "application" (the node red flow) I would like to have 1 application (and secret/id) handling only 1 (your own) Volvo ID.
BTW: my node-red configuration is inspired from https://github.com/FireWizard52/Volvo-Extended-Vehicle-API-to-Domoticz
I have created a request to get appsecret and id. Let's see what they say.
I would assume that secret / id could be included in the integration, as the user has to authenticate and redirect against volvo (much like the apps).
I have created a request to get appsecret and id. Let's see what they say.
I would assume that secret / id could be included in the integration, as the user has to authenticate and redirect against volvo (much like the apps).
Any update on this topic or the request for an appsecret? got my new C40 Recharge on friday and was hoping for an integration so i can plan my charging.
I tested https://github.com/FireWizard52/Volvo-Extended-Vehicle-API-to-Domoticz in Node Red for som statuses, but this dos not contain any energy information
I was also thinking about requesting an app secret. shillbom did you create any github project which you've referenced in your request?
@odin- I tried to explain the situation in the free text fields. I still havenāt heard anything from them.
letās see what they say. If anyone gets a hold of appid / secret I can help add the new logic to the integration :)
@shillbom excellent. Waiting eagerly for an answer. Or perhaps it should be a totally new integration? Dunno if they can coexist in a good way, then the API needs to be selected somewhere?
Update: The Volvo Cars app has now been updated to include the car's location and range now. This might mean the API changes mentioned before are probably complete now.
Exciting news! I just checked the Connected Vehicle API, and C40 and other AAOS cars are now supported!!!!
Edit: I am wrong. Read it again.
@IceBotYT Exciting! Location is very important if you want to automate. Like locking doors when at home and at night.
@odin- Still havenāt heard anything. I was thinking about if we could extract the keys from the android app or something? Havenāt had time to investigate more :(
@IceBotYT I hate to pour cold water on things - but that announcement reads to me as all models EXCEPT AAOS models are supported.
And North America is still excluded, so I'll continue to sit this one out for now. It definitely is progress that the app and the API documentation site have been updated, though, so that's good.
@IceBotYT I hate to pour cold water on things - but that announcement reads to me as all models EXCEPT AAOS models are supported.
I just reread it. I feel like an idiot š
Sorry to cause the confusion!
@shillbom :-(. I am thinking to use some kind of hack to update the key every hour. Web scraping using Selenium and Python.
Did some experiments, however got stuck at two factor authentication if logging in either using Google or GitHub. Perhaps I should have a GitHub account without two factor I can use...
Also I had problems finding the "Log in" button @ Volvo Developer by using Selenium. However that got solved when I used the Chrome Selenium IDE add-on and tried to "record" the sequence.
Hi everyone,
Just for me to understand, are the more recent cars from Volvo with AAOS not supported at all by the Volvo integration on HA? If so this is because Volvo hasn't created a way to get that information or because the integration on HA needs to be upgraded? Kind regards!
AAOS Volvos are not supported by the Volvo integration. This is because Volvo has not released support for an official API yet.
Actually, Volvo HAS released the new Energy API integration for AAOS cars, but it is still not available in some countries (only Europe and Asia)
Em qui., 17 de nov. de 2022 Ć s 18:22, IceBotYT @.***> escreveu:
AAOS Volvos are not supported by the Volvo integration. This is because Volvo has not released support for an official API yet.
ā Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/61785#issuecomment-1319221826, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLJAEMRUVTVSRSTDKOTKHDWI2O2BANCNFSM5KAO57KA . You are receiving this because you were mentioned.Message ID: @.***>
--
Rafael Rocha Levy Cel: +55 11 9 9631-3901
@odin- Did you get anywhere with the scraper? If you have something that might run on a RPi I can try to help.
The main issue I want to fix is to schedule charging. As of now my charge box turns on at 22:00 but the car is sleeping so it does not start charging... I have to wake it up using the app or by locking the doors. So silly. I bought a SwitchBot to press the car key but it's to weak so I'm going to build something with Lego to make it work.
@shillbom I think I need to create an additional Gmail account without two factory authentication as scraping cannot get passed Gmail login on Volvo Dev site.
But haven't had time yet :-(
ioBroker Community built a working Integration for AAOS. It works without Oauth - you just need a vcc api key https://github.com/TA2k/ioBroker.volvo
ioBroker Community built a working Integration for AAOS. It works without Oauth - you just need a vcc api key https://github.com/TA2k/ioBroker.volvo
I'm not familiar with ioBroker, but that looks interesting. How is it working behind the scenes though - scraping?
Edit: it looks as though it might be possible to connect HA to ioBroker (using MQTT, or an integration which appears to only work HA-->ioBroker but I may be wrong). However that seems overcomplicated to me, unless ioBroker is providing a lot of value.
The problem
Hello
I'm trying to use the Volvo integration. It doesn't work for me. When i'm reading the api documentation there is a OAuth 2.0 authorization with tokens. The only thing you can use in the integration is user and password. I don't understand how that is supposed to work?
https://developer.volvocars.com/volvo-api/connected-vehicle/
What version of Home Assistant Core has the issue?
2021.12
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Volvo On Call
Link to integration documentation on our website
https://www.home-assistant.io/integrations/volvooncall/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response