openvehicles / Open-Vehicle-Monitoring-System-3

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

NL: Enhance Charge to Limit Feature #696

Open mjkapkan opened 2 years ago

mjkapkan commented 2 years ago

Currently when charge limit is updated the system will not start the charge if the new limit is less than current charge + allowed drop.

So if the limit is updated a small amount and the allowed drop is less than that, the charge will not start.

To fix this, allowed drop value can be ignored once when the charge limit is updated.

mjkapkan commented 2 years ago

Also will update the documentation a bit and fix a small inconvenience that can be caused by user error as mentioned in #697 .

Lenbok commented 2 years ago

I found the current behaviour of the charge to limit feature confusing (see https://www.openvehicles.com/comment/8109#comment-8109).

My background is from using the built-in NL charge to 80% feature (but admittedly I've never noticed if the built-in version does periodic "top-ups"). I thought I could simply use OVMS as an equivalent with a user specified limit, so it threw me that I needed to enable a different checkbox to allow me to effectively disable automatic charge starting (particularly as the Web UI for the sufficient SOC slider says nothing about starting charging). My particular use case is also to have charging actually initiated via home automation to be coordinated with solar PV output, so that may have biased my expectation that the SOC limit feature would not initiate charging.

It would be much clearer to the user if the "Limit to SOC" (or range) only controlled when charging is stopped (i.e. it should not enable automatic starting of charging at all), and the enabling of automatic starting is separately controlled by the "Allowed SOC (or range) drop" methods. I.e. if you have limit to SOC set but have NOT enabled allowed SOC (or range) drop, the leaf would never start charging automatically but will stop charging once the target is reached.

If the user wants OVMS to automatically initiate charging as well, then they can enable (checkbox) either the SOC or range drop features and set the limit appropriately.

Lenbok commented 2 years ago

Additionally, there seems a bug in the implementation. I currently have the SOC limit set to 80% and the allowed SOC drop set to 30%, however yesterday it automatically started a charge when the drop was only 18%:

Screenshot_20220220-073211

mjkapkan commented 2 years ago

@Lenbok Thanks for the feedback. It would be of course nice to have more flexibility. Originally it was made to start charging to allow user to set higher SOC limit than he had previously. As this was just the first implementation, it is not perfect. Regarding the bug. Please submit all the charge limit metrics before and after the issue happened, so I can try to replicate this.

As for further enhancements, I am currently working on a plugin that will allow to do this for all cars, not just the Leaf. So more features and flexibility will be available with it. All in all, all feedback is welcome!

Lenbok commented 2 years ago

@mjkapkan I'm kind of new to this, so not sure how to get all the metrics from before / after, but I have enabled some SD card logging which hopefully is sufficient. Starting just before the leaf decided to start charging:

2022-02-19 19:39:08.301 NZDT I (11417881) ovms-server-v2: Incoming Msg: MP-0 AFA
2022-02-19 19:39:08.311 NZDT I (11417891) ovms-server-v2: Send MP-0 a
2022-02-19 19:43:38.571 NZDT I (11688151) ovms-server-v2: Send MP-0 S62.0,K,0,0.00,stopped,standard,60,44,0,0,0,0,0,21,0,0,0,0,49.36,0,0,0,80,-1,0,0,0,0,0,0,0,0.00,383.50,75,0.00,100.00,0.00,0.0
2022-02-19 19:43:38.571 NZDT I (11688151) ovms-server-v2: Send MP-0 D0,0,5,15,16.1111,21,0,931373,0,85933,22,0,0,0,11.75,0,12.5,0,0,0,19.4444
2022-02-19 19:43:53.581 NZDT I (11703161) housekeeping: 2022-02-19 19:43:52 NZDT (RAM: 8b=75772-76484 32b=12344 SPI=3384656-3419456)
2022-02-19 19:48:53.581 NZDT I (12003161) housekeeping: 2022-02-19 19:48:52 NZDT (RAM: 8b=75772-76484 32b=12344 SPI=3384656-3419424)
2022-02-19 19:50:13.571 NZDT I (12083151) v-nissanleaf: RemoteCommandHandler
2022-02-19 19:50:13.571 NZDT I (12083151) v-nissanleaf: Sending Wakeup Frame
2022-02-19 19:50:13.571 NZDT I (12083151) ovms-server-v2: Send MP-0 PICharge level below target (62%)
2022-02-19 19:50:13.671 NZDT I (12083251) v-nissanleaf: RemoteCommandTimer 24
2022-02-19 19:50:13.671 NZDT I (12083251) v-nissanleaf: OLD TCU on EV Bus
[...]
2022-02-19 19:50:15.971 NZDT I (12085551) v-nissanleaf: OLD TCU on EV Bus
2022-02-19 19:50:15.971 NZDT I (12085551) v-nissanleaf: Sending Wakeup Frame
2022-02-19 19:50:15.971 NZDT I (12085551) v-nissanleaf: Start Charging
2022-02-19 19:50:16.071 NZDT I (12085651) v-nissanleaf: RemoteCommandTimer 0
2022-02-19 19:50:24.571 NZDT I (12094151) powermgmt: Charging 12V battery..
2022-02-19 19:50:24.581 NZDT I (12094161) ovms-server-v2: Send MP-0 PIStandard - Charging|220.0V/12.7A 10.2km/h|Full: 12:23h|80%: 5:52h|Charged: 0.0kWh|SOC: 62.0%|Ideal range: 61km|Est. range: 45km|ODO: 93137.3km|CAC: 49.4Ah|SOH: 75%
2022-02-19 19:53:39.571 NZDT I (12289151) ovms-server-v2: Send MP-0 S63.0,K,220,12.73,charging,standard,61,45,12,203,0,1,2,1,0,0,0,0,49.36,115,0,0,80,-1,0,0,0,0,52,72,0,2.70,385.50,75,2.80,96.25,-7.00,10.2
2022-02-19 19:53:39.581 NZDT I (12289161) ovms-server-v2: Send MP-0 D28,0,5,15.5556,16.6667,21,0,931373,0,86534,22,0,1,1,14.13,0,12.5,16,0,0,20.5556
2022-02-19 19:53:53.581 NZDT I (12303161) housekeeping: 2022-02-19 19:53:52 NZDT (RAM: 8b=75772-76332 32b=12344 SPI=3384656-3417632)
2022-02-19 19:54:10.261 NZDT I (12319841) ovms-server-v2: Incoming Msg: MP-0 AFA
2022-02-19 19:54:10.271 NZDT I (12319851) ovms-server-v2: Send MP-0 a
2022-02-19 19:58:53.581 NZDT I (12603161) housekeeping: 2022-02-19 19:58:52 NZDT (RAM: 8b=75772-76332 32b=12344 SPI=3384656-3417120)
2022-02-19 20:03:40.571 NZDT I (12890151) ovms-server-v2: Send MP-0 S67.0,K,220,12.73,charging,standard,65,48,12,804,0,5,2,1,0,0,0,0,49.36,97,0,0,80,-1,0,0,0,0,38,72,0,2.89,386.00,75,2.80,96.50,-7.50,11.0
2022-02-19 20:03:40.581 NZDT I (12890161) ovms-server-v2: Send MP-0 D28,0,5,16.6667,17.2222,21,0,931373,0,87135,22,0,1,1,14.07,0,12.5,16,0,0,20.5556
2022-02-19 20:03:53.581 NZDT I (12903161) housekeeping: 2022-02-19 20:03:52 NZDT (RAM: 8b=75772-76332 32b=12344 SPI=3384656-3417016)
2022-02-19 20:05:34.571 NZDT I (13004151) powermgmt: No longer charging 12V battery..
2022-02-19 20:08:53.581 NZDT I (13203161) housekeeping: 2022-02-19 20:08:52 NZDT (RAM: 8b=75772-76332 32b=12344 SPI=3384656-3417120)
2022-02-19 20:09:11.301 NZDT I (13220881) ovms-server-v2: Incoming Msg: MP-0 AFA
2022-02-19 20:09:11.311 NZDT I (13220891) ovms-server-v2: Send MP-0 a
2022-02-19 20:13:41.571 NZDT I (13491151) ovms-server-v2: Send MP-0 S72.0,K,220,12.73,charging,standard,70,51,12,1405,0,10,2,1,0,0,0,0,49.36,82,0,0,80,-1,0,0,0,0,23,71,0,2.71,387.00,75,2.80,96.75,-7.00,10.1
2022-02-19 20:13:41.581 NZDT I (13491161) ovms-server-v2: Send MP-0 D28,0,5,17.2222,18.3333,22,0,931373,0,87736,22.5,0,1,1,12.62,0,12.5,0,0,0,20.5556
2022-02-19 20:13:41.581 NZDT I (13491161) ovms-server-v2: Send MP-0 F3.3.001-282-gbd4919ca/ota_0/edge (build idf v3.3.4-848-g1ff5e24b1 Feb 12 2022 00:04:22),,15,0,NL,Rancho Relaxo,-1,-1,OVMS WIFI BLE BT cores=2 rev=ESP32/3; MODEM SIM7600
2022-02-19 20:13:53.581 NZDT I (13503161) housekeeping: 2022-02-19 20:13:52 NZDT (RAM: 8b=75772-76332 32b=12344 SPI=3384656-3417156)
2022-02-19 20:16:58.551 NZDT I (13688141) ovms-server-v2: Incoming Msg: MP-0 Z1
2022-02-19 20:16:58.551 NZDT I (13688141) ovms-server-v2: One or more peers have connected
2022-02-19 20:16:58.561 NZDT I (13688151) ovms-server-v2: Send MP-0 S73.0,K,220,12.73,charging,standard,71,52,12,1602,0,12,2,1,0,0,0,0,49.36,79,0,0,80,-1,0,0,0,0,20,71,0,2.52,387.00,75,2.80,89.84,-6.50,9.4
2022-02-19 20:16:58.571 NZDT I (13688161) ovms-server-v2: Send MP-0 D28,0,5,17.7778,18.3333,22,0,931373,0,87933,22.5,0,1,1,12.58,0,12.5,0,0,0,20.5556
2022-02-19 20:16:58.571 NZDT I (13688161) ovms-server-v2: Send MP-0 L0,0,0,0,0,0,0,0,0,-2.516,0.084,0.005,0,100,,0,0,0
2022-02-19 20:16:58.571 NZDT I (13688161) ovms-server-v2: Send MP-0 Y4,FL,FR,RL,RR,0,-1,0,-1,0,-1,0,-1
2022-02-19 20:16:58.571 NZDT I (13688161) ovms-server-v2: Send MP-0 W0,0,0,0,0,0,0,0,-1
2022-02-19 20:16:58.571 NZDT I (13688161) ovms-server-v2: Send MP-0 F3.3.001-282-gbd4919ca/ota_0/edge (build idf v3.3.4-848-g1ff5e24b1 Feb 12 2022 00:04:22),,15,0,NL,Rancho Relaxo,-1,-1,OVMS WIFI BLE BT cores=2 rev=ESP32/3; MODEM SIM7600
2022-02-19 20:16:58.561 NZDT I (13688151) ovms-server-v2: Incoming Msg: MP-0 Z2
2022-02-19 20:16:58.581 NZDT I (13688171) ovms-server-v2: One or more peers have connected
[... charging continues ...]
2022-02-19 20:27:09.581 NZDT I (14299161) ovms-server-v2: Send MP-0 D28,0,5,18.3333,19.4444,22,0,931373,0,88544,23,0,1,1,12.6,0,12.61,0,0,0,20.5556
2022-02-19 20:28:10.571 NZDT I (14360151) ovms-server-v2: Send MP-0 S77.0,K,220,12.73,charging,standard,74,54,12,2274,0,17,2,1,0,0,0,0,49.36,71,0,0,80,-1,0,0,0,0,11,71,0,2.71,387.50,75,2.80,96.88,-7.00,10.1
2022-02-19 20:28:10.581 NZDT I (14360161) ovms-server-v2: Send MP-0 D28,0,5,18.3333,19.4444,22,0,931373,0,88605,23,0,1,1,12.61,0,12.61,0,0,0,20.5556
2022-02-19 20:28:49.871 NZDT I (14399451) ovms-server-v2: Incoming Msg: MP-0 Z0
2022-02-19 20:28:53.581 NZDT I (14403161) housekeeping: 2022-02-19 20:28:52 NZDT (RAM: 8b=75772-76332 32b=12344 SPI=3384656-3416892)
2022-02-19 20:33:53.451 NZDT I (14703161) housekeeping: 2022-02-19 20:33:52 NZDT (RAM: 8b=75772-76332 32b=12344 SPI=3384656-3417096)
2022-02-19 20:38:11.431 NZDT I (14961151) ovms-server-v2: Send MP-0 S80.0,K,220,12.73,charging,standard,77,56,12,2875,0,21,2,1,0,0,0,0,49.36,60,0,0,80,-1,0,0,0,0,2,71,0,2.91,388.00,75,2.80,100.00,-7.50,10.8
2022-02-19 20:38:11.441 NZDT I (14961161) ovms-server-v2: Send MP-0 D28,0,5,19.4444,20,22,0,931373,0,89206,23,0,1,1,12.59,0,12.61,0,0,0,20.5556
2022-02-19 20:38:13.431 NZDT I (14963151) v-nissanleaf: RemoteCommandHandler
2022-02-19 20:38:13.431 NZDT I (14963151) v-nissanleaf: Sending Wakeup Frame
2022-02-19 20:38:13.431 NZDT I (14963151) ovms-server-v2: Send MP-0 PITarget charge level reached (80%)
2022-02-19 20:38:13.531 NZDT I (14963251) v-nissanleaf: RemoteCommandTimer 24
2022-02-19 20:38:13.531 NZDT I (14963251) v-nissanleaf: OLD TCU on EV Bus
2022-02-19 20:38:13.531 NZDT I (14963251) v-nissanleaf: Sending Wakeup Frame
2022-02-19 20:38:13.531 NZDT I (14963251) v-nissanleaf: Stop Charging
2022-02-19 20:38:13.611 NZDT I (14963331) v-nissanleaf: MITM attempted off
2022-02-19 20:38:13.611 NZDT I (14963331) v-nissanleaf:  MITM turned off
2022-02-19 20:38:13.631 NZDT I (14963351) v-nissanleaf: RemoteCommandTimer 23
2022-02-19 20:38:13.631 NZDT I (14963351) v-nissanleaf: OLD TCU on EV Bus

Current metrics via ssh:

OVMS# metrics list v.c
v.b.12v.current
v.c.12v.current
v.c.12v.power
v.c.12v.temp
v.c.12v.voltage
v.c.charging
v.c.climit
v.c.current
v.c.duration.full
v.c.duration.range
v.c.duration.soc
v.c.efficiency                           100%
v.c.kwh                                  2.2059kWh
v.c.kwh.grid
v.c.kwh.grid.total
v.c.limit.range                          0km
v.c.limit.soc                            80%
v.c.mode
v.c.pilot
v.c.power                                0kW
v.c.state                                stopped
v.c.substate
v.c.temp
v.c.time                                 0Sec
v.c.timermode
v.c.timerstart
v.c.type
v.c.voltage
xnl.v.c.chargebars                       0
xnl.v.c.chargeminutes3kW                 0
xnl.v.c.count.l0l1l2                     0
xnl.v.c.count.qc                         0
xnl.v.c.duration
xnl.v.c.event.notification               reset
xnl.v.c.event.reason
xnl.v.c.limit.reason
xnl.v.c.quick                            0
xnl.v.c.state.previous                   stopped

I have the "Allowed SOC drop" option in the web UI checked and with the slider set to 30%, but I don't see that in the outputs of "metrics list" at all.

mjkapkan commented 2 years ago

@Lenbok , what are your settings for range limit and allowed range drop?

Lenbok commented 2 years ago

Both of those are unset: image

Lenbok commented 2 years ago

And even through I have Allowed SOC drop set to 30, a few minuters ago, the leaf just started charging even though it's already at 80%.

I don't have the metrics from before, but here's what they are now:

OVMS# metrics list
m.egpio.input                            0,1,2,3,4,5,6,7,8,9
m.egpio.monitor
m.egpio.output                           3,4,5,6,7,8,9
m.freeram                                3479860
m.hardware                               OVMS WIFI BLE BT cores=2 rev=ESP32/3; MODEM SIM7600
m.monotonic                              36535Sec
m.net.mdm.iccid                          8944501207213727924
m.net.mdm.mode                           LTE,Online
m.net.mdm.model                          LE20B03SIM7600M21-A
m.net.mdm.netreg                         RegisteredRoaming
m.net.mdm.network                        Spark NZ Hologram
m.net.mdm.sq                             -77dBm
m.net.provider                           Rancho Relaxo
m.net.sq                                 -58dBm
m.net.type                               wifi
m.net.wifi.network                       Rancho Relaxo
m.net.wifi.sq                            -58.3dBm
m.serial
m.tasks                                  18
m.time.utc                               1645346816Sec
m.version                                3.3.001-282-gbd4919ca/ota_0/edge (build idf v3.3.4-848-g1ff5e24b1 Feb 12 2022 00:04:22)
s.v2.connected                           yes
s.v2.peers                               1
s.v3.connected
s.v3.peers
v.b.12v.current
v.b.12v.voltage                          12.04V
v.b.12v.voltage.alert
v.b.12v.voltage.ref                      12.15V
v.b.c.temp                               22.032,22.236,22.032°C
v.b.c.temp.alert                         0,0,0
v.b.c.temp.dev.max                       -0.07,0.14,0.07°C
v.b.c.temp.max                           22.032,22.236,22.134°C
v.b.c.temp.min                           22.032,22.032,22.032°C
v.b.c.voltage                            4.03,4.026,4.026,4.035,4.026,4.026,4.03,4.031,4.026,4.026,4.026,4.031,4.03,4.026,4.026,4.031,4.023,4.026,4.03,4.032,4.026,4.03,4.026,4.031,4.03,4.026,4.026,4.031,4.026,4.026,4.03,4.031,4.026,4.026,4.026,4.031,4.026,4.03,4.026,4.026,4.028,4.023,4.026,4.032,4.026,4.03,4.026,4.028,4.03,4.026,4.021,4.026,4.026,4.026,4.025,4.026,4.026,4.026,4.026,4.028,4.03,4.022,4.026,4.031,4.026,4.026,4.03,4.026,4.026,4.03,4.026,4.028,4.026,4.022,4.022,4.028,4.026,4.022,4.026,4.028,4.03,4.03,4.026,4.031,4.026,4.022,4.021,4.026,4.022,4.026,4.021,4.022,4.026,4.026,4.021,4.03V
v.b.c.voltage.alert
v.b.c.voltage.dev.max
v.b.c.voltage.max                        4.03,4.026,4.026,4.035,4.026,4.026,4.03,4.031,4.026,4.026,4.026,4.031,4.03,4.026,4.026,4.031,4.023,4.026,4.03,4.032,4.026,4.03,4.026,4.031,4.03,4.026,4.026,4.031,4.026,4.026,4.03,4.031,4.026,4.026,4.026,4.031,4.026,4.03,4.026,4.026,4.028,4.023,4.026,4.032,4.026,4.03,4.026,4.028,4.03,4.026,4.021,4.026,4.026,4.026,4.025,4.026,4.026,4.026,4.026,4.028,4.03,4.022,4.026,4.031,4.026,4.026,4.03,4.026,4.026,4.03,4.026,4.028,4.026,4.022,4.022,4.028,4.026,4.022,4.026,4.028,4.03,4.03,4.026,4.031,4.026,4.022,4.021,4.026,4.022,4.026,4.021,4.022,4.026,4.026,4.021,4.03V
v.b.c.voltage.min                        4.025,4.017,4.02,4.025,4.016,4.02,4.02,4.021,4.021,4.021,4.016,4.025,4.02,4.016,4.02,4.025,4.018,4.021,4.024,4.022,4.021,4.02,4.02,4.025,4.02,4.016,4.02,4.025,4.021,4.016,4.024,4.025,4.016,4.02,4.016,4.021,4.02,4.02,4.016,4.021,4.019,4.018,4.021,4.023,4.021,4.02,4.02,4.019,4.02,4.02,4.016,4.021,4.02,4.02,4.02,4.021,4.016,4.02,4.02,4.022,4.02,4.016,4.016,4.021,4.02,4.02,4.025,4.021,4.021,4.02,4.02,4.022,4.021,4.016,4.016,4.022,4.016,4.016,4.016,4.019,4.02,4.024,4.02,4.021,4.02,4.016,4.016,4.021,4.016,4.016,4.011,4.012,4.02,4.02,4.016,4.025V
v.b.cac                                  49.3573Ah
v.b.consumption                          0Wh/km
v.b.coulomb.recd
v.b.coulomb.recd.total
v.b.coulomb.used
v.b.coulomb.used.total
v.b.current                              -0.5A
v.b.energy.recd                          0.00476582kWh
v.b.energy.recd.total
v.b.energy.used                          0.0840625kWh
v.b.energy.used.total
v.b.health
v.b.p.level.avg
v.b.p.level.max
v.b.p.level.min
v.b.p.level.stddev
v.b.p.temp.avg                           22.1°C
v.b.p.temp.max                           22.236°C
v.b.p.temp.min                           22.032°C
v.b.p.temp.stddev                        0.1°C
v.b.p.temp.stddev.max                    0.1°C
v.b.p.voltage.avg                        4.02691V
v.b.p.voltage.grad                       -0.00361V
v.b.p.voltage.max                        4.035V
v.b.p.voltage.min                        4.021V
v.b.p.voltage.stddev                     0.00285V
v.b.p.voltage.stddev.max                 0V
v.b.power                                -0.19325kW
v.b.range.est                            57.3002km
v.b.range.full                           71.6252km
v.b.range.ideal                          78.6112km
v.b.range.speed                          0.7km/h
v.b.soc                                  80%
v.b.soh                                  75%
v.b.temp                                 22°C
v.b.voltage                              386.5V
v.c.12v.current
v.c.12v.power
v.c.12v.temp
v.c.12v.voltage
v.c.charging                             no
v.c.climit                               0A
v.c.current                              0A
v.c.duration.full                        60Min
v.c.duration.range
v.c.duration.soc                         0Min
v.c.efficiency                           100%
v.c.kwh                                  0.0400367kWh
v.c.kwh.grid
v.c.kwh.grid.total
v.c.limit.range                          0km
v.c.limit.soc                            80%
v.c.mode
v.c.pilot                                yes
v.c.power                                0kW
v.c.state                                timerwait
v.c.substate                             scheduledstop
v.c.temp
v.c.time                                 0Sec
v.c.timermode
v.c.timerstart
v.c.type                                 type1
v.c.voltage                              0V
v.d.cp                                   yes
v.d.fl
v.d.fr
v.d.hood
v.d.rl
v.d.rr
v.d.trunk
v.e.alarm
v.e.aux12v
v.e.awake                                no
v.e.c.config
v.e.c.login
v.e.cabinfan                             0%
v.e.cabinfanlimit                        7
v.e.cabinintake
v.e.cabinsetpoint                        0°C
v.e.cabintemp                            22.2222°C
v.e.cabinvent                            off
v.e.charging12v                          no
v.e.cooling                              no
v.e.drivemode
v.e.drivetime                            0Sec
v.e.footbrake
v.e.gear
v.e.handbrake
v.e.headlights
v.e.heating                              no
v.e.hvac                                 no
v.e.locked                               no
v.e.on                                   no
v.e.parktime                             179711Sec
v.e.regenbrake
v.e.serv.range
v.e.serv.time
v.e.temp                                 23°C
v.e.throttle
v.e.valet
v.g.climit                               0A
v.g.current                              0A
v.g.duration.empty
v.g.duration.range
v.g.duration.soc
v.g.efficiency
v.g.generating
v.g.kwh
v.g.kwh.grid
v.g.kwh.grid.total
v.g.limit.range
v.g.limit.soc
v.g.mode
v.g.pilot                                no
v.g.power                                0kW
v.g.state
v.g.substate
v.g.temp
v.g.time                                 0Sec
v.g.timermode
v.g.timerstart
v.g.type
v.g.voltage                              0V
v.i.efficiency                           100%
v.i.power                                0kW
v.i.temp                                 16.6667°C
v.m.rpm                                  0
v.m.temp                                 17.2222°C
v.p.acceleration
v.p.altitude
v.p.direction
v.p.gpshdop
v.p.gpslock
v.p.gpsmode
v.p.gpsspeed
v.p.latitude
v.p.location
v.p.longitude
v.p.odometer                             93137.3km
v.p.satcount
v.p.speed
v.p.trip
v.t.alert
v.t.health
v.t.pressure
v.t.temp
v.type                                   NL
v.vin
xnl.bms.balancing                        1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96
xnl.bms.temp.int                         22,22,255,22,22,0°C
xnl.bms.thermistor                       494,492,65535,494
xnl.cc.fan.only                          no
xnl.cc.remotecool                        no
xnl.cc.remoteheat                        no
xnl.cc.rqinprogress                      no
xnl.v.b.charge.limit                     102.3kW
xnl.v.b.e.available                      13.76kWh
xnl.v.b.e.capacity                       13.84kWh
xnl.v.b.gids                             172
xnl.v.b.heatergranted                    no
xnl.v.b.heaterpresent                    no
xnl.v.b.heatrequested                    no
xnl.v.b.hx                               60.7
xnl.v.b.max.gids                         0
xnl.v.b.output.limit                     110kW
xnl.v.b.range.instrument                 0km
xnl.v.b.regen.limit                      7.25kW
xnl.v.b.soc.instrument                   80%
xnl.v.b.soc.newcar                       61.21%
xnl.v.b.soc.nominal                      79.8%
xnl.v.b.soh.instrument                   0%
xnl.v.b.soh.newcar                       74.7838%
xnl.v.b.type                             1
xnl.v.c.chargebars                       0
xnl.v.c.chargeminutes3kW                 0
xnl.v.c.count.l0l1l2                     0
xnl.v.c.count.qc                         0
xnl.v.c.duration                         60,60,120,5,5,5Min
xnl.v.c.event.notification               reset
xnl.v.c.event.reason
xnl.v.c.limit.reason                     normal
xnl.v.c.quick                            0
xnl.v.c.state.previous                   timerwait
xnl.v.e.hvac.auto                        no
Lenbok commented 2 years ago

Almost suspicious timing in terms of the faux start/stops 24 hours after the last charge finished, it wakes up and starts/stops almost immediately, and then a duplicate "target level reached" / "charge stopped" pair of messages sent an hour later: Screenshot_20220220-220112

Log from around the time: somelog.txt

Hope this is helpful in working out why it seems to have a mind of its own!

mjkapkan commented 2 years ago

@Lenbok Could it be that you have set the charging timer in the car to start at specific time each day? The logic to start the charging in OVMS is not based on any timers.

Lenbok commented 2 years ago

I have a timed charge set for once a week on a Friday, so it shouldn't be that. (Having a timed charge set was the only way I could think of that I can connect the charger to the leaf without it starting to charge immediately, since I want to delay until the solar is ready)

mjkapkan commented 2 years ago

What model year your car is? Do you have the scheduled preheat/precool enabled?

I have tested this scenario, but can't reproduce it on my 2013 car.

Lenbok commented 2 years ago

My leaf model year is 2014. I do not have scheduled preheat/precool enabled. The factory TCU is unplugged.

Lenbok commented 2 years ago

I do get fairly regular crash aborts, e.g.:

Last boot was 2673 second(s) ago
Time at boot: 2022-02-21 07:54:12 NZDT
  This is reset #315 since last power cycle
  Detected boot reason: Crash (12/12)
  Reset reason: Task watchdog (6)
  Crash counters: 198 total, 0 early

Last crash: abort() was called on core 0
  Backtrace:
  0x4008ddca 0x4008e065 0x400e9608 0x40084176
  WDT tasks: IDLE0
  Version: 3.3.001-282-gbd4919ca/ota_0/edge (build idf v3.3.4-848-g1ff5e24b1 Feb 12 2022 00:04:22)

About 70 crashes on Feb 18th (when I took the leaf out), 6 on Feb 19th (it was home all day), 3 on Feb 20th. I wonder if some state is being reset across reboots?