Hacker News new | past | comments | ask | show | jobs | submit login
Node-Red (github.com/naimo84)
77 points by tyrisflare on Jan 25, 2022 | hide | past | favorite | 27 comments



The one thing I want added to Node-Red is an editable, sanely git diff-able on-disk text format for its configuration. I want to be able to edit either in GUI or in text, and then view the result in the GUI (and have it work of course!).

Does anybody know if there's any plugin for or way of achieving that? When I last looked into it, people were checking in the config files (whatever format they were, perhaps proprietary) but they were a mess, may as well be binaries or PDFs etc. for all the value you'd get out of git for them.


The flows are stored as JSON and there is a setting to save them as prettified to make them more readable (`flowFilePretty: true` in the settings.js which is on by default in recent release).

Also the flow storage is fully plugable (https://nodered.org/docs/api/storage/) so nothing to stop you choosing/implementing a different storage format e.g. YAML https://github.com/natcl/node-red-contrib-yaml-storage


But can you actually hand-write it? When I last looked IDs were UUIDs or similar, so you'd have to create a node in the GUI for a start, and even then the structure of it just clearly wasn't designed for manual editing or diffing. 'Storage' sort of sums it up really, doesn't it?


Given Node-RED is intended as a low-code programming tool, hand-writing the flow JSON has never really been a requirement - certainly not one I can recall being brought up in the community. It's certainly possible to generate flow JSON via other means as the format is not hugely complicated once you know the format.

It's an array of objects, each representing a 'thing' in the flow. Each object has a unqiue id (which can be any randomly generated value), and other meta data that defines what the object is and what its configuration is.

Given most nodes have been implemented with a graphical UI in mind for configuring the nodes, you'd have to refer to individual nodes to understand what node-specific properties they require.


> certainly not one I can recall being brought up in the community

Maybe I'm not/HN isn't 'the community', but when I mentioned it 6 months ago [0] you said it was 'an area [you'd] like to improve'. ;)

The relative popularity of my comment above suggests others would be interested too. I understand it's not the focus/target audience necessarily though, I was clearer about that in [0], just a shame (for me) that the low/no-code isn't built on top of code(ish)-allowed.

It could have been an integral part (and really useful!) of ETL pipelines at work, but not without a git-sane, text-editor-editable file format. (JSON ok - not the best perhaps but ok - I mean more about requirements of IDs and general structure of the document.)

[0] - https://news.ycombinator.com/item?id=27896478


Thank you for creating this tool, I use it on multiple machines and enjoy when i find another new use for it.


Are you aware of the projects feature and how it lets you maintain all your flows in a git repo, complete with "visual" diffing?


Yes, but I can also put MS Word .docx files 'in a git repo', and diff them with MS Word proprietary version control. That's not good enough for use at work, in a software project among software engineers who don't need or necessarily want no/low-code; and it's not what I want in personal 'home automation' use either, which is where I gather it's perhaps most popular and how I discovered it - and probably most of that audience does want no/low-code and doesn't know 'what a git is', but, you know, I'm a SE, I know what git is, I like it, can't bare the idea of having anything like HA outside of its control.


Well, the node representation relies on internal identifiers and is not really human-friendly, so I think you’re out of luck there.

(I do run my home automation and quite a few dashboard and minimal API projects on Node-Red and version then that way, but if I want something with an actual lifecycle, I’ll reach for Python or Go…)


Yes, that's my point! I wish that it weren't.


The on-disk text is still crazy but you can turn on version tracking in node-red that lets you track any changes made.


Should probably change the submission title to "Awesome Node-RED".


Or "Curated list of useful resources for Node-RED", as the subtitle is on this page. Even "awesome node-red" doesn't really say anything about the content.


"Awesome X" is often used as a stand-in for "curated list of useful resources for X". Like Awesome Rust, Awesome ruby and so on.


I see. I was not aware of this, which is why I think it's a bad title :)


I am aware of it, and agree ;)

It's a bit like 'Polite Notice' - I'll decide how polite your notice is myself thanks!

Even if one word is desired, wouldn't 'ecosystem' be so much better? (I realise that's a corruption of its meaning, but it's a now widespread meaning anyway.)


Isn’t the point of “polite notice” that it looks very much like “police notice” when glancing quickly? That is certainly how it is abused by horse riders on the road around here.


Oh, maybe. I was thinking of 'please refrain from smoking outside the designated area' and similar, I thought it was a (crap) attempt at making the signage politer and less like an order (which of course it was) - but then I was a young naif when designated indoor smoking areas where allowed anyway!


I use NodeRed a lot for my smart home and local network as glue between different pieces. It works really well for “hit this API, apply this transformation, and then return it when I send you a GET at /something” or “listen for MQTT, get this key out of the message, and rebroadcast it”.


Do you use it on it's own, or with other automation software like home assistant or openhab?


I have similar process setup as original poster, instead of MQTT, I use home assistant Node-RED pallete which exposes all home assistant entities to nodered.

Node-RED automation is SO much better than home assistant automation or Huggins, ability to deploy modified flows when nodes on same flow are kept running is AMAZING!, makes dev cycle so much faster.

I use home assistant's builtin zwave, homekit controller, homekit bridge, Sonos, and InfluxDB, everything else is commented out. It's all running on used $50 HP Prodesk G2 with Ubuntu server with HASSOS in VM, VS.Code server in docker. Uses about 7 watts/hr.


I use it with HomeAssistant. I like HA automations for many things, but I really prefer NodeRed for gluing together systems or sketching things.


I use Node-Red for automating many work related tasks with the team I manage. One thing I wish it supported was multiple accounts that have separate flows. Even better would be support to separate where flows run from the UI, on a per users basis. I could host a worker node with our infra at work, allowing me to work with some of the more sensitive data and share it more openly with my peers.

All in all, it’s been a great tool to use.


I had worked +/- 5 months ago a lot with nodered. One thing I miss is some kind of benchmark performance for huge projects. Is something new in docs regarding this? This tool is really great.


I agree! what kind of project were you working on that you consider a 'huge project' genuinely curious to learn how other people are applying this to use-cases beyond home automation!


Would anyone here want a cloud-hosted hosted version of node-red? Like a PaaS for node-red?


There are a few such services out there today.

It's also what we're working on at https://flowforge.com

(Disclaimer - I'm the co-founder of the Node-RED project, and CTO/Founder at FlowForge)




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: