ElectricPropulsion.org
Repower calculator, guides & CAN tools

Node-RED on a Cerbo GX: setup, the Victron nodes and flows for a boat

Installing Venus OS Large, opening the Node-RED editor locally and through VRM, what the Victron nodes do, three boat flows with code, dashboards, backups and recovery — from Victron's documentation.

TTMH9 min read11 sections
Charging
On this page
  1. Step 1: install Venus OS Large
  2. Step 2: open the editor
  3. The Victron nodes
  4. Flow 1: close a relay when the battery runs low
  5. Flow 2: warn when the motor runs hot
  6. Flow 3: put an unsupported sensor on the Cerbo
  7. Dashboards
  8. Backups, updates and recovery
  9. A checklist for a boat
  10. Sources
  11. Related reading

Node-RED is a visual programming tool: you wire nodes together in a browser to make flows — read a value, test it, act on it. On a Cerbo GX it runs on the device itself, with Victron's own nodes that read and write every value the Cerbo knows about. Switching a relay on battery state, raising an alarm on motor temperature, or putting a sensor the Cerbo doesn't support onto its screen takes a few nodes and, at most, a few lines of JavaScript.

This guide covers setting it up, what Victron's nodes do, three flows for a boat, and how to back it up and recover it. It is based on Victron's Venus OS Large documentation, the documentation and example flows of Victron's Node-RED nodes, and the menus in Victron's open-source GUI code, linked under Sources.

Two things to know first. Victron "does not provide support for systems which make use of these extended features" — help comes from the Victron Community. And Victron warns that Node-RED is resource-intensive: if the device runs out of memory or the CPU is overloaded, "the device will eventually reboot". A reboot also interrupts battery monitoring and DVCC while the Cerbo restarts. Keep flows light, and never make Node-RED the only thing standing between your battery and a fault: that is the BMS's job.


Step 1: install Venus OS Large

Node-RED is part of Venus OS Large, an alternative firmware image that adds Node-RED and Signal K server.

  1. Settings → General → Firmware → Online updates: set Image type to Large.
  2. Check for updates and install. The Cerbo reboots into the Large image.
  3. Set the access level to User & Installer (Settings → General → Access & Security). Victron requires it to switch Large features on and off.
  4. Settings → Integrations → Venus OS Large Features → Node-RED: choose Enabled.

Victron lists the Cerbo GX among the devices that run Venus OS Large. How much you can run depends on the processor: the Cerbo GX MK3 is three to four times faster than the MK2, and Cerbo GX MK3 vs MK2 covers when that matters. Running Node-RED and Signal K together is where an older or slower device runs out of headroom.

From the command line, the same switch is a D-Bus path on the platform service — 0 disabled, 1 enabled, 2 enabled in safe mode:

dbus -y com.victronenergy.platform /Services/NodeRed/Mode SetValue 1

See the Venus OS command-line guide for SSH access and the rest of the settings.


Step 2: open the editor

FromAddressNotes
The boat's networkhttps://venus.local:1881 or https://<Cerbo IP>:1881Accept the browser's certificate warning
AnywhereVRM Portal → your installation → Venus OS Large menuNo port forwarding

Log in as admin. Since Venus OS 3.50 the password is the one set for the Secured or Weak network security profile (Settings → General → Access & Security); before 3.50 it was the Remote Console password. Plain HTTP on port 1880 is off by default.


The Victron nodes

The Victron palette comes pre-installed. It adds four kinds of node:

NodeDoesExample
InputReads one value from one device: you pick the device, then the measurementBattery /Soc, motor drive /Motor/Temperature
OutputWrites one value to a device, from the paths that device allows to be writtenGX relay /Relay/0/State, generator /ManualStart
Virtual deviceCreates a device on the Cerbo that you feed with valuesBattery, motor drive, tank, temperature sensor, GPS, meteo, switch and more
Notification / eventShows a notification on the GX, or logs an event on VRM"Motor temperature high"

How they behave:

  • Input nodes send a message every 5 seconds by default, with the value in msg.payload. Tick only changes to send only when the value changes, and round values to cut the noise from floating-point measurements.
  • Output nodes take the value in msg.payload, and it has to match what the path expects. For an enumerated value, that's the number of the option: /Relay/0/State is 0 open, 1 closed.
  • GX relays must be set to manual first. Victron's examples say to set the relay to Manual in the GX menu or VictronConnect before Node-RED can switch it; otherwise the relay's own function (alarm, generator start) owns it.
  • Virtual devices take an object of paths and values in msg.payload, such as {"/Dc/0/Voltage": 12.5, "/Soc": 85}, and keep their last values across restarts.

The nodes use the same D-Bus services and paths as the rest of Venus OS, so anything you've read in the Lithium NG or motor drive guides applies directly.


Flow 1: close a relay when the battery runs low

The Cerbo's relay 1 drives a buzzer or a light at the helm. It closes when state of charge falls below 20% and opens again above 30%. The gap between the two — hysteresis — stops it chattering when the SoC hovers around one threshold.

Nodes: Victron input (your battery or BMS, State of charge, only changes) → function → Victron output (Venus relay 1 state).

Before deploying: set relay 1 to Manual in the GX menu.

The function node:

// Close relay 1 below 20 % SoC; open it again above 30 %.
const ON_BELOW = 20;
const OFF_ABOVE = 30;

const soc = Number(msg.payload);
if (!Number.isFinite(soc)) return null; // ignore missing values

let state = context.get("state");
if (state === undefined) state = soc < ON_BELOW ? 1 : 0; // first message after a restart

let next = state;
if (state === 0 && soc < ON_BELOW) next = 1;
if (state === 1 && soc > OFF_ABOVE) next = 0;

