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.
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.