FilipDem / Domoticz-BMW-plugin

Domoticz plugin working with BMW Connected Drive
4 stars 2 forks source link

PHEV: ChargingProfile #9

Closed RutgerBeyen closed 2 years ago

RutgerBeyen commented 2 years ago

Hi,

Nice plugin, it actually works pretty well!

I'd like to expand its usage for (PH)EV cars. Via the MyBMW app you can set up a charge timer to start charging the car either immediately once plugged in or during a specific timeframe (for example off-peak hours). I would like to control this setting from within Domoticz, so I can charge the car based on the overproduction of my solar panels:

I tried the the 'REMOTE_CHARGE_NOW' function (just like REMOTE_HORN) as described in the bimmerconnected but this function doesn't seem implemented on my PHEV (possibliy it's only a function on a pure EV). So for now I can't do anything with the charging timings from within Domoticz. Would something like this be possible to implement? Attached the output of the 'bimmerconnected status' of my car.

vehicle-log.txt

FilipDem commented 2 years ago

Hi, I am currently on holiday and cannot take this up immediately. However already one question... Did I understand well that you only need a function to start charging? Is this function supported in bimmerconnected? Can you let me know which function (this would help me).

RutgerBeyen commented 2 years ago

Hi Filip, As far as I can see, querying the charging profile is available within bimmerconnected via the ChargingProfile class in charging_profile.py. Modifying the settings seems not available yet https://github.com/bimmerconnected/bimmer_connected/discussions/387 In my case it would be enough to switch between 'immediateCharging' and 'delayedCharging'.

FilipDem commented 2 years ago

I just looked to the bimmer_connected library (!! Domoticz integrates the beta version/"async" branch). However the ChargingProfile class is only able to retrieve the status and cannot change the charging mode. So then it is difficult to add this functionality in the Domoticz plugin. My first BMW plugin was based on my own reverse engineering of the BMW interfaces, however I stopped this with the introduction of the MyBMW App (as this had a very big impact). Since then I am relying fully on the bimmer_connected library. This means that I will only integrate functionality that is supported by the bimmer_connected library.

Indeed the remote service would be an option, but I cannot judge if it is supported for PHEV (I have a non-electric car). The easiest way is to see this with the MyBMW App. If the function is available (and working) in the MyBMW App, it should work also in Domoticz (but then I need to add the option - this is currently not available).

Filip