context.set("state", next);
if (next === state && context.get("sent")) return null; // no change, nothing to send
context.set("sent", true);
return { payload: next }; // 1 = closed, 0 = open

Test it at the dock by temporarily raising ON_BELOW above the present SoC, and check the buzzer sounds.

What it doesn't replace. On a Lynx Smart BMS NG system, the BMS already has a pre-alarm on low cell voltage with its own relay. A state-of-charge alarm in Node-RED is an earlier, softer warning, not a substitute.


Flow 2: warn when the motor runs hot

If your motor controller reports to the Cerbo (see the motor drive guide), its temperatures are on D-Bus. This flow raises a notification on the GX screen, and logs an event on VRM, once when the motor passes 90 °C, then again only after it has cooled below 80 °C.

Nodes: Victron input (motor drive, Motor temperature, round values) → function → Victron notification node, and in parallel the VRM event node.

// Alert once above 90 °C; re-arm below 80 °C.
const ALERT_ABOVE = 90;
const REARM_BELOW = 80;

const t = Number(msg.payload);
if (!Number.isFinite(t)) return null;

const armed = context.get("armed") !== false;
if (armed && t > ALERT_ABOVE) {
  context.set("armed", false);
  return { payload: `Motor temperature ${t.toFixed(0)} °C — reduce power` };
}
if (!armed && t < REARM_BELOW) context.set("armed", true);
return null;

Take the thresholds from your motor maker's documentation, not from this example. The controller will derate or shut down at its own limits; this is a warning ahead of that.


Flow 3: put an unsupported sensor on the Cerbo

A virtual device makes a sensor the Cerbo can't read natively — a temperature probe on a Raspberry Pi, a tank sender read over Modbus, a motor controller with its own serial protocol — appear on the GX like any other device. It shows on the screen, goes to VRM and is readable over Modbus TCP and MQTT.

For a motor controller that the Cerbo doesn't support, feed a virtual motor drive an object of D-Bus paths:

// msg.payload arrives from your own parser, e.g. { rpm, volts, amps, motorC }
const d = msg.payload;
return {
  payload: {
    "/Motor/RPM": d.rpm,
    "/Dc/0/Voltage": d.volts,
    "/Dc/0/Current": d.amps,
    "/Motor/Temperature": d.motorC,
  },
};

The paths are the motordrive service's own, listed in the motor drive guide. Send all the values you have in one object rather than one message per value.


Dashboards

Victron recommends FlowFuse Dashboard 2.0 (@flowfuse/node-red-dashboard), installed from the editor's Manage palette menu; the older node-red-dashboard package is deprecated. Once a dashboard is deployed, it appears as a tile in the Venus OS Large menu on VRM, so you can watch it from home. For full control over the page, node-red-contrib-uibuilder is the alternative, if you're comfortable with HTML, CSS and JavaScript.

Installing palettes needs the Cerbo to be online. They're stored on the data partition, so firmware updates keep them, and a newer version you install takes precedence over the pre-installed one — except the Victron palette itself, which updates only with Venus OS. Victron asks you to keep at least 30 MB free on the data partition.


Backups, updates and recovery

Where your work lives. Node-RED's files are in /data/home/nodered/.node-red/: flows.json, flows_cred.json (credentials), settings-user.js, context and lib. Only settings-user.js is read; settings.js in the folder above is ignored.

Back up before every firmware update. Menu → Export → All flows saves flows.json, but not the configuration files or credentials. Copy the whole folder over SSH for a complete backup:

scp -r root@venus.local:/data/home/nodered/.node-red ./node-red-backup

A flow is eating the CPU? Choose Enabled (safe mode) under Venus OS Large Features → Node-RED. Node-RED starts without running your flows, so you can open the editor and fix them; deploying starts them again. To restart Node-RED, set it to Disabled and back to Enabled.

Starting over. The same menu has a Node-RED factory reset, which deletes all your flows. Victron also offers a USB-stick reset: put venus-data-20-node-red-reset.tgz on a stick and reboot; three beeps mean it has finished.

Permission errors. Since Venus OS 2.90 Node-RED doesn't run as root. An EACCES error usually means a flow is writing outside /data/home/nodered/.

Full data partition. Venus OS raises warning #46 below 5% free space, and a full partition breaks Node-RED, Signal K and Venus OS itself. Watch file-writing flows and logs.


A checklist for a boat

  • Flows that warn, log and automate convenience — not ones the boat's safety depends on.
  • Hysteresis or a delay on anything that switches, so it can't chatter.
  • Relays set to Manual before Node-RED controls them, and tested at the dock.
  • A complete backup of /data/home/nodered/.node-red/ before each firmware update.
  • CPU and memory checked after adding flows; on an older Cerbo, Node-RED or Signal K, not both, if it struggles.
  • Remote access through VRM, not by exposing port 1881 to the internet.

Sources

Checked on 15 November 2026:

  • Victron Energy — Venus OS Large: Signal K and Node-RED: installation, editor address and login, safe mode, Victron nodes' behaviour, relays in manual mode, virtual devices, dashboards, palettes and the 30 MB rule, file locations and backups, USB reset, permissions, warning #46, resource and support statements
  • Victron Energy on GitHub — node-red-contrib-victron, its user guide and example flows: node types, input update interval and options, output payloads, relay paths, virtual device payloads
  • Victron Energy on GitHub — gui-v2: the Venus OS Large Features menu, Node-RED modes (Disabled, Enabled, Enabled (safe mode)), factory reset and the platform-service path
  • Victron Energy — Cerbo GX & GX Touch datasheet: MK3 speed relative to the MK2

We are not affiliated with Victron Energy or the OpenJS Foundation, which hosts Node-RED.


Want exact numbers for your boat?

Use the configurator to generate a vendor-ready spec sheet.

Start the configurator
TPublished by TMHNovember 15, 2026
About & methodology