Custom ESS workflow

by Panel Dan · 3 weeks ago 53 views 5 replies
Panel Dan
Panel Dan
Active Member
21 posts
thumb_up 5 likes
Joined Dec 2024
3 weeks ago
#32782

Been down a similar rabbit hole recently with Node-RED and thought it worth sharing here.

After the 4.x updates settled down, I finally got a workflow running on my Victron Cerbo that does something I'd wanted for ages — dynamic ESS switching based on a combination of my solar forecast (via Solcast), grid tariff window, and battery SOC. Sounds straightforward, but getting the logic to actually behave took a fair bit of wrangling.

What pushed me over the line was leaning on AI assistance for the trickier function nodes. Not a silver bullet — it confidently generated some nonsense at times — but for boilerplate MQTT topic handling and conditional branching it shaved hours off the job. The Victron MQTT paths alone are enough to send you cross-eyed.

My setup covers both the boat (when she's on shore power over winter) and the garden office, so I needed the flow to handle two quite different load profiles and charging priorities. The office runs a Fogstar 48V pack; the boat is a more cobbled-together affair. Getting them to behave sensibly under one flow without stepping on each other was the interesting bit.

A few things I'd flag for anyone attempting this:

  • Node-RED version matters — some older Victron nodes behave oddly post-4.1
  • Test in inject mode first before letting any automation near your actual grid connection
  • Keep your flow modular — one giant tangle of wires will haunt you

Curious whether anyone else here has built custom ESS logic, particularly around Octopus Agile or similar variable-rate tariffs. Feels like there's a lot of untapped potential in combining real tariff data with proper battery management.

FormerMechanic74
FormerMechanic74
Active Member
24 posts
Joined Mar 2024
3 weeks ago
#32830

@PanelDan nice one, curious what you're doing with it.

Been running Node-RED on my Cerbo for about eight months now. Main thing I've got set up is a flow that watches the Octopus Agile pricing API and automatically bumps the charge current on my Multiplus-II up during the cheap slots overnight. Saves fiddling with schedules manually every time the rates shift.

Biggest headache was getting the MQTT bridge stable — kept dropping connection after a few days until I sorted the keepalive settings.

What's your flow actually doing? Wondering if anyone else is pulling in grid frequency data to do anything clever with the ESS assistant thresholds.

NotAnElectrician80
NotAnElectrician80
Regular
84 posts
thumb_up 27 likes
Joined Jul 2023
3 weeks ago
#32836

@PanelDan jealous of anyone whose Node-RED flows actually work after a 4.x update — mine looked like spaghetti fell on a whiteboard and somehow that was my automation logic.

Running a basic ESS setup on my static caravan with a Victron MultiPlus-II and Fogstar Drift batteries, and I keep threatening myself I'll add Node-RED properly rather than just poking the VRM portal like a caveman. What's your grid setpoint logic doing — fixed or dynamic based on something sensible like Agile tariff pricing? That's the bit I actually want sorted before winter makes me regret every life decision I've made since buying this van.

Fenland Solar
Fenland Solar
Regular
90 posts
thumb_up 28 likes
Joined May 2023
3 weeks ago
#32845

@NotAnElectrician80 the spaghetti problem is real — I lost two flows to firmware drift before I started pinning my subflow versions and keeping a proper changelog in a Git repo on a Pi Zero sat alongside the Cerbo. Took the discipline of treating it like actual software rather than "just some nodes I dragged about."

@PanelDan curious what triggers you're using — time-of-use tariff windows, SOC thresholds, or something more reactive like grid frequency? I've got a flow that watches Agile half-hour slots via the Octopus API and suppresses export during negative price periods, but getting the MQTT topics right on Venus OS 4.x took longer than I'd care to admit. The com.victronenergy.system path restructure caught me completely off guard.

OldSailor
OldSailor
Senior Member
200 posts
thumb_up 60 likes
Joined Oct 2023
3 weeks ago
#32854

@FenlandSolar pinning subflows is good practice, but the real nuclear option is version-controlling your entire flows.json in a Git repo — one git diff and you can see exactly which node broke when Victron quietly shuffled the MQTT topic structure in 4.11.

For anyone doing proper ESS control via Node-RED on a Cerbo, the com.victronenergy.system/Dc/Battery/Soc path is your friend, but do sanity-check it against vebus SoC — they can drift apart more than you'd expect during bulk charge.

Also worth noting: if you're writing ESS/AcPowerSetpoint to control grid import, clamp your values in the flow itself before they hit the MQTT broker — I've seen unclamped nodes briefly request 10kW from a 3kW inverter, which is a spectacular way to ruin a Tuesday.

Partner Nomad
Partner Nomad
Active Member
44 posts
thumb_up 15 likes
Joined Mar 2024
3 weeks ago
#32877

@OldSailor version-controlling flows.js — is that something you can do directly from the Cerbo, or are you pulling the file off to a Pi or NAS somewhere and committing from there? I've been meaning to set up something more robust for my cabin backup setup but haven't got round to it yet.

Also slightly tangential but — has anyone had issues with their ESS workflows behaving differently depending on battery state? I'm running Fogstar cells and I notice my Node-RED logic seems to get a bit unpredictable around the lower SOC thresholds. Not sure if that's a DVCC quirk or something in my flow logic itself.

Would love to see @PanelDan's actual workflow if you're willing to share — even a screenshot would help those of us still fumbling around in the dark with this.

Log in to join the discussion.

Log In to Reply