Use dashboard button for OpenEVSE control

Hi all!
As you might be able to tell, I am VERY green at this stuff, but am learning TONS!
I wanted to know IF:
In a dashboard, I create a button.
The button will start and stop my OpenEVSE charger, and/or change the mode from normal charging to eco charging.
I do have an LED that indicates the status of the charge mode and if the charger is on, so I was wondering if it could be controlled remotely.
Is this possible? Not knowing very much about the system, what additional code would I need?
This might be useful to automagically stop the charger using conditionals when setting up an input?
I appreciate all the help from the knowledgeable guys/gals here!
Thank you.

I am also very green and have no idea how to answer your question but maybe I could ask you a question you will probably know the answer to: Does your OpenEVSE charger deliver more than 16A?

The charger does not output the charging current. A common point of confustion.
What it does do is output a pilot signal to the car, and the car will draw what the pilot signal is commanding.
With that in mind, the car controls the maximum current that it will draw.

So… IF you set the charge current on the OpenEVSE to, say 60 amps, and you are connected to a Leaf, the CAR limits the max. current that it will draw to 26Amps with 230V input, and 16Amps with 120V input (Level 2 and Level 1).

IE the car limits the max current the car’s charger will draw, NOT what the OpenEVSE is commanding.

In a nutshell…
Input 230 V - Open EVSE setting 60 A - max car charger draw 26 A on level 2
Input 120 V - Open EVSE setting 16 A (max setting) - car charger draw 16 A level 1

Hope that makes sense…

Sorry, Bill, that’s not relevant to Brian, he’s in the UK, and we don’t have 120 V mains electricity here.

The OpenEVSE can still be (accidentally) set to Level 1 (L1) which will result in the pilot signal to 16A max. All OpenEVSE controllers sold via OpenEnergyMonitor have EU firmware pre-loaded which has L2 32A preset by default

Yes, I realized that, but I wanted to cover the possibilities incase someone else was reading this, for their information.

So back to my original question…
Is there a way to create a “button” on a dashboard and have that button control a relay, for instance? or is the dashboard only for inputs and display?

Yes, the OpenEVSE can be controlled viaa HTTP requests e.g to stop (pause) a charge: http://openevse/r?rapi=%24FS

To enable (start / resume a charge) issue RAPI command $FE http://openevse/r?rapi=%24FE

Or set current to 13A: http://openevse/r?rapi=%24SC+13

You can setup an Emoncms dashboard to have curl button to make these http requests:

I think this should work, I’ve not tested this myself.

Thank You Glyn for responding.
I have tried the http commands in my browser and using the openevse rapi command interface and they work perfectly.
I even used wireshark to see the commands being sent.
NOW, I have been fighting the curl function in the dashboard, and for the life of me, I cannot get anything to work.
I have tried inputting the IP address, using only the ip address, using http://ip address, using a port 80 in the port input, using the payload with and without the complete rapi comman, using GET and using POST… and NOTHING is being sent according to wireshark.

It is almost like the curl “button” is not a button. I obviously don’t know what fields need to be completed in the curl button. I didn’t know that was a button.

Is there some kind of documentation on how to use this feature? It looks like it could be very useful! OR is there another way to send HTTP to the charger?
Is it supposed to be a GET or a POST. Get, to me, would mean “get info from the device”. Is this the correct way of thinking?

Another control I want to create is a process that tests my solar output to make sure it is high enough (over 1200 watts), and enable the divert mode on my openevse charger, and if the solar output falls below 1200 watts, to put the openevse in sleep mode.
I have no problem with creating the process to compare the solar’s output using conditionals, but to send the correct HTTP command to the openevse is where I am having trouble.
From what I can see in the process list, there is a “publish to MQTT” option. In the text field, can I use the IP address of my openevse and the rapi function to control the charger?

I might give it a try and see if it works. A manual button on the dashboard would be handy also, but I am struggling with this.

I appreciate all the help I have gotten so far… thank YOU!

I’m not too familiar with how the Curl widget works, I tested it back when the feature was added and it worked fine to post data to Emoncms:

Maybe the developer who created the curl widget @RDCH106 or @brutzler can help?

I prefer using HomeAssistant for control applications, and Emoncms for data logging and visualisation.

Hello Glyn!
Thank you for the info about the curl widget. I am going to take a look and see what I can come up with.
I am also going to modify my solar process to use conditionals to determine:

  1. if the evse is in eco mode (divert)
  2. if my solar output is above 1200 watts (maybe a little higher just to make sure)
  3. if above are true, enable the evse to start charging in eco mode
  4. if solar is below 1200 watts, disable the charger.

I have to determine the difference between disabling and sleeping the charger though, and the solar output values to start charging and stop (disable/sleep) the charger.
I don’t want the car to switch the charger unnecessarily (contactor wear).

What my thinking is

  1. IF the solar falls below 1200 watts, stop charging, but still be able to manually charge.

I have a few different conditions in mind, but I need to pick one and test it out.

From what I have found in my testing, sleeping the charge controller drops out the relays in the EV which isn’t too good, and IF the import power is high enough the EV will pull in the relays again and start charging… also not too good.
IF I send a disable instead, the charge controller disables, the charge immediatly stops, but most important, the relays do NOT drop out. All I have to do is enable the charge controller again and it will start charging AND the EV will not start charging UNTIL I re-enable the controller.

IF I could create a process that can send the RAPI command, that is the hard part for me. How can a RAPI command be sent?

Correct, if ‘Eco’ (solar PV divert) is enabled and the charger is Paused/Sleeping then if the solar PV generation / export if high enough (there is excess solar PV) then the charging will re-start. If you do not want this to happen then you should also disable ‘Eco’. This can be done MQTT:

{base-topic}/divertmode/set 2

Where:
2= normal mode
1= eco mode

or HTTP POST request

URL: http://openevse/divertmode
Data: divertmode=2

AAHHH!! Thanks Glyn!
I will give that a try!