OpenEVSE Home Assistant Integration

That helps, I have made some progress like toggling manual override/changing modes via http, a few questions on the http api.

  1. How do you update via /ws?

  2. How to set the max current - not following, is it via /claims?
    image
    Only found how to do it via RAPI using the SC command so far

  3. How to disable LCD backlight?

How do you update via /ws?

Just make a websocket connections to the /ws endpoint and you will be sent frames with the updated status as and when it changes. One thing I did notice with the UI is that you need to send a frame to get notifications that the socket has disconnected so in the UI we send a ping every few seconds:

{"ping":1}

How to set the max current - not following, is it via /claims?

Yea this is via /claims, depending on the use case you either send charge_current or max_current. I do need to write some docs on this but the WiFi module implements a priority system to determine the state (of which part of that is the charge current). This is to allow lots of different factors/rules to determine what the hardware will do and (hopefully) interact with each other in a sane way, for example timers and PV divert.

As far as the current goes this is determined using the smallest of these:

  • OpenEVSE firmware max charge
  • WiFi module configured max, the value set in the UI (TBD)
  • Highest priority claim max_current value
  • Highest priority claim charge_current value

The logic behind this is that the first two set the max current from a safety POV, ie the firmware value is the max the hardware can provide and the WiFi config is would be a site maximum if lower. The second two are for ‘smart’ applications, max_current is intended for things like load sharing where you would want to set a temporary maximum current but want other things to be able to change (but not exceeded) that value, where as charge_current is more for active control of the current used to actually charge. Hope that makes sense…

How to disable LCD backlight?

This is currently only possible via RAPI

For the claims, I am not seeing any examples in the claims file just this:

So what is the body message that needs to be sent for the charge_current or max_current mentioned above? Thanks

You just need to add either of those to the body with a number between 6 and the max (probably 32) current, eg:

{
  "state": "active",
  "charge_current": 16
}

But be aware there is a bug in the current build that breaks this, fix is More claims API examples and fixes · jeremypoulter/ESP32_WiFi_V4.x@4dfe0d5 · GitHub

Do you know if the current FW that’s on the device has this bug also?
image

And I did find something relating to LED brightness, does setting that to 0 switch off the backlight maybe?
image

Yeah, that fix has not been merged yet. The led brightness is for the LEDs and the OpenEVSE WiFi board, has no effect on the LCD.

Ok will keep an eye on the update/fix as I’d like to set the max charge rate limit to 16A in the FW since the car can only draw that much so I’ll compile and test it then.
Many thanks for the help here :slight_smile: