-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[VolvoOnCall] Cars after 2021 are not supported #13607
Comments
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/volvo-oncall-binding/59605/115 |
Yes, indeed! Would be great to integrate it for future Volvo Cars. I am not sure, but you need to authenticate your app with an open URL in order to get permanent access to the API. Did someone try it with success? |
I think there is some progress in using the new API. Someone developed an adapter for io broker. Maybe this information could help developing an addon for openhab as well? https://forum.iobroker.net/topic/29172/tester-adapter-volvo-on-call-und-android-automotive |
Yes, this works. I have tested this in javascript and python. Getting the access token to use in the Bearer Authentication works fine when using the following URL, Headers and post-data:
After authentication, the following API can be used: The other APIs seem to not work. Note that I have succesfully tested the following calls on my Volvo XC40 Pure-electric (P8):
A lot needs to be changed to use this other API. I think it would be better to create a new binding (for instance volvoconnectedvehicle), though probably much can be reused from the previous volvooncall binding... If needed I can test and help with the development. I just do not have much Java experience... I have also posted some details in the following repo (as I originally helped with the original volvooncall code in that repo many years ago): Regards, Nika. |
Posting my rules here: Gonna try to make the items file as well (created them manually now)... |
Hi ... I am trying to use your statement with curl but no success... maybe you can help here?
Im unsure about the Bae64 encoding... I encoded: myEmail@domain:myPW thanks a lot for you help! |
This works in curl:
Or in Windows:
|
yeah thanks a lot.. I just got it working adapting your python code... but I dont understand what you encoded in the Bas64 ... I thought it must be my credentials ... but now Im just using your code... what is that?! |
data-urlencode just changes spaces to %20 and adds ampersant to multiple parameters... there's no base64 of that part. The Authorization key is a key that was "found" elsewere to perform that oauth2 authentication as required by Volvo |
ok anyway "elsewere" is good so far ;) This works fine with a code generated from the sandbox (and the real car) |
ok seems to be the scope the call is not in there.. with AC start it worked ! |
one last thing: did you manage to get the recharge or SOC information of your car?
I tried : recharge-status and battery-charge-level |
I just tested the API Calls with another VolvoID and another XC90 Car.. there also the Battery Charge Level Endpoints ( and the whole EnergyAPI) returns empty data fields ... is it possible that it has something to do with the "found" base64 encoded key?? |
I don't think so as the same problem exists when using the hourly key you can generate for each API from your developer account. Technically though, all of the things passed to the APIs (oauth2 authorization key, username/password provided in the oauth2 call and vcc-api-key provided in the API-calls) could influence the scope of the calls returned by the APIs. For username/password we know it restrict what vins are returned. vcc-api-key just authorizes as far as we can see from the API, but you never know. Only Volvo developers could shed a light on this, maybe someone should try and log a ticket? I would not specifically mention the use of the oauth2 authorization key though, as they might then start to ask questions where we got it... |
you're right, with the hourly key its the same... so it might nothing to do with the your key ... |
I assume that the empty fields depends on this base64 encoded clientID/pw. If you try to send a publishing request for your application in the https://developer.volvocars.com/ Portal, you need to select the scopes that your application is using. There are all API endpoints listed. When I generate a test token for my own car via https://developer.volvocars.com/apis/docs/test-access-tokens/, I get a value back for Battery Charge Level. When I try it with a requested access token via the "found" key, the value is empty |
New vehicles aren't supported, we need to use the new API.
The Volvo API (called connected vehicle) does not support vehicles after 2021 : https://developer.volvocars.com/apis/connected-vehicle/overview/. I think it is the one we currently use.
There are two others API which we can use :
We need to "wrap" this new API in the add-on. I'm not able to do it on my own, but I'm ready to help and test.
The text was updated successfully, but these errors were encountered: