OpenEnergyMonitor Community

Home Assistant Control of OpenEVSE

Just got my emonEVSE charger installed and I am looking to set up the control of it via Home Assistant (I will not be using a emonpi etc)

  1. It seems like there is an integration that can show basic info but it has no control OpenEVSE - Home Assistant (and can’t seem to get it working anyway)
  2. I have exposed mqtt of the openEVSE and can see these values:
    How can I find out that the state numbers etc, mean, I assume the api docs but cannot find the mapping of those values (yet)
  3. I know I can send mqtt/HTTP RAPI requests to the charger to change settings but I was wondering if there is a better way that I can integrate the controls into Home Assistant sensors.

Any advice would be appreciated or even some HA code if someone has worked out all the controls already.

The current Home Assistant integration is a bit dated, really needs updating for the v4 firmware.

The state values can be found OpenEVSE_Lib/openevse.h at master · jeremypoulter/OpenEVSE_Lib · GitHub

The best ‘documentation’ for the HTTP API is ESP32_WiFi_V4.x/test at master · OpenEVSE/ESP32_WiFi_V4.x · GitHub that is what I mostly use for testing but I am trying to find the time to write some proper docs, beat to stay away from using MQTT for control, the only way to do this at the moment is to use RAPI over MQTT and that is deprecated.

I agree it is quite dated, I have enabled username/password and the integration just fails with openevsewifi.InvalidAuthentication and there is no option to actually enter the login details which is why I cannot set it up.

  1. Thanks for the openevse.h link that helped. I’m looking for the divert mode states as well but maybe it is in another location?
  2. What is the “wh” value above coming from mqtt?
  3. The RAPI over mqtt seems to still work for me, the charger came with 4.1.0 FW.
  4. How can I set manual override on/off via RAPI?

The divert mode is ESP32_WiFi_V4.x/divert.h at master · OpenEVSE/ESP32_WiFi_V4.x · GitHub

wh is the total energy transferred, is a terrible name and really want to change it :wink:

RAPI still ‘works’ but is highly recommend not to use it as it bypasses all the logic the WiFi module is doing (eg the divert mode) so should really be avoided.

The manual override is a function applied by the WiFi module so only available via the HTTP API.

Right so might as well use HTTP only for all the “setting”
Is there a more detailed version of GitHub - OpenEVSE/ESP32_WiFi_V4.x: OpenEVSE V3 WiFi gateway using ESP32 where I can find examples all of the HTTP commands, the manual override is there, but need the one to set the charge Amps, set Normal/Eco mode etc.

Divert is set via the config, and charge current is set via the claims although the latter does not have any example

Don’t suppose you have any examples of toggling on/off directly from Home Assistant? No luck getting anything other than the mqtt RAPI requests to work.

Do you have any work in progress on an updated integration for Home Assistant?

I was thinking of starting something, but if you already have something in progress it would be great to collaborate.

I was planning on starting something but hasn’t reached the top of the to-do list yet, but see the ticket for more info, any assistance would be appreciated.

1 Like