Python Plugin: Volvo EV

Python and python framework

Moderator: leecollings

Tino4785
Posts: 14
Joined: Sunday 02 April 2017 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by Tino4785 »

How often do you receive an update from the car?

I have set it to 60 seconds, but I don't get such nice updates as above. Should I be patient? Or do I still need to configure something?

Do I need to publish the API app on the Volvo site?
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Python Plugin: Volvo EV

Post by HvdW »

Screenshot_20240218_153449_Firefox.jpg
Screenshot_20240218_153449_Firefox.jpg (308.69 KiB) Viewed 1343 times
Set to 900 seconds (default)
Bugs bug me.
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Python Plugin: Volvo EV

Post by FireWizard »

Hi,

You have 10,000 free calls/day. Polling every endpoint counts as 1 call.

My polling frequency is every 5 minutes. It is a little unclear how Volvo counts.
At the moment (16:00 h) my balance shows: Requests today: 1 783 out of 10 000.

You can check that at your accounts page.
Do I need to publish the API app on the Volvo site?
No, you don´t have to do that, as you will not receive an answer from Volvo.

Regards
akamming
Posts: 337
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

FireWizard wrote: Sunday 18 February 2024 16:05 Hi,

You have 10,000 free calls/day. Polling every endpoint counts as 1 call.

My polling frequency is every 5 minutes. It is a little unclear how Volvo counts.
At the moment (16:00 h) my balance shows: Requests today: 1 783 out of 10 000.

You can check that at your accounts page.
Do I need to publish the API app on the Volvo site?
No, you don´t have to do that, as you will not receive an answer from Volvo.

Regards
Volvo counts every call to an api as 1. The plugin does several calls per “refresh” of the sensors

But no worries you can set the frequency as low as you like. If it’s too low it Will autocorrect to a frequency which doesn’t exceed the Volvo 10k limit per api key
Tino4785
Posts: 14
Joined: Sunday 02 April 2017 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by Tino4785 »

HvdW wrote: Sunday 18 February 2024 15:39 Screenshot_20240218_153449_Firefox.jpg
Set to 900 seconds (default)



"Uhmm, it seems that it's not updating for me, and when I check the Volvo site, I only have 500 calls listed."



2024-02-18 20:09:55.086 Volvo: Pushing 'onCommandCallback' on to queue
2024-02-18 20:09:55.132 Volvo: Processing 'onCommandCallback' message
2024-02-18 20:09:55.132 Volvo: Acquiring GIL for 'onCommandCallback'
2024-02-18 20:09:55.132 Volvo: Calling message handler 'onCommand' on 'module' type object.
2024-02-18 20:09:55.132 Volvo: DEBUG: onCommand called for DeviceUnit 7: Parameter 'On', Level: 0
2024-02-18 20:09:55.132 Volvo: DEBUG: Handle climatization
2024-02-18 20:09:55.133 Volvo: DEBUG: URL: https://api.volvocars.com/connected-veh ... tion-start
2024-02-18 20:09:55.458 Volvo: DEBUG:
2024-02-18 20:09:55.458 Result:
2024-02-18 20:09:55.458 Volvo: DEBUG: <Response [401]>
2024-02-18 20:09:55.460 Volvo: DEBUG:
2024-02-18 20:09:55.460 Result JSON:
2024-02-18 20:09:55.460 Volvo: DEBUG: {
2024-02-18 20:09:55.460 "status": 401,
2024-02-18 20:09:55.460 "error": {
2024-02-18 20:09:55.460 "message": "Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application."
2024-02-18 20:09:55.460 }
2024-02-18 20:09:55.460 }
2024-02-18 20:09:55.460 Volvo: ERROR: climatizatation did not start/stop, webserver returned 401, result: {
2024-02-18 20:09:55.460 "status": 401,
2024-02-18 20:09:55.460 "error": {
2024-02-18 20:09:55.460 "message": "Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application."
2024-02-18 20:09:55.460 }
2024-02-18 20:09:55.460 }
akamming
Posts: 337
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

Tino4785 wrote: Sunday 18 February 2024 19:20
"Uhmm, it seems that it's not updating for me, and when I check the Volvo site, I only have 500 calls listed."



2024-02-18 20:09:55.086 Volvo: Pushing 'onCommandCallback' on to queue
2024-02-18 20:09:55.132 Volvo: Processing 'onCommandCallback' message
2024-02-18 20:09:55.132 Volvo: Acquiring GIL for 'onCommandCallback'
2024-02-18 20:09:55.132 Volvo: Calling message handler 'onCommand' on 'module' type object.
2024-02-18 20:09:55.132 Volvo: DEBUG: onCommand called for DeviceUnit 7: Parameter 'On', Level: 0
2024-02-18 20:09:55.132 Volvo: DEBUG: Handle climatization
2024-02-18 20:09:55.133 Volvo: DEBUG: URL: https://api.volvocars.com/connected-veh ... tion-start
2024-02-18 20:09:55.458 Volvo: DEBUG:
2024-02-18 20:09:55.458 Result:
2024-02-18 20:09:55.458 Volvo: DEBUG: <Response [401]>
2024-02-18 20:09:55.460 Volvo: DEBUG:
2024-02-18 20:09:55.460 Result JSON:
2024-02-18 20:09:55.460 Volvo: DEBUG: {
2024-02-18 20:09:55.460 "status": 401,
2024-02-18 20:09:55.460 "error": {
2024-02-18 20:09:55.460 "message": "Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application."
2024-02-18 20:09:55.460 }
2024-02-18 20:09:55.460 }
2024-02-18 20:09:55.460 Volvo: ERROR: climatizatation did not start/stop, webserver returned 401, result: {
2024-02-18 20:09:55.460 "status": 401,
2024-02-18 20:09:55.460 "error": {
2024-02-18 20:09:55.460 "message": "Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application."
2024-02-18 20:09:55.460 }
2024-02-18 20:09:55.460 }
do you get this "Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application" on some calls or on all calls?

if it's on all calls there might be something wrong with you VCC_API_KEY.

if it's just for some calls: Tt's a pity Volvo doesn't spend more time on professionalizing this whole API interface. I can reproduce the bevaviour by creating a new API key. At first it doesn'nt work at all, then it starts working for some calls and after some time it works for all calls.

Except for 1 API key i now have: It just doesn't work for 2 calls. Apparently there is something wrong on volvo side.

All i can say is: Keep trying (maybe get a new VCC API KEY) and keep it running for a while. Hopefully it will start working...
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Python Plugin: Volvo EV

Post by FireWizard »

To all,

For those not already aware of this and for those, developing their own applications:

I received the following email from Open Innovation Portal <[email protected]>, regarding
Important Notice: Deprecation of Connected Vehicle API Version 1 and Migration to Version 2.
Upgrade now for improved functionality and performance with Version 2 of our Connected Vehicle API.

*Important Notice: Deprecation of Connected Vehicle API Version 1 and Migration notice to* Connected Vehicle API Version 2

Dear Developers,

We want to inform you that the Connected Vehicle API Version 1 will be deprecated and removed from our portal on April 30, 2024.

As you may know, we're continuously striving to improve our services and enhance your experience with our developer portal. In line with this commitment, we are excited to announce the availability of the latest version, Version 2, of our Connected Vehicle API.

Please transition to Version 2 for improved functionality and performance. Explore the latest features here
( https://developer.volvocars.com/apis/co ... /overview/ ).

Connected Vehicle API V2.0 ( https://developer.volvocars.com/apis/co ... /overview/ )

If you need assistance, our support team is here to help - please feel free to get in touch with us at [email protected].

Thank you for your cooperation.

Best regards,

Volvo Cars Developer Portal
akamming
Posts: 337
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

FireWizard wrote: Monday 19 February 2024 14:42 To all,

For those not already aware of this and for those, developing their own applications:

I received the following email from Open Innovation Portal <[email protected]>, regarding
Important Notice: Deprecation of Connected Vehicle API Version 1 and Migration to Version 2.
Upgrade now for improved functionality and performance with Version 2 of our Connected Vehicle API.

*Important Notice: Deprecation of Connected Vehicle API Version 1 and Migration notice to* Connected Vehicle API Version 2

Dear Developers,

We want to inform you that the Connected Vehicle API Version 1 will be deprecated and removed from our portal on April 30, 2024.

As you may know, we're continuously striving to improve our services and enhance your experience with our developer portal. In line with this commitment, we are excited to announce the availability of the latest version, Version 2, of our Connected Vehicle API.

Please transition to Version 2 for improved functionality and performance. Explore the latest features here
( https://developer.volvocars.com/apis/co ... /overview/ ).

Connected Vehicle API V2.0 ( https://developer.volvocars.com/apis/co ... /overview/ )

If you need assistance, our support team is here to help - please feel free to get in touch with us at [email protected].

Thank you for your cooperation.

Best regards,

Volvo Cars Developer Portal
I just got the same email. Nice to see that to do something with the application for an app, at least they register the email account apparently.

ALso weird they refer to [email protected]. The last time this [email protected] responded to me was oct 2022. (with some questions for approval of the app, which i answered and then they never responded again.

UPDATE:

Just checked, Volvo EV plugin is already on V2
Last edited by akamming on Monday 19 February 2024 15:41, edited 1 time in total.
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Python Plugin: Volvo EV

Post by HvdW »

That's not for EV vehicles but for other models I suppose.

This API is available for:
All car models between model year 2015 and 2022 (some endpoints have limited availability).
Bugs bug me.
akamming
Posts: 337
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

HvdW wrote: Monday 19 February 2024 15:34 That's not for EV vehicles but for other models I suppose.

This API is available for:
All car models between model year 2015 and 2022 (some endpoints have limited availability).
connected car API also works for EV. there is an additional API for the specific EV features (the recharge API). The Volvo EV plugin uses both (and also uses the location API).
Tino4785
Posts: 14
Joined: Sunday 02 April 2017 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by Tino4785 »

Hello everyone,
Maybe I'm too impatient, but it's still not updating... When I reset it, it retrieves the data, but then it stops again.

Any tips?
akamming
Posts: 337
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

Tino4785 wrote: Wednesday 21 February 2024 22:01 Hello everyone,
Maybe I'm too impatient, but it's still not updating... When I reset it, it retrieves the data, but then it stops again.

Any tips?
What is your interval set to?
Set debugging to Max and check for errors at the moment of the update
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Python Plugin: Volvo EV

Post by HvdW »

@Tino4785
I had some problems setting up the plugin as well.
I installed and uninstalled several times, changed token @Volvo developers several times and then all @once it happened and it worked.
So..... continue and be patient.
I love the plugin.
Using it mainly for finetuning the battery charging process.
Bugs bug me.
Tino4785
Posts: 14
Joined: Sunday 02 April 2017 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by Tino4785 »

akamming wrote: Thursday 22 February 2024 7:09
Tino4785 wrote: Wednesday 21 February 2024 22:01 Hello everyone,
Maybe I'm too impatient, but it's still not updating... When I reset it, it retrieves the data, but then it stops again.

Any tips?
What is your interval set to?
Set debugging to Max and check for errors at the moment of the update
i have it set to 300 seconds, and I'm not receiving any error messages
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Python Plugin: Volvo EV

Post by HvdW »

So it works?!
Bugs bug me.
Tino4785
Posts: 14
Joined: Sunday 02 April 2017 20:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by Tino4785 »

Thanks everyone for the help, it's working
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: Python Plugin: Volvo EV

Post by HvdW »

The last update from my Volvo was received on 04-04-2024 16:29. (read: it stopped working)
Anyone else having the same issue?
Bugs bug me.
akamming
Posts: 337
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

For me everything still works….
EskildP
Posts: 7
Joined: Monday 29 January 2024 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.3
Location: NO
Contact:

Re: Python Plugin: Volvo EV

Post by EskildP »

Yes, it still works here too :)
piefje
Posts: 11
Joined: Wednesday 03 November 2021 10:10
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by piefje »

2024-05-08 14:16:07.352 xc60: INFO: retreived a XC60, **********, model year 2021
2024-05-08 14:16:07.352 xc60: ERROR: Selected vin is not an EV, not supported by this plugin
2024-05-08 14:16:07.353 xc60: INFO: Updating Devices
2024-05-08 14:16:07.668 xc60: ERROR: VolvoAPI failed calling https://api.volvocars.com/energy/v1/veh ... rge-status, HTTP Statuscode 404
2024-05-08 14:16:07.672 xc60: ERROR: Reponse: {'status': 404, 'operationId': '0e6f0f29-f141-4796-8a7e-534114c9aef9', 'error': {'message': 'NOT_FOUND', 'description': 'Car model is not supported'}}
2024-05-08 14:16:07.672 xc60: ERROR: Updating Recharge Status failed
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests