Node-RED vs. Home Assistant: Why not use both?

Disclosure: This post contains affiliate links. If you click through and make a purchase, I will earn a commission, at no additional cost to you. Read my full disclosure here.

I’ll often see newcomers in the various Home Assistant and self-hosting communities ask which is better, Home Assistant or Node-RED? My answer to that question is consistent. The two aren’t really comparable. Sure, they overlap in some areas such as automation, but one doesn’t necessarily replace the other. Which one you go for is a matter of preference, the community can’t tell you which you prefer.

Why restrict yourself to working with Home Assistant or Node-RED? Why not go for both? Both are fantastic applications in their own right and in my opinion, Home Assistant and Node-RED are best used together. You’ll find more information on how I use both of these tools further down.

This comparison will mainly focus on how Home Assistant and Node-RED automate smart devices. I won’t be listing every single integration each application has or detailing how you can build a UI using Node-RED.

Advantages of using Home Assistant

Home Assistant has many more integrations than Node-RED. Most of these integrations work “out of the box” and don’t need any separate installation. With Node-RED, you will need to install multiple nodes to get all integrations functioning. And even then, it might not even come close to the range of components Home Assistant supports.

You can create simple or complex automations using YAML or the web-based editor. While the configuration of an automation isn’t as visual as it is with Node-RED, the whole process is becoming more user-friendly with each and every update.

Home Assistant automation editor

The end-goal for Home Assistant would probably be to be able to configure everything from the UI. I can see a future where there will be little to no YAML code involved in setting up automations. While YAML isn’t difficult to use, it can be intimidating to newcomers. We aren’t quite there yet, but with every Home Assistant release, the editor keeps getting better.

As things are, you can easily create linear automation flows with triggers, conditions, and simple AND/OR logic functions. Home Assistant automations can get very complex with templating, but there is no easy way to use IF/THEN/ELSE operators in automations. Though, you can emulate those functions by creating multiple automations.

If you restrict yourself to using Home Assistant for everything, you have fewer points of failure. Though Node-RED has a large community behind and thus problems shouldn’t arise, there is always a chance of it failing.

Advantages of Node-RED

Node-RED is a mighty and visual node-based tool for visual programming. It is written in JavaScript and can be deployed on a multitude of systems. It is available as a Home Assistant Community Add-on and can be deployed using Docker, which is how I do it. When used with Home Assistant, it is mostly used for automations.

In Node-RED you can configure logic operators such as IF/THEN/ELSE, AND/OR, and others. Using Node-RED you can create highly complex and brilliant automations with plenty of conditions, forks, and details using the visual editor. Node-RED makes this possible, whereas Home Assistant automations would struggle.

As an example, my bedtime flow will turn off the lights, it will switch off a couple of SONOFF switches so the room is in complete darkness, and will then start playing ambient sounds on my Google Home speaker, which will gradually decrease in volume. This automation would have taken up many lines of YAML code but in Node-RED the visual nature of the automation allows me to see everything. For me personally, Node-RED makes setting up complex automations a lot easier.

A Node-RED flow

And then there’s the fact that Node-RED is quite fun to use. For me, at least, it is. I enjoy setting up my flows much more than writing YAML. I look forward to finding a solution to a problem using nodes in Node-RED.

How I use Home Assistant and Node-RED: The best of both worlds

Home Assistant is the nervous system of my home. Everything is connected to Home Assistant, and it monitors the state of each and every connected device. Node-RED is the brains of the operation. It uses Home Assistant as a compatibility layer and controls all automations through it. If a state changes, Home Assistant will be informed of that change and Node-RED will execute commands that are configured for that change in state.

I’ll sometimes use the automation editor in Home Assistant for elementary tasks. A simple automation such as turning off all lights when everyone is sleeping doesn’t need to be set up in Node-RED.

Then there’s the web interface. Home Assistant can easily be used as a dashboard for your smart home. It has a beautiful interface codenamed Lovelace which can be used to observe states and manual control of devices.

Home Assistant dashboard

What should beginners do?

If you are new to Home Assistant and are running Home Assistant, not Home Assistant Core, installing Node-RED as an add-on is straightforward. And I’d suggest you do just. Once installed, you can create a few automations in Node-RED and a few using YAML or the editor. That should give you a good feel for each application. Which one you choose for your automations is up to you.

About Liam Alexander Colman

is an experienced Home Assistant user who has been utilizing the platform for a variety of projects over an extended period. His journey began with a Raspberry Pi, which quickly grew to three Raspberry Pis and eventually a full-fledged server. Liam's current operating system of choice is Unraid, with Home Assistant comfortably running in a Docker container.
With a deep understanding of the intricacies of Home Assistant, Liam has an impressive setup, consisting of various Zigbee devices, and seamless integrations with existing products such as his Android TV box. For those interested in learning more about Liam's experience with Home Assistant, he shares his insights on how he first started using the platform and his subsequent journey.

1 thought on “Node-RED vs. Home Assistant: Why not use both?”

  1. You can do a lot of this out-of-the-box in Apple’s Siri shortcuts / macOS Automator too.

    And even more powerful, you can also use iPhone/mac events as triggers.

    https://imgur.com/a/Nwalkhf

    I use it in conjunction with Node-Red / Home Assistant and it’s insanely powerful since Apple give you so many automation options. macOS / iOS is an insanely powerful automation system.

    Reply

Leave a comment

Share to...