Multiple batterybanks programmed with Node-Red

by Breezy Drifter · 1 month ago 44 views 4 replies
Breezy Drifter
Breezy Drifter
Active Member
17 posts
Joined Aug 2024
1 month ago
#17288

Been tinkering with something similar on the boat lately and thought I'd chuck it out here for discussion.

Running two separate banks — a small AGM start battery and a Fogstar 200Ah lithium leisure bank. Got a Victron SmartShunt 500A on each, both feeding data into Node-RED via MQTT from the Cerbo GX.

The idea was to automate charge priority between the banks depending on state of charge, engine run time, and solar input from the roof panels. Works a treat most of the time, but I've had a few weird edge cases where the logic gets confused when the alternator and MPPT are both pushing current simultaneously — the SOC readings drift a bit and Node-RED ends up making decisions based on dodgy data.

Anyone else gone down this route with multiple banks on a liveaboard or narrowboat setup? Curious how others have structured their flows — particularly:

  • How are you handling the alternator charge side? Got a Victron Orion-Tr Smart isolating the two banks but wondering if there's a smarter way to coordinate it all
  • Are you polling the SmartShunts directly over Bluetooth or going through the Cerbo?
  • Any decent Node-RED dashboard setups worth nicking inspiration from?

Feel like there's loads of potential here for proper automated battery management but the documentation is a bit sparse when you're dealing with two banks rather than one.

Would be good to compare notes — drop your setup below 👇

ExFirefighter
ExFirefighter
Active Member
44 posts
thumb_up 34 likes
Joined Jan 2024
1 month ago
#17310

@BreezyDrifter interesting setup. Couple of questions before I can offer anything useful:

  1. What are you using as your charge controller — Victron MPPT with a Cerbo GX, or something else entirely?
  2. Is Node-Red running locally on the Cerbo or on a separate Pi?

The reason I ask — on my narrowboat I've got a similar split between a starter bank and a Fogstar lithium leisure bank, and the key problem is that AGM and lithium want fundamentally different charge profiles. Node-Red can absolutely manage the switching logic, but you need to be confident your controller isn't simultaneously trying to bulk-charge both banks with lithium voltages, or you'll trash the AGM fairly quickly.

What's your current isolation strategy between the two banks? A Victron Cyrix-Li-ct would be the obvious answer here, but curious what you've actually got wired in.

Kent Cruiser
Kent Cruiser
Active Member
14 posts
thumb_up 8 likes
Joined Jan 2025
1 month ago
#17342

@BreezyDrifter mate my static caravan setup is basically the same thing except Node-Red kept deciding to merge both banks at 2am like some sort of nocturnal financial advisor — turns out a dodgy Victron MPPT firmware was lying about SOC and the whole automation went rogue, so double-check your BMS comms are actually talking truth before you trust any logic flows with real switching decisions.

Vivaro Wanderer
Vivaro Wanderer
Active Member
37 posts
thumb_up 12 likes
Joined Jun 2023
1 month ago
#17356

@BreezyDrifter this is exactly the kind of automation rabbit hole I fell down with my Vivaro last year. Running a similar dual-bank arrangement — Fogstar 100Ah LiFePO4 for leisure, separate AGM starter — managed through a Victron Cerbo GX feeding data into Node-Red.

The key thing I'd flag: make sure your merge/isolate logic includes a state-of-charge threshold check on both banks before any combining occurs, not just voltage. Voltage alone on lithium is notoriously deceptive mid-discharge.

@KentCruiser the "ghost merging" issue you're describing usually points to a race condition in your flow — two inject nodes firing simultaneously and confusing the relay state. Adding a 2-second delay node before your relay write call typically sorts it.

What BMS are you running on the Fogstar? That'll massively affect which parameters are worth monitoring in Node-Red.

Simon Thompson
Simon Thompson
Active Member
30 posts
thumb_up 7 likes
Joined Jan 2024
1 month ago
#17388

@BreezyDrifter running almost identical on my boat — AGM start bank plus a Fogstar lithium house bank. The key thing I found with Node-Red is getting your state-of-charge thresholds right before you let any automation actually switch relays. I burned a few evenings debugging why my combine logic was firing at wrong times, turned out my Victron BMV-712 wasn't publishing SOC fast enough for the flow to catch it cleanly.

Worth adding a small delay node (200-300ms) between the SOC trigger and your relay output — stops it chattering when values hover around the threshold.

@KentCruiser the bank-merging issue sounds like a missing condition check on your isolator state. Are you verifying the relay is actually open before allowing the merge command through?

What MPPT are you running @BreezyDrifter? That'll affect how Node-Red sees charge state across both banks.

Log in to join the discussion.

Log In to Reply