-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undocumented API endpoints for charge control of hybrid vehicles #88
Comments
This would also be really great if we could integrate this feature, I can see that it's currently being used by Homey, and people appear to be using without issue. This would be really valuable for smart charge control. I think it could be done with an addition of a property for charging locations in here: volvooncall/volvooncall/volvooncall.py Line 272 in bacbf6e
and the addition of a call to /chargeLocations/ with the data
but I can't really see how to feed the startTime and endTime through from anywhere - although for my purposes it would probably work to just set the delayedCharging to toggle on and off with startTime and endTime either not set or staying the same as the data from the charge location. |
Just to add - a link to the method used by homey: https://github.com/ricott/homey-com.volvocars/blob/420b9618c11aef3e3507506653c955fde8a49115/drivers/voc/device.js#L453 |
In fact, I've just successfully achieved the same thing using the Home Assistant rest_command feature, which might work for you- add this in to your configuration:
|
just confirming that I am using the API calls without issues to delay the charging of my car in the evening until the sun rises in the morning. I post this to confirm your statement 'people appear to be using without issue'. I am one of those people 😄 Best regards, |
Is this functionality going to be integrated in voc? Unfortunately I lack the programming skills to implement it myself... |
I thought I'd share some more undocumented endpoints that I haven't seen here yet. Didn't want to open a new issue, as it's not a real issue, just info. So hope you don't mind. Hoping others can confirm and add info. I'll be using any additional endpoint for my HomeSeer HS4 Volvo Plugin. GET https://vocapi.wirelesscar.net/customerapi/rest/v3.0/vehicles/VIN/updatestatus Next, some reverse engineering by myself. To set the preclimatization timers: For Timer1: {"timers":{"timer1":{"activate":true,"time":"20:30"}}} Ofcourse activate can be true (=on) or false (=off). And time if in HH:mm, so in 24h format and with leading zero for 00-09. To set the heater timers: And then there's: This may have something to do with setting the day of the week for Timer1 and Timer 2, as seen in the app. But I didn't get any further with this, as my car does not support it. To send a destination to the navigation: Body in JSON should look like this: I have not yet figured out where/how name is used. It seems to be just a truncated version (18 chars incl. "…") of description. Note that you will need 2 additional/alternative headers besides the usual x-originator-type and x-os-type: I will probably have some more. Let me know if there is anything you're still looking for. |
Interesting stuff, thanks for providing more info.
Out of interest what car do you have, year and model?
I had a 2020 XC40 Recharge hybrid before, and it seemed to support all the
app functions and API end points. I've just taken delivery of the 2023 XC90
Recharge T8, and it is missing a load of features in the app, so will be
interesting to see whether the API end points work. For example, I can't
set the charging times, locations or start the charging for the app, and
the driving journal also doesn't work. Have a friend who has a Polestar 2,
which has the same problems. Spoke to Volvo and they said it's a know issue
but no planned fix time.
Will try the API and report back.
…On Mon, 3 Apr 2023, 18:48 BernoldNL, ***@***.***> wrote:
I thought I'd share some more undocumented endpoints that I haven't seen
here yet. Didn't want to open a new issue, as it's not a real issue, just
info. So hope you don't mind. Hoping others can confirm and add info. I'll
be using any additional endpoint for my HomeSeer HS4 Volvo Plugin.
GET
https://vocapi.wirelesscar.net/customerapi/rest/v3.0/vehicles/VIN**/updatestatus
**
I think I first saw this in the code for the Homey implementation. As far
as I know, this updates the status of some items while the car is off.
Things like HV Battery Level (otherwise you will only see each 25%), doors,
etc.
Next, some reverse engineering by myself.
To set the preclimatization timers:
POST
https://vocapi.wirelesscar.net/customerapi/rest/v3.0/vehicles/VIN**/preclimatization/set_timers
**
Body in JSON should look like this:
For Timer1: {"timers":{"timer1":{"activate":true,"time":"20:30"}}}
For Timer2: {"timers":{"timer2":{"activate":true,"time":"20:30"}}}
Ofcourse activate can be true (=on) or false (=off). And time if in HH:mm,
so in 24h format and with leading zero for 00-09.
To set the heater timers:
For cars with a heater, instead of preclimatization, the endpoint seems to
be:
POST
https://vocapi.wirelesscar.net/customerapi/rest/v3.0/vehicles/VIN**/heater/set_timers
**
I would appreciate it if anyone with a heater can test this and confirm.
And then there's:
GET
https://vocapi.wirelesscar.net/customerapi/rest/v3.0/vehicles/VIN**/preclimatization/calendar
**
POST
https://vocapi.wirelesscar.net/customerapi/rest/v3.0/vehicles/VIN**/preclimatization/calendar/updatestatus
**
This may have something to do with setting the day of the week for Timer1
and Timer 2, as seen in the app. But I didn't get any further with this, as
my car does not support it.
To send a destination to the navigation:
POST https://vocapi.wirelesscar.net/customerapi/**rest/vehicles/VIN/pois**
(Note, this is not under v3.0)
Body in JSON should look like this:
{"pois":[{"description":"Description of the location that will be shown in
navigation","name":"Description of
th…","position":{"latitude":51.898943,"longitude":5.194614}}]}
I have not yet figured out where/how name is used. It seems to be just a
truncated version (18 chars incl. "…") of description.
Note that you will need 2 additional/alternative headers besides the usual
x-originator-type and x-os-type:
Content-Type: application/vnd.wirelesscar.com.voc.POIS.v4+json;
charset=utf-8
Accept: application/vnd.wirelesscar.com.voc.Service.v4+json; charset=utf-8
I will probably have some more. Let me know if there is anything you're
still looking for.
—
Reply to this email directly, view it on GitHub
<#88 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEG3D2XLSRZXXGKL6ZBPNRLW7MEQLANCNFSM5ZFH6WVQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
If the new XC90 also has Android Automotive, it will not support the "old" vocapi commands. Please test the following: If that returns "VehicleDoesNotExist" it will not support your vehicle and hence those undocumented API endpoints will not work either. |
I have a Since last week, I am not getting my chargeLocations from my V60 2021 recharge. When issueing:
however, when issueing:
I already tried to remove the chargeLocation from the app, logged out and back in again, removed and reinstalled the app, all without result. This is pretty annoying as this eliminates the possibility to control charging from a script. |
Hello,
Thanks for the code that allows us to interface with VOC.
I am using two undocumented API endpoints to be able to suspend the charge process of my hybrid vehicle.
It might be interesting to add these two endpoints to the code. The first one allows to fetch all known charge locations, the second one allows to control the charge times at a specific charge location.
I have documented the two API endpoints here. I have not yet written the code to be able to create a pull request as I don't know what would be the best way to integrate this feature in the software you wrote.
Best regards,
Lieven.
The text was updated successfully, but these errors were encountered: