lincomatic / open_evse

Firmware for Open EVSE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`$SH` and sleep timer

chaseadam opened this issue · comments

SH kWh - set cHarge limit to kWh

I was hoping I could use $SH X to override an active delay timer (openevse sleeping), but it returns $NK^21 even though the state is in "B" (connected) {"cmd":"$G0","ret":"$OK 1^31"}%. Seems the reference to the delay timer is only for preventing delay timer from causing the evse to enter sleep mode, not to override a sleeping EVSE.

It also appears that $SH will not work in "sleeping" mode, nor will it pull the evse out of sleep, so conditions for use appear to be:

  • EVSE enabled
  • EVSE state B or C

I assume this applies to $S3 as well (but I have not confirmed.

With the current state of things, the only way I found to "activate" the charger with a kWh limit when a sleep timer is active is:

  • get and store current timer settings: $GT
  • clear timer: $ST+0+0+0+0
  • enable evse (as clearing timer leaves in sleep mode): $FE
  • set kWh limit: $SH+1
  • wait until charge is done
  • re-set timer (with values from first step): $ST+13+0+16+0

Attempting to set the timer while actively charging and a kWh limit value set will sleep the EVSE. Getting that timing right makes me nervous.

Seems there has to be a better way to override the timer, but $FE does not override it (goes immediately back to sleep). I can use $F1 to override the sleep timer (for the current session?), but for some reason I am uncomfortable with the non-explicit command of "simulate a button".

There is also no way to clear a kWh limit value when not in a good "state" (to prepare for when state is "good" to start session).

Proposals:

  • $FE equivalent option to override timer sleep mode
  • Prevent $ST from activating sleep mode when actively charging and kWh limit value set
  • Setting '$SH' when EV connected and sleep state pulls EVSE into enabled state
  • Bonus: Ability modify kWh limit value regardless of "state"

Aside: I assume this setting will use "cumulative" value now (comments use the term "total"), despite references to "additional" in #96

After upgrading to 4.x wifi, I realized this is the "old" way and the Wifi offers many better features which meet the use cases I am attempting.

https://openevse.stoplight.io/docs/openevse-wifi-v4/ZG9jOjQyMjE5ODI-open-evse-wi-fi-esp-32-gateway-v4