2024 - NodeRed vs. Automations

Hello All!

Wanted to get everyone’s opinion on NodeRed vs. Automations in HASS. The last few versions of Hass have made some great improvements to the configuration and abilities of Automations natively. Curious if anyone has found it useful to switch back to Hass from NodeRed, or if they still think NodeRed should be the primary for all automations vs. the more complex ones.

Primary? Used by 24.8% of installations, apparently. Presumably the other 75.2% are using automations. :grin:

1 Like

I started 100% node red.

As I move ahead a couple years later I’ve moved some to core automation - but not just because it’s less or more complex.

Honestly my room by room occupancy stuf stays in NR. It’s just better for me in NR. But. Depending on what the function of the automation is or what my requirements are, lots moved back.

Pretty much my decision point is either:

'do I need to guarantee that this automation is running if HA is up? Then, Automation because the NR container or addon can start and close independently of HA. That for me is:

Any automation that enhances or augments the function of a specific device e.g. Life safety concerns, light synchronization on Zen32s, sync multiple states. Most of my auto off timers at a device level, autolock / auto arm, most proximity based automations, etc. Basically anything that if I turn off NR it doesn’t leave my system functionally broken.

So what does that leave?

The room engine. (matrixes time v. Occupancy v. Mode v. Etc.) Motion in room sets room occupied for x. Setting ‘Occupied’ when the house is in mode x triggers scene.roomY_modeZ_occcupied

That solution by itself is 25 ‘room’ flows (each room is it’s own) and 4 subflows (the shared flows between the rooms)

AutoVac - 4 flows. One for vac control one for the scheduler, and a couple for system sync

Time of day - picks a home mode based on a set of time windows defined by helpers Morning, Home, Evening, Night, Late Night, Away, Pause. And also auto adjusts based on occupancy, calendar (work/weekend/vacation)

So it’s not Just ‘complexity’ for me it’s more about it’s the right tool for the job.

Still think?

I’ve never thought that.


Every single one of my automations has been done with PyScript. So far I haven’t found any reason to touch yaml for anything besides actual configuration.

I like that approach and is kind of what i have been thinking. The important automations, staying with in Hass and the less important or ones not capablenim Hass.

Do you happen to have any rest based sensors? If so do you prefer those in Node Red if they don’t meet your criteria in importance.

In the past there wasn’t as much feature parity and certain automations could only be created outside of Hass built in automations.

Yes I do. They’re all in HA.

My rule is HA connects out NR connects to HA. NR does not provide integrations.

I did t mention that because it’s also covered in my - if it has to work when HA is up - rule

I do not load integrations in NR that connect externally under any circumstances. I prefer to work on securing one endpoint not two.

How far back are you talking?

I’ve always been able to automate anything I want using YAML.

That’s six years.

1 Like

The last 3 years or so, but YAML maybe the key there too. I learned YAML as I learned HA so it’s entirely possible the differences between what has improved in the GUI over the last 3 years vs. what was possible with YAML was my issue in the past.

I have a mix of Node Red and YAML.
I find Node Red easier than YAML, but I use a mix of traditional nodes and complex function nodes in Node Red.
I have some flows in Node Red that I have no clue how I would make in YAML, like never-ending loops.
Some flows are also are also part of a more complex coordination and having it in text will make it hard to comprehend, which is mainly the case with my heating control system, where I use a lot of pattern matching in entity lists and global variable calls.

1 Like

You should not need them. Everything should be state driven. Also I’ve seen loops like that crash HA from eating up all the RAM.

The only thing I know NR can do that HA can’t is polygon shaped geofencing (zones).

I have a few that callback into the flow that theoretically could lead to endless loops I’ve very carefully filtered but yeah I’m pretty sure that’s where my memory leak is Tom.

But. Day job. :joy:. I just reboot on occasion.

I started with NodeRed prior to ever hearing about Home Assistant and built a functional albeit complicated system

Then I started using HA with the NR system I built being a primary driver, over time I migrated almost everything into HA. Only a few flows remain but they are more cronjobs or processes rather than automations. I started HA automatons in NR but have done a u-turn and all automations have been migrated back into HA

Why ?

  • Ease of use and ease of maintenance within HA (for anyone who has tried to remotely update a flow from their mobile will know how painful it is)
  • Easily create helpers / variables in HA to support your automations
  • HA provides an efficient and fast event bus, why export that outside of HA to NR ? It’s like having a secondhand pipe which can break

Well there’s a lot NR can do that HA can’t but we’re talking really about automations and I think HA wins hands down.
Unfortunately some of us like myself are more comfortable writing JS but :crossed_fingers: my templating skills improve

Can you suggest an example within the scope of automations?

Genuinely curious.

YES PLEASE ! Here’s a flow I need to get rid of

Here’s one that populates a CDN cache from a sitemap.xml file
Not sure how to automate this … It’ll make 4 attempts to cache a page so it’s not an infinite loop as you see from the flow

To be fair that could quite easily be migrated to a shell script somewhere

Other examples… The HA rest API does not return a value to the caller so I have this rubbish going on iin NR :frowning:

The final flow is probably the best candidate for a HA automation (can’t show or provide this due to sensitivity)

It pulls in a row from a remote MySQL server via SSH and populates an entity’s attributes (I have no idea how to do this as a HA automation)

If you do not control your data flowing between nodes, then yes.
I handle the garbage regularly in my flows and they work nicely.

Well I use both, I have a very complex NR automation to control my heating and cooling, where the gas boiler works when the temp outside is below 10 C, my AC units heat my house when the temp is above 10 C and AC for cooling when outside temp is above 20 C, the temp inside is set via UI with simple thermostat cards.

The automation also sets different temps when we are home or away, when our dog is home or when we have guests. I could move everything to HA automations, but it would take alot of time and efford, and since it works perfect for over a year now I won’t be changing it. I also use NR for web scraping mailny info about the next bus and tram and flight info from local airport.

Everything else is done using HA automations - a total of 95 at the moment! I moved my humidifier automations from NR to HA with sheduler add on and card. Lately every new automation I’ve made with HA, and with tamplating you can do pretty much anything you can dream of in HA. :wink: