Node-RED

Node-RED is a flow-based visual programming tool that lets you build complex automations by connecting nodes on a canvas — no traditional coding required.

Node-RED is a flow-based visual programming tool originally developed by IBM for wiring together IoT devices, APIs, and online services. In the Home Assistant ecosystem it has become one of the most popular tools for building complex automations — ones that would be cumbersome or impossible to express in Home Assistant’s built-in automation editor. Instead of writing YAML or clicking through a GUI form, you build automations by connecting nodes on a canvas: each node performs a specific function, and the connections between them define how data and triggers flow through the logic.

A Node-RED flow reads left to right. Trigger nodes on the left — a Home Assistant state change, an MQTT message, a time schedule, or an HTTP request — pass messages to processing nodes in the middle, which filter, transform, delay, or branch the data based on conditions. Output nodes on the right take the processed result and do something with it: call a Home Assistant service, send an MQTT message, write to a database, or send a notification. The canvas makes the entire logic of an automation visible at once, which is its core advantage over text-based approaches: complex multi-condition automations that would be difficult to parse as YAML become immediately readable as a flow diagram.

Node-RED flow: a trigger node wired to a switch node, which branches to two action nodes on a canvas

Node-RED integrates with Home Assistant through the node-red-contrib-home-assistant-websocket node package, which adds a full set of Home Assistant-specific nodes: entity state triggers, service call nodes, event listeners, and API query nodes. These nodes communicate with Home Assistant via its WebSocket API, giving Node-RED real-time access to every entity, event, and service in your installation. Node-RED runs as a Home Assistant add-on, meaning it installs and updates through the standard add-on interface and requires no separate server or configuration outside of Home Assistant.

Pro Tip: Use Node-RED for logic, Home Assistant for simple triggers
Node-RED and Home Assistant automations work best in combination rather than competition. Use Home Assistant’s built-in automation editor for straightforward single-condition triggers — motion turns on a light, a door opens and sends a notification. Reach for Node-RED when your logic involves multiple conditions evaluated in sequence, time delays between steps, loops, or data transformation. Mixing both keeps simple automations simple and reserves Node-RED’s power for cases that genuinely need it.

The Node-RED community has produced thousands of additional node packages beyond the core library — available through the built-in palette manager — covering everything from database connectors and email senders to weather APIs and custom dashboard integrations. The flow export format is JSON, which means automations can be shared, version-controlled in Git, and imported between installations with a single copy-paste. The Node-RED community forum and flows.nodered.org maintain a large library of shared flows covering common home automation use cases, making it straightforward to adapt existing solutions rather than building from scratch.

🏠 Fun Fact: Node-RED was created by Nick O’Leary and Dave Conway-Jones at IBM Emerging Technology in 2013 as an internal tool for rapidly prototyping IoT connections. IBM open-sourced it the same year, and it was donated to the OpenJS Foundation in 2016. Despite its enterprise origins, Node-RED found its largest user base among home automation enthusiasts — a trajectory its creators reportedly did not anticipate.

Related Articles

Sources