# OpenEVSE - Manually controlling charge rate and start/stop via http API versus PV Divert

**URL:** <https://community.openenergymonitor.org/t/openevse-manually-controlling-charge-rate-and-start-stop-via-http-api-versus-pv-divert/23499>\
**Category:** OpenEVSE\
**Tags:** mqtt, solarpvdivert\
**Created:** [27 April 2023 09:28 UTC](https://community.openenergymonitor.org/t/openevse-manually-controlling-charge-rate-and-start-stop-via-http-api-versus-pv-divert/23499 "2023-04-27T09:28:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kilowatts.io](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/kilowatts.io/32/21624_2.png) [@kilowatts.io](https://community.openenergymonitor.org/u/kilowatts.io)\
**Post date:** [27 April 2023 09:28 UTC](https://community.openenergymonitor.org/t/openevse-manually-controlling-charge-rate-and-start-stop-via-http-api-versus-pv-divert/23499/1 "2023-04-27T09:28:18Z")

</div>

Hi. Proud owner of an excellent new EmonEVSE

First, here’s my rough setup:

 ![Untitled presentation-2](https://community.openenergymonitor.org/uploads/default/original/3X/3/7/378903c3cdfcd45a4cf9abf18887f23b5d053c2d.png)

I’m 80% complete writing a python script on a raspberry pi to manage PV from three sources between my Victron/Pylontech house battery, Ecodan heatpump/DHW cylinder and EmonEVSE/eGolf on the front drive.

The EmonEVSE is connected directly to the meter, so isn’t visible to the Victron grid meter, which is setup to optimise self-consumption (plus winter overnight charging).

From my python script, I want to be able to divert PV to the car under two scenarios:

1. Simple: when the house battery is full, to divert away from grid export
2. Harder: before the house battery is full, alter the “grid set point” (using PyModbus) of the Victron to 5amps/1.2KW and trigger charging on the EmonEVSE.

Under the Simple scenario, the power has no opportunity cost to me, and otherwise goes to the grid. So I don’t really care about stopping when the car hits a threshold SoC, or if its driven off etc.

However, under the Harder scenario, the power could otherwise be charging the house battery, so I want to be able to monitor the car state of charge.

In addition, while I appreciate the issue with wearing out contractors, I want to be able to stop charging programmatically once it has started. In reality, given the “buffer” of the Victron it’s unlikely to happen more than once/twice a day.

I’ve understood the following challenges/limitations from the EmonEVSE documentation:

1. It seems that it isn’t possible to get the eGolf state of charge directly from EmonEVSE over the http API (please correct me if wrong), but as I can get it using Python Weconnect VW, that’s not the end of the world.
2. I can trigger a manual override using this API call ([Set the manual override | OpenEVSE WiFi v4](https://openevse.stoplight.io/docs/openevse-wifi-v4/e0ab0a4ad5e1e-set-the-manual-override)), for example to start charging at 5amps. However, while I could stop this charge by clearing the manual override ([Clear the manual override | OpenEVSE WiFi v4](https://openevse.stoplight.io/docs/openevse-wifi-v4/f8f259de4226c-clear-the-manual-override)), I wasn’t able to modify the current mid-charge by sending another post request because while I got a successful response, it didn’t seem to action the request. Is this a bug, or intended?

Do folks around here have any suggestions about:

1. Overcoming the issues with the manual override above?
2. Whether I should use “PV divert mode” instead, and perhaps use the manual override that disables/stops charging?
3. An easy to install (i.e. battery powered and wireless) grid meter I could use to move my Victron meter location from the distribution board out to the electricity meter.

---

<div class="post-metadata">

**Author:** ![Guillaume\_S](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/guillaume_s/32/21535_2.png) [@Guillaume\_S](https://community.openenergymonitor.org/u/Guillaume_S)\
**Post date:** [27 April 2023 14:45 UTC](https://community.openenergymonitor.org/t/openevse-manually-controlling-charge-rate-and-start-stop-via-http-api-versus-pv-divert/23499/2 "2023-04-27T14:45:42Z")

</div>

Hi,

1/ yes you can get all the vehicle values from the /status endpoint  
2/ it should works, the whole new UI is using the API.  
Post the json your posting to the /override when you want to control the current.  
You should set “charge\_current” property.  
Each time you post on the override/claim endpoint you need to repost all the other properties of your override/claim too or it will delete them ( so mostly the “state” and “charge\_current” one as you shouldn’t use the other one in your use case. )

---

<div class="post-metadata">

**Author:** ![jeremypoulter](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/jeremypoulter/32/1006_2.png) [@jeremypoulter](https://community.openenergymonitor.org/u/jeremypoulter)\
**Post date:** [28 April 2023 09:28 UTC](https://community.openenergymonitor.org/t/openevse-manually-controlling-charge-rate-and-start-stop-via-http-api-versus-pv-divert/23499/3 "2023-04-28T09:28:11Z")

</div>

You should also try to use the /claim endpoint for any automations, that way the override can be used for manual interactions via the web app or the button on the unit if you have one
