OpenEVSE charge from PV before house battery

I wonder how are people doing this, I assume just changing the Grid +/- sensor here to the Solar PV one so that the charger does not wait for the house battery to be 100% before it starts grabbing the solar.
image
Is there a better way to do it other than having to change this value manually all the time?
Any plans for a future option/toggle on the main page to be able to set both of them and then just have another option like the Fast/Eco mode where it can be easily set?

Is it possible to change between Grid +/- and Solar PV and it’s mqtt address via the API maybe?

@sd_dracula

My experience when using ECO-mode maybe helpful …

ECO-mode is controlled by the MQTT input … emon/openevse/grid_power.

My battery (PowerWall) default mode is to charge when there is excess solar generation. So the true excess solar gen that the charger should see (via emon/openevse/grid_power) is the sum of any export and any battery charge at that point in time.

I do this as part of my Input Processing …

Only Steps 10 > 15 incl are relevant

Steps 11 & 12 control how the battery (PowerWall) is treated vis-a-vis ECO-mode

And Step 12 is key - Allow Negative means that any battery (PowerWall) charging is treated as excess Solar and so is available to the OpenEVSE charger

I use a Hildebrand GlowStick to get Import/Export powers – you will likely use emonTx and a CT.

And your feed names will be different to mine.

The net result is that EV charging takes precedence over battery charging :slight_smile:

As an aside – my experience is that any ECO charge is not truly that but creates approx 10% Import (or battery discharge). This is because the charger modulates its behaviour in timed steps to protect its internal components.

Hope this helps

Don’t have any of the emonPI gear so I can’t exactly use that.
I do have all my values in Home Assistant I’m looking into writing a script that will let me change between the two modes since I have created a new mqtt value which is (PV - house load)
If anyone has any code to share on that I would be happy to use :slight_smile:

Yes, that’s the easiest way to do it unless you can set a delay on your home battery?

In my experience, usually leaving the EVSE on Solar PV divert rather than Grid IE is fine because compared to EV charging usually on-site house consumption is low, especially when the sun is shining during the day.

Yeah I was thinking the same but house load can be massive if cooking for example so it makes sense to remove that from the current generation value

I’m doing this in Node red, and then generating a new mqtt feed for the EmonEvse,
I’ve noticed the emonevse tracks a couple of hundred watts below the actual solar, So thats what the buffer value is for.

I am taking the raw grid ± value, adding in the amount coming from battery discharge for an accurate “use” value.
I am also pulling in the Battery Charge, Divertpower (power going to the car)

I then have variables that I can set, via a node red ui.
BatterySOC = Value to charge the battery to, after which the emonevse takes all excess.
BChargeRate = value eg 2000, that would “limit” the charge rate of the battery to 2000 if there is enough excess to start the car charging.

excess solar could be 4000w, and instead of the battery charging at 3kw and only 1kw (not enough to start a charge) left over for the car, both would charge at 2kw

The last else if statement allows power to be “released” so the battery can charge at the set rate after a dip in solar production.

if(batterySOC >= chargelimit)
{

    excess = excess - (batteryCharge - chargelimit);
    msg.payload = excess - buffer;
}

else if(batteryCharge > BchargeRate)
{
    
    
    batteryCharge = batteryCharge - BchargeRate;
    
    
    excess = excess- batteryCharge;
    msg.payload = excess;
}
else if(batteryCharge < BchargeRate && divertpower > 1400 && batterySOC < 95)
{
    //reduce the available excess to the car by "how much?" - the amnout of power 
    //needed to bring the battery charge to 2000
   // node.warn(excess)
    excess = excess + (BchargeRate - batteryCharge);
   // node.warn("battery charge not high enough")
   // node.warn(batteryCharge);
   msg.payload = excess;
}
1 Like

That helps, thanks :slight_smile: