@offgridgalaxy/node-red-victron-wled 0.1.2

Expose a WLED controller as a Victron Venus OS switch (RGB light + preset dropdown) with two-way sync

npm install @offgridgalaxy/node-red-victron-wled

@offgridgalaxy/node-red-victron-wled

Makes a WLED LED controller appear as a switch on a Victron GX device (Venus OS) and keeps the two in sync both ways. It replaces a victron-virtual-switch node, a WLED node and the function nodes between them with one node.

What you get on the GX

One switch device per node, with two outputs:

Output Type Controls
Light RGB colour wheel, or RGB + white dimmer for RGBW strips (detected automatically) on/off, colour, brightness, white
Preset (optional) Dropdown Solid, plus every preset saved on the WLED
  • Changes made in the WLED app, with buttons, by schedules or from Home Assistant show up on the GX within a second. The node listens to WLED's WebSocket, so it doesn't poll.
  • Choosing a preset on the GX applies it on the WLED. Picking a colour while a preset is running switches back to Solid.
  • Presets you add on the WLED appear in the dropdown automatically.
  • If the WLED is offline, the GX shows the light with an output fault. It recovers by itself.
  • The last state is saved, so the GX shows sensible values straight after a restart.

Install

On a GX device with Venus OS Large, or any Node-RED that can reach the GX D-Bus: in Node-RED's menu choose Manage palette → Install and search for node-red-victron-wled. Or from a shell:

cd ~/.node-red          # on Venus OS Large: /data/home/nodered/.node-red
npm install @offgridgalaxy/node-red-victron-wled

Then restart Node-RED. The shared library @offgridgalaxy/victron-virtual-switch-core is installed automatically.

Moving from the earlier node-red-contrib-victron-wled tarball? Remove it (and victron-virtual-switch-core) in the palette manager first: both packages provide the same node, and Node-RED won't load it twice. Flows and the GX state are kept.

Running Node-RED somewhere other than the GX

Enable D-Bus over TCP on the GX (see the node-red-contrib-victron docs, InsecureDbusOverTcp), then start Node-RED with:

NODE_RED_DBUS_ADDRESS=<gx-ip>:78 node-red

This uses the same variable as node-red-contrib-victron.

Use

  1. Drag WLED switch (Victron Energy category) onto a flow.
  2. Enter the WLED address, or press 🔍 to find WLEDs on the network. Press 🔌 to check the connection.
  3. Set the name, the group and the labels for the two outputs. Deploy.

That's all. No wiring is needed.

Optional input

Use the input to control the light from flows, for example from a solar charger's load output:

msg.payload Effect
true / false / 1 / 0 / "on" / "off" / "toggle" switch on or off
{ brightness: 40 } 0-100; 0 switches off
{ color: "#ff8000" } or { color: [255,128,0] } solid colour
{ color: "#ffffff", white: 50 } RGBW strips
{ preset: "Porch" } / { preset: 3 } / { preset: "Solid" } apply a preset
{ wled: { ... } } raw WLED JSON API state, sent as-is

You can combine keys, for example { on: true, brightness: 80, color: "#00ff00" }.

Output

Every state change is sent as:

msg.payload = { on, brightness, color, white /* RGBW only */, preset, presetId, effect, palette }
msg.source  = 'wled' | 'venus' | 'input'   // what caused the change

Migrating from virtual switch + wled2 flows

Delete the old victron-virtual-switch nodes, the wled2 node and the function/change/link nodes between them, then add one WLED switch node. The GX gets a new switch device, so update any GX/VRM screens that referred to the old ones.


Not affiliated with or endorsed by Victron Energy. Victron, Venus OS and GX are trademarks of Victron Energy BV.

Node Info

Version: 0.1.2
Updated 1 day ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • victron-wled

Keywords

  • node-red
  • victron
  • venus-os
  • cerbo
  • wled
  • led

Maintainers