Request for new input to emoncms from OpenEVSE

Presently the OpenEVSE device includes an input called ‘state’ which shows the state of the EVSE which works well and I understand the and have code that uses this input ok.

What would be really useful is a new logical input ‘evconnected’, which would simply show if an EV is connected.

Using a python script, I have tried to use the rapi request $G0 which does give this indication, however after a few hundred requests, spaced by 30sec, the response on openevse/rapi/out stops working. I have tried all sorts of permutations to get this to stay operational but to no avail. It works for about 8 hrs then gives up.

If this indication was a device input, then as the inputs seem to work continually okay I can solve my issue of using 2 OpenEVSE chargers and knowing which is occupied to modulate for PV generation.

Paul

Thanks for the feedback @paulbernardr, @glyn.hudson what do you think, could this be accessed?

Yes, due to the memory limitation of the ESP8266 recently polling can result in the unit hanging. It would good to investigate this further, maybe you could open an issue on github.

Instead of polling could you look at the ouptu ‘state’ value which can be posted to Emoncms or MQTT every few seconds with the following numerical states:

State - 1 Not Connected
State - 2 Connected
State - 3 Charging
State - 4/5 Error

MQTT would be the best way IMO, you could subscribe to the state MQTT topic via your Python script or NodeRED.

Hi Glyn
I use the ‘state’ value in my code, but have found that this does not reflect if an EV is actually plugged in when the EVSE is ‘sleeping’’.
After a lot of experimenting the state values I have found that reflect what the EVSE is doing are :
254 - EVSE Sleeping
1 - EVSE Awake - EV disconnected
2 - EVSE Ready - EV connected
3 - EVSE Charging
4 or 5 - EVSE error
If my car is charging and at the end of the day the PV output falls below 1000W, I put the EVSE to sleep. I then reset the EVSE (rapi $GR) in the morning when the PV output is above 1500W. I use Reset as just to enable the EVSE (rapi $GE) does not start the charging, (at least not on a Zoe!).

I have 2 EVSE’s, so I have been using the RAPI $G0 command to find out if the car is actually connected. If the car is disconnected when the EVSE is sleeping and later reconnected when the EVSE is still asleep the car either indicates an error with the charging post or fails to start charging when the EVSE is taken out of sleep mode. By knowing that a car has been disconnected when in sleep mode the EVSE can be set to awake so that when a car is reconnected it can enter a charge state for a very short while before the EVSE is put back to sleep. Then it all works ok - hence my problem.

If it is not possible to have the equivalent of the MQTT RAPI $G0 as an input, then I understand this is a system limitation and will have to think again but thought this was an obvious sulution etc. I’m trying to make this all automatic for multiple EVSE’s, don’t really want the users to have to go through a procedure if they decide to go out in the car in the evening.

I have now raised the freezing problem as an issue on github.

Thanks Glyn

Interesting, this must be an issue that effects the Zoe. Both my Nissan LEAF and E-Nv200 start charging fine when connected to an EVSE in sleep mode.

You are totally right, there is not predefined state to tell the difference between for EV connected/disconnected while sleeping. I’ve opened an issue on the open_evse controller firmware: