11 ms·
Node-RED: Low-code programming for event-driven applications
- pierregillesl 5y agoAlso, you can use Node-RED with Gladys Assistant (open-source home automation software) to have a clean dashboard on top of Node-RED: https://gladysassistant.com/blog/integrate-node-red-with-gladys-assistant-in-mqtt https://gladysassistant.com/blog/integrate-node-red-with-gla...
- darkteflon 5y agoI run a Homebridge / Homekit ecosystem at home but have always been curious about leveraging Node-RED to handle more complex automations. Does anyone have any recommendations and/or recommended reading on putting these two together?
- rcarmo 5y agoI have a setup with homebridge, zigbee2mqtt, z2m (for better glue between both) and Node-RED, and a few write-ups here: https://taoofmac.com/space/blog/2019/01/13/1900 https://taoofmac.com/space/blog/2019/01/13/1900 Essentially you can use Node-RED to either act as another HomeKit bridge or to handle MQTT events from homebridge itself (I chose the latter). You can easily "fake" and inject new accessories into homebridge via the homebridge-mqtt plugin (which allows you to dynamically add accessories and "see" them in MQTT).
- darkteflon 5y agoExcellent, thank you very much for taking the time - much appreciated.
- sokoloff 5y agoIs anyone using the node-RED ecosystem to deliver end-user customization of their not-home-automation product/service? I’m looking for ways to offer practical/accessible low-code (or not considered scary code) composition for our internal users who are running light industry factory production lines, but open to learning about commercial applications in any field to draw inspiration from.
- jdcaron 5y agoWe use it as a flow designer, we export the graph data it produces to handle real procution code. It's open source, highly customizable & well made.
- kingo55 5y agoEven when you know how to script up automations, I still find Node Red invaluable for visualising and rapidly prototyping complex logic before you write a single line of code. Plus, it is the perfect accompaniment to Home Assistant.
- salzig 5y agoComplex: yeah, especially if you find a twitch streamer that uses node-red to automate his stream. (for the curious: JvPeek [ger])
- DanWritesCode 5y agoMy friend uses Node-RED to automate and run a lot of devices/things in his van (which he lives in). I'm not sure if it's better to not have a programming background, because it's one of the more difficult environments I've helped someone with and the debugging when something wasn't working was really poor, it all felt very un-intuitive.
- robk 5y agoObligatory comment that Huginn is also useful for similar applications albeit less home automation than web automation
- bluehatbrit 5y agoHuge fan of huginn, I've started running n8n and huginn on the same box recently. Some of the huginn modules are a little more work to use with common SaaS offerings. I'm hoping together they can cover basically everything I want, although I don't do any home automation.
- julius 5y agoI remember trying to use it as a web-server few years ago. You can see an example graph to get a user from the DB by id here: https://github.com/julius/node-red-contrib-sqlstring#example https://github.com/julius/node-red-contrib-sqlstring#example
- 64cde 5y agoBecause of Node-RED i learned a LOT about APIs, protocols and stuff in a playful way. Especially: -REST -GET, POST, PUT -JSON -Javascript -MQTT And all that helped me a lot in my career, just because i wanted to automate a few things. And now Node-RED is just irreplaceable in my private life.
- a254613e 5y agoI use Node-RED in combination with home assistant, for automations. It's sometimes overly complicated to follow the flows, or do something relatively simple, but otherwise it's a nice middle ground between built in YAML based automations, and something like AppDaemon which requires writing python scripts.
- kingo55 5y agoI find myself prototyping automations in Node Red before "productionising" the code in YAML. It's great for visualising flows but nothing beats automations running directly within HA. One fewer service to crash.
- Inversechi 5y agoThey changed the engine a lot so you can script the automations from the UI now. See: https://www.home-assistant.io/docs/automation/editor/ https://www.home-assistant.io/docs/automation/editor/
- ashtonkem 5y agoThe new UI editor is a better experience than yaml, but still has limitations that make node-red valuable for more complex automations. In particular juggling timers, state, and Boolean conditions with HA automations can be kind of awkward as they require you to coordinate across multiple automations, but very easy in node-red. All in all I use both. I use the native ones for simpler automations (exterior lights on at dusk, blinds up at sunrise, etc.j and node red for the complex stuff (bathroom fan on for 5 minutes unless if the door is closed or the humidity is above 65%, turn off two minutes after the door is opened and the humidity is below 60%j.
- quinn_jh 5y agoYeah node-red really rocks. Maybe I am biased as a particularly visually oriented person but i really enjoy the ease of prototyping with nodes and flows. I cannot help but sense that they may become more commonplace- there are applications for embedded sensing and data pipelines where it helps to think less in packets and more in streams or currents... also great for mocking up a synthesizer which I did with Paul Stoffregen's super rad audio tool for teensy/ARM : - ) https://www.pjrc.com/teensy/gui/ https://www.pjrc.com/teensy/gui/
- nsomaru 5y agoHow does this compare to n8n? I read somewhere that node red was more focused on IoT applications, is that correct?
- sneak 5y agoNode-RED is free software, n8n is not.
- rcarmo 5y agoIt originated in that space, but the ecosystem has taken it in very different directions. It has lower-level abstractions than n8n (which focuses on automating third-party SaaS), but can arguably do the same. I've used it for an insane amount of things, starting with home automation and telemetry but also fairly sophisticated uses, including: - Sniffing for multicast streams on a LAN and exposing IPTV set top boxes as HomeKit devices - Automating image conversion and video transcoding - Building an RSS aggregation and transformation pipeline that does translations, scraping, etc. - Building a simple GUI for managing backup snapshots and batch file copies - Monitoring Azure deployments (and exposing the data as simple dashboards). - Doing App store price checks and sending Pushover notifications when an interesting app goes on sale (backed by SQLite). - An embarrassing number of Slack and Telegram bots for various user groups/events/etc. As a general rule of thumb, Node-RED can do pretty much any kind of automation you can get a REST API for, and quite often someone out there has already built a module for it. I think of n8n more along the lines of a graphical workflow/BPM tool for SaaS, but with much less flexibility/ability to go "low level".
- beardicus 5y agothanks for listing all of these examples... i really like node-RED, and wrote up a tutorial on it a few years back, but have never actually reached for it to solve a real problem. you've given me some ideas!
- slightwinder 5y ago> - Building an RSS aggregation and transformation pipeline that does translations, scraping, etc. About how many feeds are we talking here? One per hour? Ten? Some hundred? I've thought at some point doing similar, but was not sure whether node-red or similar tools would perform well enough with this kinds of jobs.
- clearcarbon 5y agoI use nodered daily in my home automations, has been absolutely rock solid for my use case.
- maxnoe 5y agoBut who ordered the Node-RED???
- ozcjr 5y agoGold.
- adontz 5y agoCannot find if it supports any version control? Does it?
- hwillis 5y agoIt does (everything is saved as json), but it's a bit of a hassle. Scripts are saved to a single line, so you really need a plugin that breaks them up. It's really pretty silly that isn't the default. The other huge PITA is that touching a node in the UI causes the json to update even if you didn't do anything, and changes will often cause nodes in the json to reorder. That makes git commits very cluttered. Merging is also very hit-or-miss and duplicate nodes are common. You can mostly fix this with another plugin that saves flows to individual files instead of one big file (default). As long as you split your flows and subflows up enough, team members will usually not step on each others toes. I used this at work. Not a fan. If you only touched the system once every 4 months I can see the usefulness- It's easier to see the overall structure than wading through code, particularly if you're a visual person. It makes it relatively easy to pick something up that you have mostly forgotten. It is a huge PITA if you are trying to build API features quickly with a team. Especially if there's nobody to tell you to use the plugins.
- samlents 5y agoI've run into these issues as well but haven't come across those packages. What plugins are you all using?
- hwillis 5y agoset flowFilePretty to true (splits up lines in function nodes) and use node-red-contrib-flow-manager to split flows up. [1] https://flows.nodered.org/node/node-red-contrib-flow-manager https://flows.nodered.org/node/node-red-contrib-flow-manager
- throwawaypita 5y agoYou know what else is PITA? People complaining about open source and not contributing changes.
- RedShift1 5y agoI love Node-RED. Great tool to make otherwise invisible workflows visible!
- noduerme 5y agoI have just been going through a HELL of a time building a web-based app ("PWA" in progressive lingo) that needs to auto-discover certain devices on the user's LAN. This is a rebuild of an existing AIR-based app that's been in use in a corporate setting for 10 years and needs to be replaced because "death of flash". The AIR app I wrote back then handled discovering the local devices fantastically well. The problem now? Mixed-origin blockades. I can't get into all those devices and routers in each location to set up local DNS servers and maintain certificates. So the connection from the ultimate app to the local node has to be unencrypted. But this means the only answer to a web-based discovery app is to have it be served over HTTP as well. Interesting thing google missed when trying to prevent people from doing this exact thing with PWAs: If you have a valid manifest and service worker, Chrome won't run the service worker if it's not served over SSL, but it WILL include the app name and icons and let you save it to the home screen on Android; it will even cache a good deal of what you intended. For auto-discovery, I used a fuckton of hidden iframes loading asynchronously and waiting for any window.postMessage that matches what I want from a local device. Seriously, Google has made my life fucking miserable as a solo dev. They don't want anyone to be able to write an IoT app without going through them.
- tonyedgecombe 5y agoActually I'm kind of glad it's difficult to do those sort of things in Chrome.
- noduerme 5y agoThere are fantastic reasons why it should not be allowed on random local devices, unless the local device is configured with some sort of authentication... but the problem now is that total ban on accessing local devices from a secure web app is a serious choke point for anyone trying to develop something to control appliances outside the walled garden. Fascinating discussion here with a Plex dev expressing similar frustrations with the general direction of these context barriers... which in their case affects millions of users and threatens to pull down their entire platform. Their solution currently is bizarre; they actually have to hijack DNS resolution and issue SSL certs on the fly for each of their users' servers to allow their web app to connect to a local node. Not possible in my smaller corporate sphere. https://github.com/WICG/private-network-access/issues/23 https://github.com/WICG/private-network-access/issues/23
- knolleary 5y agoNode-RED co-creator and project lead here. Happy to answer any questions you have.
- pabbasian 5y agoIOT guy here, I like node-red but never dare to run it on edge device to perform ops on critical infrastructure. what is the state of the project? prototype only or business ready?
- knolleary 5y ago(Node-RED project lead here) It is not at all limited to prototyping. There are an ever-growing number of companies incorporating Node-RED in their own products and services - you can see a list of some of them on the project homepage. They span a wide range of industries and technology areas. Quite a few are industrial controller companies who include Node-RED on their commercially available edge devices.
- freen 5y agoWould love a swagger api importer!
- knolleary 5y ago(Node-RED project lead here) There are a few nodes for dealing with swagger in Node-RED - either generating Swagger doc for your HTTP end points, or on the client side to make it easy to interact with a Swagger documented API. For example: https://flows.nodered.org/node/openapi-red https://flows.nodered.org/node/openapi-red If you're looking for something that can take a Swagger/OpenAPI doc and generate a stubbed-out set of flows - that would be a neat idea. Sounds like a cool project to create as a pluing.
- ish 5y agoHow do you feel Node-RED stacks up against products like Boomi, MuleSoft, SnapLogic, etc., and is competing with those iPaaS vendors something you want to do?
- akavel 5y ago<enso-fanboi mode="on"> If you're interested in something more generic, check out if https://enso.org https://enso.org could be worth a look! Thanks to GraalVM, you might be able to import JS packages too, among others (Java, Python, & more...); OTOH with the caveat that the project is still in ways in-dev...
- goodmachine 5y agoI've been following Enso since it was Luna. Can you be a bit more explicit about 'in-dev'? Not to be used yet in production? Thanks.
- akavel 5y agoHm, honestly, this was kinda precautiously overly-defensive statement from my side. I mean, I'm also following Luna/Enso with huge interest, but it's kinda on-and-off for me; it seemed to me to still have some rough edges in the GUI last time I checked, but also it was quite long ago already - somewhere right around their 2.0 public announcement, in January 2021. No slightest idea at what state the GUI is now, or the libraries; haven't had time to approach it again since. But I expect to do that quite soon.
- goodmachine 5y agoThanks for responding. I will maintain waiting position.
- Jedd 5y agoWe're (extremely early days into) looking to use NodeRed to provide customised configurations for a fleet of telegraf agents. Telegraf has the ability to phone home and ask for its telegraf.conf as it starts up, but the server-side of that equation is frustratingly left as an exercise for the reader. There's not many ways to skin that particular cat, which is odd and unsettling in its own way.
- Graffur 5y agoI'd like to hear from some people that don't like Node-RED.
- knolleary 5y ago(Node-RED project lead here) So would we! The only way we improve is by listening to the community and taking on the feedback we get.
- deepspace 5y agoI am personally not a huge fan because my brain is not wired to do visual programming. I have Node-RED installed and running alongside HomeAssistant, but I never use it because automations that are easy to do in NR are just as simple to create directly in HA. Automations that are complex enough to need NR are easier (for me) to code and debug in Python. I think NR is great for non-programmers and maybe for quick prototyping, so I am not disparaging it in any way. The functionality and implementation is excellent; it's just not for everyone.
- finder83 5y agoI didn't dislike node red, but it didn't really fit my use case well. I wanted to use it as a REST service to write APIs for clients to use to generate reports from our various databases. Basically a low-code data pipeline from cassandra, mongo, sql, etc. It worked...but things like switching git branches while keeping things running, updating the service, aggregating results, etc, were difficult. More difficult than just writing the code. I wrote one then never used it again opting for node instances inside of our Kubernetes cluster instead.
- SEJeff 5y agoThis software is great on the esp8266 and esp32 series of microcontrollers for those who like to tinker.
- rcarmo 5y agoErm. You can't run Node-RED on those, the NodeJS runtime alone would eat three times the flash storage. You can _talk_ to them, though, from a more powerful system.
- SEJeff 5y agoSorry I meant in concert with. I run node red on a raspberry pi and then send it stuff from the esps. My brain was thinking the right thing and my fingers didn't type it. You're absolutely correct. I have them send MQTT to Node Red.
- Havoc 5y agoRecently discovered that you can build simple api style end points with it. Eg built one that tries resolving an ad domain to check if ad blocking is functioning correctly and publishes that as a end point that is suitable for an uptime dashboard
- d21d3q 5y agoI use node-red for Escape Room game high level automation. Gathering data from all the puzzles (over CANbus and mqtt), displaying game state for game masters, fallback control, audio+light sequences, etc
- eBombzor 5y agoWhat do people automate at home? I genuinely have never thought to have the need to buy a home assistant but apparently lots of people in this thread do
- deepspace 5y agoLights are the most obvious use case. Done right, you may almost never have to touch a light switch again. In my house, the central lights turn themselves on when it becomes too dark (except after bedtime), and off when it becomes too bright. Lights turn on automatically when someone enters a room (when it is dark) and turn off when they leave. When the last person leaves the house, all lights go out, except when I am on vacation, in which case the lights turn themselves on and off in a pattern that looks like I am at home. After lights come extractor fans (keeping the humidity constant) and heat/air conditioning. It is all about maintaining a comfortable home environment without having to manually turn things on and off all the time.
- recursive 5y agoI wish I could figure out how to de-automate my bathroom light. It tends to wrongly notice that I've left the room leaving my in total darkness. My workaround is to leave the light on in the adjacent closet, which, for some reason has no such amenity. I doubt a lifetime of saved button pushes would ever make up for the inconvenience of troubleshooting this not-quite-smart-enough light system. But other people have different utility functions.
- RussianCow 5y agoThis is the thing that’s kept me from pursuing home automation: the advantage of automating lighting (or anything else) is completely negated the moment something goes wrong, because you’ll spend more time debugging than you ever did flicking the light switches in the first place.
- daredoes 5y ago
- supermatt 5y agoHad a quick look at this recently, but was finding it hard to grok where the value gets "returned". Any pointers from the knowledgeable?
- yewenjie 5y agoI really like Pipedream - https://pipedream.com https://pipedream.com
- rcarmo 5y agoSince I've been asked a couple of times in the threads for Node-RED examples, here's my home automation write up from a couple of years ago: https://taoofmac.com/space/blog/2019/01/13/1900 https://taoofmac.com/space/blog/2019/01/13/1900 These days I've changed the setup a bit and now take advantage of Node-RED's debugger plugin and Projects/git features, but the rest still applies.
- dang 5y agoSome past threads. Others? Node-RED 2.0 - https://news.ycombinator.com/item?id=27892226 https://news.ycombinator.com/item?id=27892226 - July 2021 (62 comments) How-to normalize home volume levels with Node-RED - https://news.ycombinator.com/item?id=23349902 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 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 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 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 https://news.ycombinator.com/item?id=8419984 - Oct 2014 (8 comments) Node-RED - https://news.ycombinator.com/item?id=8310536 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 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 https://news.ycombinator.com/item?id=6459564 - Sept 2013 (1 comment)