Python Plugin: Volvo EV

Python and python framework

Moderator: leecollings

joostvanderlinde
Posts: 46
Joined: Tuesday 23 June 2015 23:06
Target OS: Linux
Domoticz version: 2023.2
Location: NL + SE
Contact:

Re: Python Plugin: Volvo EV

Post by joostvanderlinde »

akamming wrote: Monday 29 January 2024 7:43
HvdW wrote: Sunday 28 January 2024 20:53 Hi @akamming
There is an option that hasn't been added in de python plugin yet.
It is reading and setting charging amperage.
I'd be very happy if it could be added.
Would serve well to balance PV output and home power consumption where the car can be charged from excess solar energy.
Please look at the documentation: the plug-in is Only a wrapper around the API. If a feature is not present in the API infantiele make it available in the plug-in

API docs can be found Here: https://developer.volvocars.com/apis/
Plus: Generally charging amperage cannot be set from the car. That has to be done from the chargepoint! This is not a Volvo specific issue, but generic for all EV charging challenges.
So in order to get a proper load balancing one should:
1. Start/stop charge from the car (cannot be done reliably from chargepoint
2. Adjust charge amperage from chargepoint
Domoticz on BPI-M2-Pro (compiled on Ubuntu 22.04) and RPI (binary on Raspian 10)
RFXCom, Sonoff Zigbee stick, eBusd Adapter 5, P1, S0, Husdata H60 integration
Zigbee2MQTT AD, MQTT local, AirconWithMe, Ebusd, VolvoRecharge, PSA Car Controller
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 »

Idea for plugin enhancement:
This plugin gives a vast number of devices, some of them will be of no interest for all users. Would be nice to have options in the setup to select the different APIs available.

Besides, links in Features in README.md needs updates :)
HvdW
Posts: 612
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 »

Interesting.
First off.
@akamming you're right. I didn't take a look at the Volvo API before asking. Sorry for that.
akamming wrote: Monday 29 January 2024 7:43 Please look at the documentation: the plug-in is Only a wrapper around the API. If a feature is not present in the API I cannot make it available in the plug-in
@joostvanderlinde
joostvanderlinde wrote: Monday 29 January 2024 11:48 Plus: Generally charging amperage cannot be set from the car. That has to be done from the chargepoint! This is not a Volvo specific issue, but generic for all EV charging challenges.
So in order to get a proper load balancing one should:
1. Start/stop charge from the car (cannot be done reliably from chargepoint
2. Adjust charge amperage from chargepoint
Volvo has designed to set charging amperage from the car.
What's wrong with start/stop charging from the charge point?
What's wrong with setting charging amperage from the car?
From my point of view (I am more or less unaware about electric circuits) it doesn't matter where the changes are being made; in the house, in the charging point or in the car.
If somewhere in the system a change from another point is not 'accepted' then it is a design flaw.

@EskildP
EskildP wrote: Friday 02 February 2024 10:32 Idea for plugin enhancement:
This plugin gives a vast number of devices, some of them will be of no interest for all users. Would be nice to have options in the setup to select the different APIs available.
Nice suggestion!

Thanks to the plugin I have been able to automate the battery charging of my car. :) :)
Bugs bug me.
akamming
Posts: 367
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

EskildP wrote: Friday 02 February 2024 10:32 Idea for plugin enhancement:
This plugin gives a vast number of devices, some of them will be of no interest for all users. Would be nice to have options in the setup to select the different APIs available.

Besides, links in Features in README.md needs updates :)
Just set devices which are not of interest as inactive in the domoticz device list and they won’t appear anywhere in domoticz
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 »

akamming wrote: Friday 02 February 2024 11:17
EskildP wrote: Friday 02 February 2024 10:32 Idea for plugin enhancement:
This plugin gives a vast number of devices, some of them will be of no interest for all users. Would be nice to have options in the setup to select the different APIs available.

