OpenEVSE Solar Divert issues with Solar PV, battery SolarEdge

Hello all, I am ultimately hoping to solve an issue with my OpenEVSE and the solar divert function.

I have a SolarEdge solar system installed in our home with an LG home battery also. I have an emonpi that is local to the inverter and battery, and an emonTX that is located with our electricity meter within a room far from the house. The emonTX can sense the total import and export going through the meter.

Can anyone tell me what information the EVSE requires to regulate the energy it is supplying to the car? I had originally thought it only needed to see the import and export. The OpenEVSE is configured to see the MQTT feed from the emonTX.

I want our car to charge only when there is sufficient energy being exported. This normally happens when the house load is low enough combined with when the home battery is fully charged.

However, the behavior I am seeing is that the home battery will fully charge, the car will start charging as per excess exported energy, but then never stops charging. It seems that the battery eventually kicks in after the sun goes down and continues to charge the car and the EVSE doesnt stop as there is no import to tell it to shut off.

One morning I even caught the EVSE switching off and on every 2 minutes or so and the logs showed it had been doing that all night - I doubt the relay inside will thank me for that.

The emonPi near the solar inverter can see solar production, but it is misled when the battery is supplying energy to the house. I am guessing I need the emonPi to fully read solar generation vs battery supplied energy, but I am uncertain how to set this up. Each time I try to configure two CT clamps to read this difference, I have been unsucessful.

I have had the OpenEVSE for a few years now. I have made sure to update the Wifi unit and I have managed to update the firmware on this and the controller to the lastest versions.

Should the emonTX import/export reading be suffient for the OpenEVSE to operate, or does it need an accurate solar generation vs battery supply also?

Many thanks for your time reading and interpreting my situation!

I have since read this thread which confirms my doubt that I cannot sense the battery side of the system as it is all on the DC side:

At the moment my emonPi and Tx are working in tandem with my solarEdge monitoring system. This isnt efficient but I wanted to start with this to learn how the system then communicates to the openEVSE.

I believe I may be able to use the solarEdge Inverter broadcasted data using a Modbus integration within Home Assistant.

Can anyone recommend how to use the Modbus data feeds to tell the OpenEVSE what it needs to know? I have read so far there are Modbus to MQTT proxys, or I may be able to use Node Red as a similar proxy.

That would seem to be pretty straightforward, so why would the battery come in to the equation? I don’t have a home battery [or an eMon/OEM], but I do have PV, eMonEVSE, Home Assistant and a Shelly EM. The Shelly pushes mains power data to Mosquitto running on the server where HA is, the EVSE reads MQTT topics for mains voltage and power. The Self Production settings seem to work fine.

This is what I used - with some modifications - to get inverter data in to MQTT. Current incarnation is a python script running in a 27s bash loop :smiley:
For my inverter, the most interesting parameter - AC power - as reported over modbus is a bit questionable. Only reported in 10W increments, minimum of 20W. Doesn’t really match what the Shelly EM says.

Hi wattaload

It seems straighforward, which is where I may be missing something. However my understanding is that the PV panels and the home battery are on the DC side of the inverter. I can not measure those with the emon equipment via CT sensors as they cannot measure DC. I can only the AC side of the inverter. If there is no Solar PV production, the battery will supply the inverter and power the house loads.

When there is solar PV energy, it can power house loads and charge the home battery. Any excess is seen by an emonTx and the EVSE can start charging the car when there is sufficient excess. The problem starts when the sun goes down as the home battery now feeds the inverter with DC, and the inverter continues to supply the house loads, including the EVSE and no export is measured by the emonTx as the inverter regulates the home battery output to match demand. The EVSE keeps charging the car at the rate it was doing at sunset and will quickly deplete the home battery.

I need the EVSE to differenciate between solar energy and battery supplied energy and to switch off when the battery starts supplying the inverter.

Thank you, I will have a good read. I feel I will need to cook the numbers of the data extracted from the solarEdge inverter to create an MQTT feed that makes sense for the EVSE.