Closed FireWizard52 closed 5 months ago
Yeah, thanks for this information.
I already developed the 2FA login for my plugin. Are you able to test the changes ?
I will take a look the the new endpoints tomorrow. If they work, I will add two new sensors.
Hi Linus, you said:
I already developed the 2FA login for my plugin. Are you able to test the changes ?
I saw it, and that you wanted also testers, but as you maybe know I do not use Home Assistant and I'm not a big fan of Docker either. So I'm afraid I will not be of much help.
I work with Node RED and all my automation's are done with that, but as I push them to MQTT, more or less all Home Automation system can be used. Regarding this 2FA I currently work in a little bit different direction.
But cannot test it yet, as Volvo ID server is not working
But let me know if the new sensors work, as my PHEV is still not supported.
Regards
Check the output from the Volvo Server and in case the Volvo ID verification code is requested, I Check my email and Parse the verification code Put it into the verification flow on the right place
This is what I have done with my last changes.
I'm happy to support with testing if needed.
@FireWizard52, I am also using this Tool without HA and without Docker. I just used the folder src and entered my data manually in the const file. Not a big issue.
I'm also happy to Support.
The new endpoint scopes are currently not working. Sorry guys, we have to wait.
The requested scope is invalid, unknown, malformed, or exceeds that which the client is permitted to request.
This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Keep it open.
This issue is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Hi Dielee,
The new endpoints should be available and work now. Would you be so kind to update the endpoints?
{ "status": 200, "data": { "chargingCurrentLimit": { "value": "32", "unit": "ampere", "timestamp": "2024-05-17T17:42:30Z" } },
Hi Dielee,
The new endpoints should be available and work now. Would you be so kind to update the endpoints?
{ "status": 200, "data": { "chargingCurrentLimit": { "value": "32", "unit": "ampere", "timestamp": "2024-05-17T17:42:30Z" } },
Still does not work at my end. When generating a token for scope energy:charging_current_limit
or energy:target_battery_level
I still get response:
{
"error_description": "The requested scope is invalid, unknown, malformed, or exceeds that which the client is permitted to request.",
"error": "invalid_scope"
}
I only get it working when generating test access tokens on developer.volvocars.com
Hi Dielee, The new endpoints should be available and work now. Would you be so kind to update the endpoints? { "status": 200, "data": { "chargingCurrentLimit": { "value": "32", "unit": "ampere", "timestamp": "2024-05-17T17:42:30Z" } },
Still does not work at my end. When generating a token for scope
energy:charging_current_limit
orenergy:target_battery_level
I still get response:{ "error_description": "The requested scope is invalid, unknown, malformed, or exceeds that which the client is permitted to request.", "error": "invalid_scope" }
I only get it working when generating test access tokens on developer.volvocars.com
Is this small signal that these would be released for production use also considering the past - what is your take on this?
Hi Dielee. Thanks for your work on this add on, I know it cannot be easy, given how difficult Volvo's API is. When testing on the Volvo website, it generates a 401 result more often than a 200 result for the same details.
However, I can access the full energy API (recharge-status) pasted below. So happy to help test if you are able to get access to it.
Many thanks.
Request: curl -X 'GET' \ 'https://api.volvocars.com/energy/v1/vehicles/[MY IN]/recharge-status' \ -H 'accept: application/vnd.volvocars.api.energy.vehicledata.v1+json' \ -H 'vcc-api-key: [API KEY]' \ -H 'Authorization: Bearer [redacted]
Response: { "status": 200, "data": { "estimatedChargingTime": { "value": "0", "unit": "minutes", "timestamp": "2024-08-13T18:32:33Z" }, "targetBatteryChargeLevel": { "value": "80", "unit": "percentage", "timestamp": "2024-08-10T07:48:10Z" }, "chargingCurrentLimit": { "value": "32", "unit": "ampere", "timestamp": "2024-08-03T10:06:28Z" }, "batteryChargeLevel": { "value": "79.0", "unit": "percentage", "timestamp": "2024-08-13T18:32:33Z" }, "electricRange": { "value": "320", "unit": "kilometers", "timestamp": "2024-08-13T18:32:33Z" }, "chargingSystemStatus": { "value": "CHARGING_SYSTEM_IDLE", "timestamp": "2024-08-13T18:32:33Z" }, "chargingConnectionStatus": { "value": "CONNECTION_STATUS_DISCONNECTED", "timestamp": "2024-08-13T18:32:33Z" } }, "operationId": "d556b6dd-3afb-4aeb-b93c-56d3ebd3dea4" }
Hi Dielee. Thanks for your work on this add on, I know it cannot be easy, given how difficult Volvo's API is. When testing on the Volvo website, it generates a 401 result more often than a 200 result for the same details.
However, I can access the full energy API (recharge-status) pasted below. So happy to help test if you are able to get access to it.
Many thanks.
Request: curl -X 'GET' '[https://api.volvocars.com/energy/v1/vehicles/[MY](https://api.volvocars.com/energy/v1/vehicles/%5BMY) IN]/recharge-status' -H 'accept: application/vnd.volvocars.api.energy.vehicledata.v1+json' -H 'vcc-api-key: [API KEY]' -H 'Authorization: Bearer [redacted]
Response: { "status": 200, "data": { "estimatedChargingTime": { "value": "0", "unit": "minutes", "timestamp": "2024-08-13T18:32:33Z" }, "targetBatteryChargeLevel": { "value": "80", "unit": "percentage", "timestamp": "2024-08-10T07:48:10Z" }, "chargingCurrentLimit": { "value": "32", "unit": "ampere", "timestamp": "2024-08-03T10:06:28Z" }, "batteryChargeLevel": { "value": "79.0", "unit": "percentage", "timestamp": "2024-08-13T18:32:33Z" }, "electricRange": { "value": "320", "unit": "kilometers", "timestamp": "2024-08-13T18:32:33Z" }, "chargingSystemStatus": { "value": "CHARGING_SYSTEM_IDLE", "timestamp": "2024-08-13T18:32:33Z" }, "chargingConnectionStatus": { "value": "CONNECTION_STATUS_DISCONNECTED", "timestamp": "2024-08-13T18:32:33Z" } }, "operationId": "d556b6dd-3afb-4aeb-b93c-56d3ebd3dea4" }
Did you do the request via Volvo's Developer Portal?
When I request a bearer token for scope energy:target_battery_level
I still get the following response:
{
"error_description": "The requested scope is invalid, unknown, malformed, or exceeds that which the client is permitted to request.",
"error": "invalid_scope"
}
Yes, on the Volvo Developer Portal here: https://developer.volvocars.com/apis/energy/v1/specification/
Yes, on the Volvo Developer Portal here: https://developer.volvocars.com/apis/energy/v1/specification/
Please read the comments above, that's a known issue
Ok. I did read them, but it wasn't clear to me, so thought I'd try to help.
Ok. I did read them, but it wasn't clear to me, so thought I'd try to help.
Sadly we can't do anything about it I believe, waiting for Volvo to fix this.
@Dielee,
Hi Linus,
For your information!
Volvo actually activated 2FA, today at approx. 11 h. If you log-out from your Volvo Cars app and log-in afterwards a Volvo ID-verification code has to be submitted. This code you receive by email ( maybe sms as well ??).
New endpoints for new functionality in the Energy API. See the Energy API, but new are:
However, these new endpoints have also new "scopes" (energy:charging_current_limit and energy:target_battery_level) These scopes are not in the list of scopes and so I have not been able to test already.
Regards