openvehicles / Open-Vehicle-Monitoring-System-3

Open Vehicle Monitoring System - Version 3
http:///www.openvehicles.com/
Other
609 stars 230 forks source link

Possible to add stop charging on Nissan Leaf? #287

Closed dalathegreat closed 2 years ago

dalathegreat commented 4 years ago

0x1BD contains a section to stop charging, by modifying this bit you can stop it. frame.data[1] = (frame.data[1] & 0xE0) | 2; //request charging stop

I am using muxsan CAN bridges, so I'm unsure if this is possible to transfer over to OVMS. But just as an FYI to you guys more knowledgeable of the OVMS system :)

mjkapkan commented 3 years ago

Hi, I have not tried this new solution. But I finally got some time to finish the old one. I think we can add it now to the main branch. However I still think we need to add an additional checkbox to NL features window called "Enable Experimental Features" as this has not been extensively tested with other MY cars. What do you guys think?

dalathegreat commented 3 years ago

Do it! 👍

drc38 commented 3 years ago

Good suggestion with the "Experimental features checkbox". With Michael's recent changes to the can bus logic I've found the existing remote commands work more reliably. I'm keen to try the stop feature out.

Araknai commented 3 years ago

Hi guys, not a developer here(yet), but thought I'd comment that I just got my OVMSv3 yesterday and got it fully up and running on my 2015 Leaf yesterday and that I'm super interested in the charge stop feature and down to test any builds you make. Maybe eventually I'll get into this and make a branch myself (EE by profession but haven't done any automotive CAN stuff yet.) I grabbed @mjkapkan 's repo, but not ready to build it myself; was looking for a binary.

mjkapkan commented 3 years ago

@Araknai welcome to OVMS family. Good that you haven't tried to complie as my latest code does not include the charge stop feature. I have it in my other private repo. The code has changed a lot since the time I merged the code with the one from @markfinn , So there's some manual merges needed. I have limited time available due to Covid. But hope to finally get to this when things get back to semi-normal here in the Baltics. If you want the old version (more bugs and limited climate control metrics) then I can try to find the old binary in my old linux box. Let me know.

Araknai commented 3 years ago

Eyyyy! @mjkapkan , good to hear from ya. That is a good thing I didn't try haha. Almost did. The latest OTA is really doing quite good for me; minus the charge stop feature. I'm content to do without it for the time being and focusing my hobby time on a battery swap/upgrade for the next few weeks. If you do get back into it in the coming months and merge, I'll be happy to flash my OVMS but no hurry from me.

MikMudry commented 3 years ago

Hi, for last two weeks I'm successfully stopping the charge with @markfinn 's MITM 1db message method. No problems so far. I'll create a pull request - but no credit for me, just copy-pasted his code into current branch. Works great with simple script (put into ticker.60 event folder):

if (OvmsMetrics.Value("v.c.charging")) {
    if (OvmsMetrics.AsFloat("v.c.limit.soc") <= OvmsMetrics.AsFloat("v.b.soc")) {
        OvmsVehicle.StopCharge();
    }
}

The SOC limit (say 95%) can easily be set by config set xnl suffsoc 95

Charge stop using Android app (slider at the first screen) is also working.

dalathegreat commented 2 years ago

Chargestop merged to master in #662 , closing this 👍