[HN Gopher] Node-RED 2.0
___________________________________________________________________
Node-RED 2.0
Author : detaro
Score : 176 points
Date : 2021-07-20 10:59 UTC (12 hours ago)
(HTM) web link (nodered.org)
(TXT) w3m dump (nodered.org)
| kilroy123 wrote:
| How does Node-RED stack up against n8n?
| anaganisk wrote:
| 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.
| maxbaines wrote:
| 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."
|
| https://n8n.io/embed
|
| For me that's troublesome and stopped me even looking at it.
|
| Be great if someone told me I am wrong.
| justin66 wrote:
| How does this compare with Octoblu?
| qbasic_forever wrote:
| None of Octoblu's github repos have been touched in a year,
| some are 5+ years without any commits. Is it still alive?
| justin66 wrote:
| I'll say "yes" if it improves the odds of someone who has
| used both explaining what the difference between Node-Red and
| Octoblu is.
| monkeydust wrote:
| 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.
| h4waii wrote:
| 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.
|
| 0. https://github.com/huginn/huginn
| mncharity wrote:
| 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?
|
| [1] https://siddhi.io/en/v5.1/docs/query-guide/#pattern [2]
| https://github.com/carloszimm/node-red-contrib-cep [3]
| https://flows.nodered.org/node/node-red-contrib-actionflows
| rektide wrote:
| > 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
| oxplot wrote:
| 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.
| vorpalhex wrote:
| 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
| xcambar wrote:
| [off-topic]
|
| 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.
| rustyminnow wrote:
| 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.
| bradknowles wrote:
| In this vein, the funniest thing I ever heard is that the
| Bible (of all documents), actually tells us what a "few"
| is. Namely, eight.
|
| See 1 Peter 3:20 at
| https://biblehub.com/niv/1_peter/3-20.htm
| mikl wrote:
| Node-RED sounds eerily like the infamous Code Red virus. Not
| great marketing.
| m-p-3 wrote:
| 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.
| peterhajas wrote:
| 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.
| sleavey wrote:
| 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.
| Tomte wrote:
| If you're using the hassOS version of homeassistant, you can
| activate plugins, and one of those is Node-RED with the
| necessary integrations.
| danielsju6 wrote:
| node-red-contrib-home-assistant-websocket is considered the
| canonical, it's the one built into the community Node-Red
| plugin. https://github.com/hassio-addons/addon-node-red
| vetinari wrote:
| And if you are not using supervisor, for the other side of
| the pipe, companion component hass-node-red -
| https://github.com/zachowj/hass-node-red.
| ryanianian wrote:
| 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).
| gregmac wrote:
| > 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 90deg away, sets them with a transition time of 300s (very
| slow fade), and the loop triggers again a few minutes later.
|
| https://i.imgur.com/XM53DO4.png
| dkdbejwi383 wrote:
| > 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.
| gregoriol wrote:
| > 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'.
| RedShift1 wrote:
| 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.
| [deleted]
| karmicthreat wrote:
| 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.
| liketochill wrote:
| 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.
| MrBuddyCasino wrote:
| 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.
| hungryforcodes wrote:
| 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.
| vorpalhex wrote:
| 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.
| rcarmo wrote:
| Actually, 2.0.1 is already out with a small fix. But great news
| altogether, especially because Node 12+ (I use 14) makes for a
| more stable runtime.
| PYTHONDJANGO wrote:
| What is the equivalent or better tool for python? I like the
| idea, but JS seems the wrong language for me, also I want to use
| lots of Python libs.
| qbasic_forever wrote:
| 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.
| contravariant wrote:
| If you care about what language it's running on then you should
| probably be using a different tool.
|
| If you need to extend the functionality there's nothing
| stopping you from running a python based server next to it.
| vorpalhex wrote:
| 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.
| yboris wrote:
| I wonder, would it be easy-enough to have a Python HTTP server
| running along side, and Node-RED will just call your pre-
| defined endpoints?
| evan_ wrote:
| absolutely, or just shell to python if you want to use
| something from a python lib
| rcarmo wrote:
| 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.
| OJFord wrote:
| 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.
| knolleary wrote:
| (Project creator here)
|
| 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.
|
| Still an area I'd like to improve.
| 094459 wrote:
| My favourite open source project, still amazing and it just keeps
| getting better. Amazing work and kudos to all the hard work from
| the community
| janci wrote:
| 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 ?
| maxbaines wrote:
| This was addressed a while back, the feature is called
| subflows.
| dang wrote:
| Past related threads:
|
| _How-to normalize home volume levels with Node-RED_ -
| https://news.ycombinator.com/item?id=23349902 - May 2020 (28
| comments)
|
| _Node-Red - Flow-Based Programming for the Internet of Things_ -
| https://news.ycombinator.com/item?id=18859019 - Jan 2019 (77
| comments)
|
| _Replacing a Pool and Spa Controller with Raspberry Pi, Arduino,
| Node Red_ - https://news.ycombinator.com/item?id=18142335 - Oct
| 2018 (3 comments)
|
| _Node-RED: A visual tool for wiring the Internet of Things_ -
| https://news.ycombinator.com/item?id=13495156 - Jan 2017 (6
| comments)
|
| _Node-Red, a tool for wiring together hardware devices, APIs and
| online services_ - https://news.ycombinator.com/item?id=8419984 -
| Oct 2014 (8 comments)
|
| _Node-RED_ - https://news.ycombinator.com/item?id=8310536 - Sept
| 2014 (1 comment)
|
| _Node-red, a visual tool for wiring the Internet of Things_ -
| https://news.ycombinator.com/item?id=8217664 - Aug 2014 (3
| comments)
|
| _Programming the Missing Links in the Internet of Things_ -
| https://news.ycombinator.com/item?id=6459564 - Sept 2013 (1
| comment)
|
| Others?
| paraknight wrote:
| 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)
| valgaze wrote:
| 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/
| sytse wrote:
| For more context on FlowForge see
| https://flowforge.com/blog/first-deploy/
|
| I'm the investor behind it and right now we plan something open
| core, a business model similar to GitLab.
| teknopurge wrote:
| I've been using node-red for around 7 years now for all sorts
| of generic web-service integration.
|
| Fantastic app and excited to see what's next.
| monkeydust wrote:
| Looking forward to learning more and getting hands-on access!
| [deleted]
| geek_at wrote:
| It's really incredible what it can do.
|
| 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
| ronyeh wrote:
| 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?
___________________________________________________________________
(page generated 2021-07-20 23:01 UTC)