Besides, links in Features in README.md needs updates :)
Just set devices which are not of interest as inactive in the domoticz device list and they won’t appear anywhere in domoticz
Did just that workaround. As I only use a few, it was quite a job ;)
akamming
Posts: 367
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

EskildP wrote: Friday 02 February 2024 12:32
Did just that workaround. As I only use a few, it was quite a job ;)
Fair point, changed to default so now devices are added as inactive.
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 Domoticz,

I've installed the Volvo plugin, which is a great app, but it's not updating. I've set it to update every 60 seconds...

Do you have any tips?

Thanks
akamming
Posts: 367
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: Tuesday 13 February 2024 19:45 Hello Domoticz,

I've installed the Volvo plugin, which is a great app, but it's not updating. I've set it to update every 60 seconds...

Do you have any tips?

Thanks
In plug-in settings set debug level to maximum and check the domoticz logging
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 »

This is what i get


.034 Volvo: Pushing 'onHeartbeatCallback' on to queue
2024-02-14 19:18:53.085 Volvo: Processing 'onHeartbeatCallback' message
2024-02-14 19:18:53.085 Volvo: Acquiring GIL for 'onHeartbeatCallback'
2024-02-14 19:18:53.085 Volvo: Calling message handler 'onHeartbeat' on 'module' type object.
2024-02-14 19:18:53.085 Volvo: DEBUG: onHeartbeat called
2024-02-14 19:18:53.085 Volvo: DEBUG: Heartbeat() called
2024-02-14 19:18:53.085 Volvo: DEBUG: Not refreshing token, expires in 217.2728819847107 seconds
2024-02-14 19:18:53.085 Volvo: DEBUG: Already exists
2024-02-14 19:18:53.085 Volvo: DEBUG: Climatization switched off, do nothing
2024-02-14 19:18:53.085 Volvo: DEBUG: Not updating, 54.015886545181274 to update
2024-02-14 19:18:53.085 Volvo: DEBUG: No ABRP token and/or apikey, ignoring
2024-02-14 19:18:53.085 Volvo: Acquiring GIL for 'onHeartbeatCallback'
akamming
Posts: 367
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

That’s Only a part of the logging. Pls post the full logging
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 »

I hope this is oke :)


