ESS automations

I’m looking for help with some ESS automations. I’ve had a play with Node-RED and watched hours of videos on it, but I’m still none the wiser how they relate to my system. I don’t even know if what I want to do is possible.

Multiplus II / Cerbo GX / EVCS / Fogstar batteries / AC solar

What I’d like to achieve:

  1. I have grid limit set and I’d like the EVCS to be priority to limit its charging current and the inverter limiting charge to the batteries secondary.
  2. I have AC solar on the grid side of the inverter and I’d like to export 100% of this solar to the grid. Unless I’ve missed a setting it looks like the inverter will always use excess PV to charge batteries as I have to enter a number into “Grid Setpoint”. This is to maximise our outgoing tariff and stop AC-DC-AC losses.
  3. At 19.30, daily, (after we’ve finished cooking) I’d like to force a linear battery export to hit 20% charge at 23.30 when my cheap rate starts. Perhaps re-calculating the export rate half-hourly, in case my wife decides to bake cakes in the evening for example.

If anyone can help me with the above I’d be eternally grateful.

1 Like

I am definitely not a Node-Red expert and don’t actually use nodes and connected dots.

What I do is collect all info I need, put them in a variable and use the function node to do whatever I want to do.

Have you looked at using AI to work out the flows for you…I used Google Gemini and it worked great, you just chat to it, say what you would like to achieve and it will write out the JSON text that you can import. I did a fairly complex Node-RED flow to manage my charging, I even have one that you want it will discharge the battery down to a set level by a certain time and I have zero programming experience….

If you have watched YouTube videos then you should know the basics eg how to access the UI.

Thanks guys. I’ll give Gemini a go. I’m new to AI as well.

Can you post what you typed into Gemini? I think that would help me a lot.

Not my style. I like to keep the interface clear.

But as long as it works all is fine I guess.

:grinning_face: You just chat to it like its your personal programmer you hired…have a conversation with it say you don’t understand something ask it to go slower step by like this

”hey I have a Multiplus II + Cerbo GX + EVCS + Fogstar batteries + AC solar and I am looking to write some node red automations I would like to do the following, can you help me to do this, go through the steps one by one because I have never done this before. Here is what I want to do if I am missing any information then ask me

1.I have grid limit set and I’d like the EVCS to be priority to limit its charging current and the inverter limiting charge to the batteries secondary.

  1. I have AC solar on the grid side of the inverter and I’d like to export 100% of this solar to the grid. Unless I’ve missed a setting it looks like the inverter will always use excess PV to charge batteries as I have to enter a number into “Grid Setpoint”. This is to maximise our outgoing tariff and stop AC-DC-AC losses.

  2. At 19.30, daily, (after we’ve finished cooking) I’d like to force a linear battery export to hit 20% charge at 23.30 when my cheap rate starts. Perhaps re-calculating the export rate half-hourly, in case my wife decides to bake cakes in the evening for example. “

Using Gemini I managed to get my system how I want it - Thanks for the advice Eco. If anyone’s interested (it’s pretty simple):

There’s one thing which is puzzling me. It all works but doesn’t make sense.

I’ve got a simple flow to control the EVCS charging current: Grid current > function node > EVCS set charge current

The script in the function node is:

// --- Configuration ---
const HOUSE_FUSE_LIMIT = 75;    // Main house fuse in Amps
const SAFETY_BUFFER = 0;       // Buffer to prevent tripping (sets "soft limit" to 55A)
const MIN_CHARGER_AMPS = 6;    // Minimum current most EVs require to charge
const MAX_CHARGER_AMPS = 30;   // Maximum current your charger/car supports

// --- Logic ---
let currentHouseLoad = msg.payload; // Smoothed input from your power meter
let availableHeadroom = (HOUSE_FUSE_LIMIT - SAFETY_BUFFER) - currentHouseLoad;

// Calculate target EV current
let targetEVCurrent = Math.floor(availableHeadroom);

// --- Constraints ---
if (targetEVCurrent > MAX_CHARGER_AMPS) {
    targetEVCurrent = MAX_CHARGER_AMPS;
} 

if (targetEVCurrent < MIN_CHARGER_AMPS) {
    // Some chargers need "0" to stop, others just ignore below 6A
    targetEVCurrent = 0; 
}

// --- Output ---
msg.payload = targetEVCurrent;
msg.topic = "ev_charger_limit"; // Helpful for debugging
return msg;

This sets the grid at almost exactly 60A, but why do I have to set HOUSE_FUSE_LIMIT to 75A to achieve this?

Anyone know?

If I set it to 60A, as you’d expect to, the grid hovers around 48A so it’s deducting about 20% somewhere…

1 Like

TargetEVCurrent is set at House_Fuse_Limit (75A) LESS currentHouseLoad (which hoovers at ard 12-15A) - it is 5th line of your code

Mistery solved

I see. I think I need to change the input node to the Multiplus input current.

The Multiplus and the EVCS are the only 2 things drawing current in my setup

So: EVCS current limit = Grid limit - Multiplus current

Thanks