Node-RED is one of the coolest pieces of software I've ever used. It's so fun to build with and really powerful-- it's truly a secret weapon. It's included I believe by default on most raspberry pi's too.
Some of the main contributors (Nick O'Leary & others) of the project evidently are cooking something up on top of Node-RED: https://flowforge.com/
I once used it to demo a vulnerability on a client's website using NodeRed that I could trigger from my phone.
Basically I made NodeRed spit out a JS file which I enbedded on their site using the vulnerability and could trigger the content of the js from my phone
Felt so movie hacking-like. Website looked normal until I flipped a switch on my phone, now all images are replaced by kittens
Wow my mind is blown. Can you provide a sketch of how you did it so I can learn from this experience? Was the vulnerability due to uploading files? What workflow did you use to deploy straight from your phone?
I taught a group of twenty second graders how to build cardboard IoT houses with a Raspberry Pi and Node Red! They set up automated lights, little computer fans for ventilation, and a web interface to control everything. It really is an incredible hidden gem among the default Raspberry Pi apps.
I use Node-RED to do home automation with Home Assistant, and I like it. As others have mentioned, it's easier to do than YAML automations - especially because you can throw in a JS "function node" when you need to just write a few lines.
Something I wish they'd get to is looping support. It's unusual that you need a third party extension to do a for-loop. Fingers crossed this can make its way into NR proper in a future release.
> Something I wish they'd get to is looping support. It's unusual that you need a third party extension to do a for-loop.
Out of curiosity, what do you need a for loop for?
I've so far only created a single loop: it randomly changes the colors of a couple lights in my office.
This uses a delay component and a switch (controllable from Home Assistant) called "office_lights_cycle". The switch both initially triggers and breaks the loop. When executed, it picks a random color for one light, sets the other to a complementary hue 90° away, sets them with a transition time of 300s (very slow fade), and the loop triggers again a few minutes later.
How are you integrating Node-RED into Home Assistant? How does Home Assistant talk to Node-RED? I recently set up Home Assistant (love it) and an MQTT broker for some sensors and I can think of many ways in which Node-RED could also be involved but don't know which is considered canonical.
Not GP, but I just expose node-red flows via http and hit those from hass. There's probably a more elegant way, but having them communicate via http also lets me hit the flows via flic buttons or Apple Shortcuts without having to go through hass (which I never let see the public internet).
> First up is a Flow Debugger. This acts like regular code debuggers, but at the flow level. You can set breakpoints on node ports, either inputs or outputs. Then, whenever a message arrives at a breakpoint, it pauses either at that node, or the entire runtime.
Really dig the developer experience upgrades.
Btw, I'd long ignored Node-RED because it was synchronous. Turns out the big change as they dropped 1.0 ~2 years ago was switching to an asychronous processing model. This makes it far more interesting imo. https://nodered.org/blog/2019/08/16/going-async
I'm really excited to see this, and this release addresses a lot of my nitpicky complaints.
If you are on the fence about using node-red, please give it a try. Despite being a skilled engineer and actively writing in a half dozen languages, I still use node-red heavily for low code tasks. Some recent examples:
+ Automated task to check a county court website for updates to a case I'm following
+ Let me know when several clinical trials I am following post results
+ Price/stock tracking
+ Prototype dashboard/debugging for a garden monitor device I built
Interestingly, "half a dozen" makes it sound bigger by relating to twelve (12), while "a handful", while closer to the truth, would somehow diminish the impact.
PS: I suggest that "a hanfdful" is closer to the truth, because any value different than 5, 6, 7 could have been named more appropriately.
e.g.
2-3: a couple
4: a handful
5-6: a handful - half a dozen
7: half a dozen (somehow)
8-9: about ten
10: ten
11-12-13: a dozen
...
If I sounds like I'm pointing fingers, see me as a target as well. I want to highlight this as a funny/interesting bias in numbering as a communication technique. If someone in the crowd has a name or reference for it, I'm still curious.
I also find this interesting. I'd argue that "a couple" can really only refer to two, but "a few" could be 2/3/4.
I think the issue though, is when you say "a handful is closer to the truth" it sounds like you're correcting gp and telling them how many languages they know/use. Perhaps gp does use exactly 6 languages so saying a half dozen IS accurate?
I personally use a "fair number" of languages on the regular as well.
I am obviously not in a position to claim any authority over the number of languages GP is working with :)
Even if "half a dozen" is accurate, the usage of such indirect phrasing has some effect on the reader. Whether it is conscious or not, "half a dozen" reader bigger than 6.
I'd argue that a “handful” is a bad measure as it is far too subjective. Even in the physical world rather than the murky depths of analogy. I've seen handful used to mean a wide range of numbers, some using it as an alternative to “a few”, some to mean around the order of 10, and so on. Half a dozen is much more likely to be interpreted by each reader as more-or-less the same scale.
Heck, it might be entirely accurate or even an understatement. I use four languages actively (c#, JS, SQL, Bash), five if you count PowerShell (though I only touch that at most once or twice a month ATM, so I'm not counting that as active). I find it very easy to believe many out there actively create new stuff in 6 or more, especially if they work on multiple sets of projects (day job current, day job legacy, personal experiments, open source projects, ...).
For all those who tried using Node-RED and couldn't get along with the visual "pipe" paradigm of programming it, Huginn [0] is an excellent alternative.
Despite my endless hatred of Node ecosystem, Node-RED is an absolute gem of a software. It hasn't skipped a beat in over a year running my home automation.
Recently became a NR user as I found it as a much more attractive way to create automations in Home Assistant vs YAML. Pretty amazing the workflows you can stitch together after some basic education.
I got briefly excited at the text editor, but it's just for 'function nodes'. I do understand that it's essentially the opposite reasoning of why Node-RED exists in the first place, but I really want a sane version-controllable file describing the configuration.
Essentially, I'd like to be able to use NR as primarily a viewer (probably also editor) of a 'source of truth' config file.
As it is, at very least nonsensical node IDs make it.. not impossible, but not useful beyond as a backup; no meaningful diffs.
The flow configuration is stored in a JSON file. That can pose challenges when it comes to getting meaningful diffs.
That said, we do have the Projects feature that brings version control (backed by git) into the editor. And when you view a diff of a flow, as we know what it is, we present a structured visual diff of the flow contents, rather than the raw JSON diff.
I wondered whether Node-RED supported complex event processing (CEP), like Siddhi's efficient regexps across non-adjacent events.[1] A quick search turned up node-red-contrib-cep[2], seemingly little used. Perhaps something might be done with node-red-contrib-actionflows[3]? It seems Node-RED's emphasis is perhaps more on integration than analysis?
Node-RED is a completely nifty piece of software and I hate it. Mostly because it doesn't do things how I like to interact with them (Not a visual programming person). Also it gives me flashbacks to dealing with Labview.
Don't think about it as visual programming because that's both inaccurate and will only mislead you more. Reason about it as a rule system for messages. You're designing little conveyer belts (or pipes if you prefer) for packets.
I haven’t used node red, but primarily program PLCs in function block or ladder logic.
If your problem can be well represented by a block diagram or transfer function then it probably lends itself to function block programming. The visual animation of the logic is very helpful to me in understanding the influence of different components on the final result and troubleshooting misoperating machines.
Briefly came in contact with it some time ago when our team had to hack up some demo for the IBM voice assistant. We disliked it very much, I have a hard time understanding what people see in it. Everything is cumbersome and slow.
You're simply not the target audience. It's brilliant for those that need what it does. I'm a developer, but when I need something quick and easy, I pull it out and it's great.
Excellent! Node-RED has come a really long way in a very short time, and this update fixes a lot of problems I've had in the past (I use it to manage my smart home setup and a few smaller automation things)
Pretty cool, I played with it at work to get some kind of printer dashboard that polled the printers periodically through SNMP for consumable status, displayed on one of our monitors in the IT department. It was also flexible so it displayed well on mobile too. It only required a Raspberry Pi, hooked up behind the TV.
It worked quite well, but we switched to a fully-managed printer provider since so I don't have to care for the printers anymore.
I'd shell out to python from nodes in node-red. I don't think there is any visual flow-based programming tool as comprehensive and well-built as node-red is today. They've been working on it for years and it shows. A lot of tools come into this space and then get abandoned after a few years unfortunately.
As a Pythonista since version 1.2, I have to (sadly) report that there is absolutely nothing out there that even comes close to what Node-RED has done. I have searched high and low, and eventually gave up.
You can generally (but not always) avoid writing JS, especially if you use some of the more clever mapping blocks. If you do write JS, it'll almost always be shuffling data structures around.
> Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.
> It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.
> Why is it called Node-RED? The name was a light-hearted play on words sounding like 'Code Red'. It stuck and was a great improvement on whatever it was called in the first few days. The 'Node' part reflects both the flow/node programming model as well as the underlying Node.JS runtime. We never did come to a conclusion on what the 'RED' part stands for. "Rapid Event Developer" was one suggestion, but we've never felt compelled to formalise anything. We stick with 'Node-RED'.
I used NodeRED by happy accident in 2016 as the backend for some dashboards being sold by the tiny startup I worked at at the time. Bizarre use case but handled things brilliantly. Glad to see this, will take another look at NodeRED for the many little project ideas I have.
I love Node-RED, I use it to collect data from all kinds of devices and shove it into a database. Plus it is a very visible solution, just go to the Node-RED address and you can see all the things going on as opposed to some daemon or scripts running somewhere, hidden from view.
The feature I missed the most in this amazing tool is the ability to compose existing node types to create new node type. It this adressed somehow in 2.0 ?
Having used both.
Node red has more “nodes” from the community than n8n, and is more powerful but easier to create a new “node”.
Installing a new node is as simple as publishing it to npm. N8n on the other side is very cumbersome with that, last i tried it.
There licence for one, and part of OpenJs Foundation.
The integrations within n8n seem a little higher level I.e app to web service, Node-RED has lower level nodes such as Http, Mqtt, Websockets etc and a stack of domain specific stuff like OPC/UA
n8n have a for me slightly odd licence. From there site “ While n8n's source code is publicly available, our license restricts our code from being embedded in commercial software products without a separate license agreement.”
Some of the main contributors (Nick O'Leary & others) of the project evidently are cooking something up on top of Node-RED: https://flowforge.com/