2024-02-14 20:59:03.765 Result:
2024-02-14 20:59:03.765 Volvo: DEBUG: <Response [401]>
2024-02-14 20:59:03.765 Volvo: ERROR: VolvoAPI failed calling//api.volvocars.com/connected-vehicle/v2/vehicles//odometer, HTTP Statuscode 401
2024-02-14 20:59:03.767 Volvo: ERROR: Reponse: {'status': 401, 'error': {'message': 'Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application.'}}
2024-02-14 20:59:03.767 Volvo: DEBUG: GetTyreStatus() called
2024-02-14 20:59:03.767 Volvo: DEBUG: VolvoAPI(https://api.volvocars.com/connected-veh ... ation/json) called
2024-02-14 20:59:04.103 Volvo: DEBUG:
2024-02-14 20:59:04.103 Result:
2024-02-14 20:59:04.103 Volvo: DEBUG: <Response [200]>
2024-02-14 20:59:04.105 Volvo: DEBUG:
2024-02-14 20:59:04.105 Result JSON:
2024-02-14 20:59:04.105 Volvo: DEBUG: {
2024-02-14 20:59:04.105 "data": {
2024-02-14 20:59:04.105 "frontLeft": {
2024-02-14 20:59:04.105 "value": "NO_WARNING",
2024-02-14 20:59:04.105 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:04.105 },
2024-02-14 20:59:04.105 "frontRight": {
2024-02-14 20:59:04.105 "value": "NO_WARNING",
2024-02-14 20:59:04.105 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:04.105 },
2024-02-14 20:59:04.105 "rearLeft": {
2024-02-14 20:59:04.105 "value": "NO_WARNING",
2024-02-14 20:59:04.105 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:04.105 },
2024-02-14 20:59:04.105 "rearRight": {
2024-02-14 20:59:04.105 "value": "NO_WARNING",
2024-02-14 20:59:04.105 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:04.105 }
2024-02-14 20:59:04.105 }
2024-02-14 20:59:04.105 }
2024-02-14 20:59:04.106 Volvo: DEBUG: {"data": {"frontLeft": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "frontRight": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "rearLeft": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "rearRight": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}}}
2024-02-14 20:59:04.106 Volvo: DEBUG: Not Updating Selector Switch (Volvo-FrontRightTyrePressure)
2024-02-14 20:59:04.106 Volvo: DEBUG: Not Updating Selector Switch (Volvo-FrontLeftTyrePressure)
2024-02-14 20:59:04.106 Volvo: DEBUG: Not Updating Selector Switch (Volvo-RearRightTyrePressure)
2024-02-14 20:59:04.106 Volvo: DEBUG: Not Updating Selector Switch (Volvo-RearLeftTyrePressure)
2024-02-14 20:59:04.106 Volvo: DEBUG: GetDiagnostics() called
2024-02-14 20:59:04.106 Volvo: DEBUG: VolvoAPI(://api.volvocars.com/connected-vehicle/v2/vehicles//diagnostics,application/json) called
2024-02-14 20:59:04.453 Volvo: DEBUG:
2024-02-14 20:59:04.453 Result:
2024-02-14 20:59:04.453 Volvo: DEBUG: <Response [401]>
2024-02-14 20:59:04.453 Volvo: ERROR: VolvoAPI failed callin://api.volvocars.com/connected-vehicle/v2/vehicles//diagnostics, Statuscode 401
2024-02-14 20:59:04.455 Volvo: ERROR: Reponse: {'status': 401, 'error': {'message': 'Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application.'}}
2024-02-14 20:59:04.455 Volvo: ERROR: Updating Diagnostics failed
2024-02-14 20:59:04.455 Volvo: DEBUG: GetLocation() called
2024-02-14 20:59:04.455 Volvo: DEBUG: VolvoAPI(://api.volvocars.com/location/v1/vocation,application/json) called
2024-02-14 20:59:04.732 Zwavejs: General/kWh (nodeID_22_electric_kwh_value)
2024-02-14 20:59:04.871 Volvo: DEBUG:
2024-02-14 20:59:04.871 Result:
2024-02-14 20:59:04.871 Volvo: DEBUG: <Response [401]>
2024-02-14 20:59:04.871 Volvo: ERROR: VolvoAPI failed callin://api.volvocars.com/location/v1/vehicles/location, Statuscode 401
2024-02-14 20:59:04.872 Volvo: ERROR: Reponse: {'status': 401, 'error': {'message': 'Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application.'}}
2024-02-14 20:59:04.873 Volvo: ERROR: GetLocation failed
2024-02-14 20:59:04.873 Volvo: DEBUG: GetEngineStatus() called
2024-02-14 20:59:04.873 Volvo: DEBUG: VolvoA://api.volvocars.com/connected-vehicle/v2/vehiclesengine-status,application/json) called
2024-02-14 20:59:05.178 Volvo: DEBUG:
2024-02-14 20:59:05.178 Result:
2024-02-14 20:59:05.178 Volvo: DEBUG: <Response [401]>
2024-02-14 20:59:05.178 Volvo: ERROR: VolvoAPI failed callin//api.volvocars.com/connected-vehicle/v2/vehicles/Y/engine-status, Statuscode 401
2024-02-14 20:59:05.180 Volvo: ERROR: Reponse: {'status': 401, 'error': {'message': 'Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application.'}}
2024-02-14 20:59:05.180 Volvo: ERROR: Updating Engine Status failed
2024-02-14 20:59:05.180 Volvo: DEBUG: GetEngine() called
2024-02-14 20:59:05.180 Volvo: DEBUG: VolvoAPI://api.volvocars.com/connected-vehicle/v2/vehicles//engine,application/json) called

2024-02-14 20:59:05.718 Volvo: DEBUG:
2024-02-14 20:59:05.718 Result:
2024-02-14 20:59:05.718 Volvo: DEBUG: <Response [200]>
2024-02-14 20:59:05.720 Volvo: DEBUG:
2024-02-14 20:59:05.720 Result JSON:
2024-02-14 20:59:05.720 Volvo: DEBUG: {
2024-02-14 20:59:05.720 "data": {
2024-02-14 20:59:05.720 "oilLevelWarning": {
2024-02-14 20:59:05.720 "value": "NO_WARNING",
2024-02-14 20:59:05.720 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:05.720 },
2024-02-14 20:59:05.720 "engineCoolantLevelWarning": {
2024-02-14 20:59:05.720 "value": "NO_WARNING",
2024-02-14 20:59:05.720 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:05.720 }
2024-02-14 20:59:05.720 }
2024-02-14 20:59:05.720 }
2024-02-14 20:59:05.720 Volvo: DEBUG: {"data": {"oilLevelWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "engineCoolantLevelWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}}}
2024-02-14 20:59:05.720 Volvo: DEBUG: Not Updating Selector Switch (Volvo-engineCoolantLevel)
2024-02-14 20:59:05.720 Volvo: DEBUG: Not Updating Selector Switch (Volvo-oilLevel)
2024-02-14 20:59:05.720 Volvo: DEBUG: GetWarningStatus() called
2024-02-14 20:59:05.720 Volvo: DEBUG: VolvoAP//api.volvocars.com/connected-vehicle/v2/vehicles//warnings,application/json) called
2024-02-14 20:59:06.639 Volvo: DEBUG:
2024-02-14 20:59:06.639 Result:
2024-02-14 20:59:06.640 Volvo: DEBUG: <Response [200]>
2024-02-14 20:59:06.644 Volvo: DEBUG:
2024-02-14 20:59:06.644 Result JSON:
2024-02-14 20:59:06.644 Volvo: DEBUG: {
2024-02-14 20:59:06.644 "data": {
2024-02-14 20:59:06.644 "brakeLightCenterWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "brakeLightLeftWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "brakeLightRightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "fogLightFrontWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "fogLightRearWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "positionLightFrontLeftWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "positionLightFrontRightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "positionLightRearLeftWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "positionLightRearRightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "highBeamLeftWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "highBeamRightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "lowBeamLeftWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "lowBeamRightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "daytimeRunningLightLeftWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "daytimeRunningLightRightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "turnIndicationFrontLeftWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "turnIndicationFrontRightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "turnIndicationRearLeftWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "turnIndicationRearRightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "registrationPlateLightWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "sideMarkLightsWarning": {
2024-02-14 20:59:06.644 "value": "NO_WARNING",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "hazardLightsWarning": {
2024-02-14 20:59:06.644 "value": "UNSPECIFIED",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 },
2024-02-14 20:59:06.644 "reverseLightsWarning": {
2024-02-14 20:59:06.644 "value": "UNSPECIFIED",
2024-02-14 20:59:06.644 "timestamp": "2024-02-14T16:35:35.442Z"
2024-02-14 20:59:06.644 }
2024-02-14 20:59:06.644 }
2024-02-14 20:59:06.644 }
2024-02-14 20:59:06.645 Volvo: DEBUG: {"data": {"brakeLightCenterWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "brakeLightLeftWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "brakeLightRightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "fogLightFrontWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "fogLightRearWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "positionLightFrontLeftWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "positionLightFrontRightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "positionLightRearLeftWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "positionLightRearRightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "highBeamLeftWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "highBeamRightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "lowBeamLeftWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "lowBeamRightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "daytimeRunningLightLeftWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "daytimeRunningLightRightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "turnIndicationFrontLeftWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "turnIndicationFrontRightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "turnIndicationRearLeftWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "turnIndicationRearRightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "registrationPlateLightWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "sideMarkLightsWarning": {"value": "NO_WARNING", "timestamp": "2024-02-14T16:35:35.442Z"}, "hazardLightsWarning": {"value": "UNSPECIFIED", "timestamp": "2024-02-14T16:35:35.442Z"}, "reverseLightsWarning": {"value": "UNSPECIFIED", "timestamp": "2024-02-14T16:35:35.442Z"}}}
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-BrakeLightCenterWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-BrakeLightLeftWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-BrakeLightRightWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-fogLightFrontWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-fogLightRearWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-positionLightFrontLeftWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-positionLightFrontRightWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-positionLightRearLeftWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-positionLightRearRightWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-highBeamLeftWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-highBeamRightWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-lowBeamLeftWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-lowBeamRightWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-daytimeRunningLightLeftWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-daytimeRunningLightRightWarning)
2024-02-14 20:59:06.645 Volvo: DEBUG: Not Updating Selector Switch (Volvo-turnIndicationFrontLeftWarning)
2024-02-14 20:59:06.646 Volvo: DEBUG: Not Updating Selector Switch (Volvo-turnIndicationFrontRightWarning)
2024-02-14 20:59:06.646 Volvo: DEBUG: Not Updating Selector Switch (Volvo-turnIndicationRearLeftWarning)
2024-02-14 20:59:06.646 Volvo: DEBUG: Not Updating Selector Switch (Volvo-turnIndicationRearRightWarning)
2024-02-14 20:59:06.646 Volvo: DEBUG: Not Updating Selector Switch (Volvo-registrationPlateLightWarning)
2024-02-14 20:59:06.646 Volvo: DEBUG: Not Updating Selector Switch (Volvo-sideMarkLightsWarning)
2024-02-14 20:59:06.646 Volvo: DEBUG: Not Updating Selector Switch (Volvo-hazardMarkLightsWarning)
2024-02-14 20:59:06.646 Volvo: DEBUG: Not Updating Selector Switch (Volvo-reverseMarkLightsWarning)
2024-02-14 20:59:06.646 Volvo: DEBUG: No ABRP token and/or apikey, ignoring
2024-02-14 20:59:06.646 Volvo: Acquiring GIL for 'onHeartbeatCallback'

2024-02-14 20:59:12.055 Volvo: Pushing 'onHeartbeatCallback' on to queue
2024-02-14 20:59:12.105 Volvo: Processing 'onHeartbeatCallback' message
2024-02-14 20:59:12.105 Volvo: Acquiring GIL for 'onHeartbeatCallback'
2024-02-14 20:59:12.114 Volvo: Calling message handler 'onHeartbeat' on 'module' type object.
2024-02-14 20:59:12.114 Volvo: DEBUG: onHeartbeat called
2024-02-14 20:59:12.114 Volvo: DEBUG: Heartbeat() called
2024-02-14 20:59:12.114 Volvo: DEBUG: Not refreshing token, expires in 1160.252863407135 seconds
2024-02-14 20:59:12.114 Volvo: DEBUG: Already exists
2024-02-14 20:59:12.114 Volvo: DEBUG: Climatization switched off, do nothing
2024-02-14 20:59:12.115 Volvo: DEBUG: Not updating, 78.97337222099304 to update
2024-02-14 20:59:12.115 Volvo: DEBUG: No ABRP token and/or apikey, ignoring
2024-02-14 20:59:12.115 Volvo: Acquiring GIL for 'onHeartbeatCallback'

2024-02-14 20:59:22.032 Volvo: Pushing 'onHeartbeatCallback' on to queue
2024-02-14 20:59:22.082 Volvo: Processing 'onHeartbeatCallback' message
2024-02-14 20:59:22.082 Volvo: Acquiring GIL for 'onHeartbeatCallback'
2024-02-14 20:59:22.082 Volvo: Calling message handler 'onHeartbeat' on 'module' type object.
2024-02-14 20:59:22.083 Volvo: DEBUG: onHeartbeat called
2024-02-14 20:59:22.083 Volvo: DEBUG: Heartbeat() called
2024-02-14 20:59:22.083 Volvo: DEBUG: Not refreshing token, expires in 1150.2844309806824 seconds
2024-02-14 20:59:22.083 Volvo: DEBUG: Already exists
2024-02-14 20:59:22.083 Volvo: DEBUG: Climatization switched off, do nothing
2024-02-14 20:59:22.083 Volvo: DEBUG: Not updating, 69.00490617752075 to update
2024-02-14 20:59:22.083 Volvo: DEBUG: No ABRP token and/or apikey, ignoring
2024-02-14 20:59:22.083 Volvo: Acquiring GIL for 'onHeartbeatCallback'

2024-02-14 20:59:32.062 Volvo: Pushing 'onHeartbeatCallback' on to queue
2024-02-14 20:59:32.112 Volvo: Processing 'onHeartbeatCallback' message
2024-02-14 20:59:32.112 Volvo: Acquiring GIL for 'onHeartbeatCallback'
2024-02-14 20:59:32.112 Volvo: Calling message handler 'onHeartbeat' on 'module' type object.
2024-02-14 20:59:32.112 Volvo: DEBUG: onHeartbeat called
2024-02-14 20:59:32.112 Volvo: DEBUG: Heartbeat() called
2024-02-14 20:59:32.112 Volvo: DEBUG: Not refreshing token, expires in 1140.254996061325 seconds
2024-02-14 20:59:32.112 Volvo: DEBUG: Already exists
2024-02-14 20:59:32.112 Volvo: DEBUG: Climatization switched off, do nothing
2024-02-14 20:59:32.112 Volvo: DEBUG: Not updating, 58.975497007369995 to update
2024-02-14 20:59:32.112 Volvo: DEBUG: No ABRP token and/or apikey, ignoring

2024-02-14 20:59:42.034 Volvo: Pushing 'onHeartbeatCallback' on to queue
2024-02-14 20:59:42.085 Volvo: Processing 'onHeartbeatCallback' message
2024-02-14 20:59:42.085 Volvo: Acquiring GIL for 'onHeartbeatCallback'
2024-02-14 20:59:42.085 Volvo: Calling message handler 'onHeartbeat' on 'module' type object.
2024-02-14 20:59:42.085 Volvo: DEBUG: onHeartbeat called
2024-02-14 20:59:42.085 Volvo: DEBUG: Heartbeat() called
2024-02-14 20:59:42.085 Volvo: DEBUG: Not refreshing token, expires in 1130.281920671463 seconds
2024-02-14 20:59:42.085 Volvo: DEBUG: Already exists
2024-02-14 20:59:42.085 Volvo: DEBUG: Climatization switched off, do nothing
2024-02-14 20:59:42.085 Volvo: DEBUG: Not updating, 49.002421379089355 to update
2024-02-14 20:59:42.086 Volvo: DEBUG: No ABRP token and/or apikey, ignoring
2024-02-14 20:59:42.086 Volvo: Acquiring GIL for 'onHeartbeatCallback'
2024-02-14 20:59:50.773 Nefit Easy: Thermostat (Thermostaat Nefit)
2024-02-14 20:59:50.794 Nefit Easy: Temp (Woonkamer temperatuur Nefit)
2024-02-14 20:59:50.977 Nefit Easy: Temp (Water temperatuur boiler)
Last edited by Tino4785 on Sunday 18 February 2024 12:33, edited 2 times in total.
akamming
Posts: 367
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Volvo EV

Post by akamming »

See the 1st error. It States an error with the api key

Edit: looking at the rest of the logging. It appears to work fine, but some calls do it work. This was reported by other users as well that it took a few days before the api key was accepted for all api calls…

The not updating is just a debug message: the value is unchanged so domoticz sensor does not have to be updates…
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 and thank you so far.

It seems like the car can heat up remotely, but the mileage doesn't change. However, I have already driven again in the meantime.
akamming
Posts: 367
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: Friday 16 February 2024 8:34 Hello and thank you so far.

It seems like the car can heat up remotely, but the mileage doesn't change. However, I have already driven again in the meantime.
i notice 2 things in your logging:
1. your logging is a bit weird... the 1st calls the VIN is missing the API call. (But later in the log it's present. Did you remove the VIN manually for privacy reasons in the 1st part of the logging?
2. As stated this behaviour has been reported before that some calls work and some don't. The same users reported that later on it started working. I have been able te reproduce this behaviour by getting a new API key. At first it didn;t work, then after a day or 2 a few calls worked and a week later all calls worked. Seems to be a thing on Volvo side... looks like this is your issue...

only thing i can think of i create another API key and try that one as well... maybe that will help (but don;t throw away the old one... it might start working after several days...)
User avatar
FireWizard
Posts: 1886
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 »

Hello @akamming,

I recommended @Tino4785 in a private post to remove his VIN in the public log file as it may be misused
However he is the only one, who can confirm, if it has been done.
I think he did, as I see on the third line 2 slashes (//) on the position, where you would expect the VIN number.
But on several places I see the VIN.

I noticed a couple of things as well, but I do not know if this is caused by editing the file.

Following lines:
2024-02-14 20:59:04.455 Volvo: DEBUG: VolvoAPI(://api.volvocars.com/location/v1/vocation,application/json) called
What is vocation?
2024-02-14 20:59:04.873 Volvo: DEBUG: VolvoA://api.volvocars.com/connected-vehicle/v2/vehiclesengine-status,application/json) called
What is vehiclesengine-status? It is just engine-status. Probably edited and also VolvoA? should be API
2024-02-14 20:59:05.720 Volvo: DEBUG: VolvoAP//api.volvocars.com/connected-vehicle/v2/vehicles//warnings,application/json) called
See here VolvoAP, should be API.

For your information: I noticed that (again) Volvo is working on,in this case the Energy APi, as I receive an error from that API since February 14, 15:11.
It gives a status 404 error,with the following error message:
message: "NOT_FOUND"
description: "Car model is not supported"
It has been working for a couple of weeks,without any issues
So let's wait,when it turns back to stable.

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

Re: Python Plugin: Volvo EV

Post by akamming »

Hi @firewizard,

on your first 2 points: very likely that the weird url's are caused by his editing,

vocation seems to be vehicles/<vin>/location
and vehiclesengine-status seems to be vehicles/<vin>/engine-status.
This at least what I see in my logging...

same for "VolvoAP": This is a logline from a generic function which always logs VolvoAPI(<url to be called>) , so cannot only be the result of editing the logging (or changing the code)


I indeed also notices sometimes changes at volvo side. e.g. climatization stopped work (gave "not allowed" for a few days) and now it's working again...
User avatar
FireWizard
Posts: 1886
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 »

Good evening @akamming.
I indeed also notices sometimes changes at Volvo side. e.g. climatization stopped work (gave "not allowed" for a few days) and now it's working again...
Currently the commands "Honk", "Flash" and "Honk and Flash" are not working.
Volvo returns an "Internal Server Error".
So there are a few things going on.

Regards
akamming
Posts: 367
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: Friday 16 February 2024 19:02 Good evening @akamming.
I indeed also notices sometimes changes at Volvo side. e.g. climatization stopped work (gave "not allowed" for a few days) and now it's working again...
Currently the commands "Honk", "Flash" and "Honk and Flash" are not working.
Volvo returns an "Internal Server Error".
So there are a few things going on.

Regards
Those commands have never worked for EV…
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,
I think I just need to be patient with my Volvo since the rest is working fine.

Thanks for your help so far :)

Oh, I removed the VIN.
HvdW
Posts: 612
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 »

This plugin gives lots of possibilities.
Screenshot_20240218_124003_Firefox.jpg
Screenshot_20240218_124003_Firefox.jpg (110.04 KiB) Viewed 1075 times
Pity that the Volvo API doesn't give the possibility yet to set charging Ampères.
Did I already say thanks @akamming for comparing this plugin?
Bugs bug me.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest