Top Related Projects
Quick Overview
Node-RED is a flow-based programming tool for visual development of IoT applications and event-driven programming. It provides a browser-based editor that makes it easy to wire together flows using a wide range of nodes in the palette, which can be deployed to its runtime in a single click.
Pros
- Easy-to-use visual programming interface
- Extensive library of pre-built nodes for various functionalities
- Active community and wide range of third-party nodes
- Lightweight and runs on low-power devices like Raspberry Pi
Cons
- May not be suitable for complex, large-scale applications
- Limited debugging capabilities compared to traditional IDEs
- Performance can be an issue for high-throughput scenarios
- Steeper learning curve for developers used to traditional programming
Code Examples
- Basic HTTP request and response:
[
{
"id": "http-in",
"type": "http in",
"url": "/hello",
"method": "get",
"x": 100,
"y": 100,
"wires": [["http-response"]]
},
{
"id": "http-response",
"type": "http response",
"x": 300,
"y": 100,
"wires": []
}
]
This flow creates a simple HTTP endpoint that responds to GET requests at "/hello".
- MQTT publish and subscribe:
[
{
"id": "mqtt-sub",
"type": "mqtt in",
"topic": "sensor/temperature",
"qos": "2",
"datatype": "auto",
"x": 100,
"y": 100,
"wires": [["debug"]]
},
{
"id": "mqtt-pub",
"type": "mqtt out",
"topic": "sensor/temperature",
"qos": "2",
"retain": "",
"x": 300,
"y": 100,
"wires": []
},
{
"id": "debug",
"type": "debug",
"x": 300,
"y": 160,
"wires": []
}
]
This flow subscribes to an MQTT topic "sensor/temperature" and publishes to the same topic.
- Function node for data manipulation:
[
{
"id": "function",
"type": "function",
"func": "msg.payload = msg.payload * 1.8 + 32;\nreturn msg;",
"outputs": 1,
"x": 200,
"y": 100,
"wires": [["debug"]]
},
{
"id": "debug",
"type": "debug",
"x": 400,
"y": 100,
"wires": []
}
]
This flow uses a function node to convert temperature from Celsius to Fahrenheit.
Getting Started
-
Install Node-RED:
npm install -g node-red
-
Start Node-RED:
node-red
-
Open a web browser and navigate to
http://localhost:1880
-
Start building your flow by dragging nodes from the palette to the workspace, connecting them, and deploying your changes.
Competitor Comparisons
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
Pros of n8n
- More modern UI with a cleaner, drag-and-drop workflow builder
- Extensive library of pre-built integrations with popular services and APIs
- Built-in support for webhooks and custom functions
Cons of n8n
- Steeper learning curve for beginners compared to Node-RED
- Less extensive community support and fewer custom nodes
- Requires more system resources to run
Code Comparison
n8n workflow example:
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [100, 300]
}
]
}
Node-RED flow example:
[
{
"id": "f6f2187d.f17ca8",
"type": "inject",
"z": "2b9467.8f4d1ec8",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"x": 100,
"y": 80,
"wires": []
}
]
Both n8n and Node-RED are powerful workflow automation tools, but they cater to slightly different audiences. n8n offers a more modern interface and extensive integrations, while Node-RED provides a simpler learning curve and stronger community support. The choice between them depends on specific project requirements and user preferences.
Create agents that monitor and act on your behalf. Your agents are standing by!
Pros of Huginn
- More focused on creating autonomous agents for web scraping and data processing
- Offers a wider range of pre-built agents for various tasks
- Provides a user-friendly web interface for managing and monitoring agents
Cons of Huginn
- Steeper learning curve for non-programmers
- Less extensive community and ecosystem compared to Node-RED
- More limited in terms of IoT and hardware integration capabilities
Code Comparison
Huginn (Ruby):
class Agents::WebsiteAgent < Agent
def check
url = interpolated['url']
response = faraday.get(url)
create_event payload: { content: response.body }
end
end
Node-RED (JavaScript):
module.exports = function(RED) {
function HttpRequestNode(config) {
RED.nodes.createNode(this, config);
var node = this;
this.on('input', function(msg) {
node.send(msg);
});
}
RED.nodes.registerType("http request", HttpRequestNode);
}
Both repositories offer powerful tools for automation and data processing, but they cater to different use cases. Huginn excels in web scraping and creating complex autonomous agents, while Node-RED shines in IoT applications and visual programming. The code examples demonstrate the different approaches: Huginn uses Ruby classes for agent definitions, while Node-RED employs JavaScript functions for node creation.
Apache NiFi
Pros of NiFi
- Robust data provenance and lineage tracking
- Highly scalable for enterprise-level data processing
- Supports a wide range of data formats and protocols
Cons of NiFi
- Steeper learning curve and more complex setup
- Heavier resource requirements
- Less suitable for small-scale or IoT projects
Code Comparison
Node-RED flow example:
[{"id":"f6f2187d.f17ca8","type":"inject","z":"2b9467.8f4d1ec8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":80,"wires":[["b5898f9a.2d36e"]]}]
NiFi flow example:
<processor>
<id>665cb7e7-016a-1000-0000-00004b9b35cc</id>
<name>GenerateFlowFile</name>
<position x="184" y="80"/>
</processor>
Summary
Node-RED is more lightweight and user-friendly, ideal for IoT and smaller projects. NiFi excels in large-scale data processing with robust tracking capabilities. Node-RED uses a JavaScript-based flow configuration, while NiFi employs XML for processor definitions. Both tools offer visual flow-based programming, but cater to different scales and use cases.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Node-RED
Low-code programming for event-driven applications.
Quick Start
Check out https://nodered.org/docs/getting-started/ for full instructions on getting started.
sudo npm install -g --unsafe-perm node-red
node-red
- Open http://localhost:1880
Getting Help
More documentation can be found here.
For further help, or general discussion, please use the Node-RED Forum or slack team.
Developers
If you want to run the latest code from git, here's how to get started:
-
Clone the code:
git clone https://github.com/node-red/node-red.git cd node-red
-
Install the node-red dependencies
npm install
-
Build the code
npm run build
-
Run
npm start
Contributing
Before raising a pull-request, please read our contributing guide.
This project adheres to the Contributor Covenant 1.4. By participating, you are expected to uphold this code. Please report unacceptable behavior to any of the project's core team at team@nodered.org.
Authors
Node-RED is a project of the OpenJS Foundation.
It is maintained by:
- Nick O'Leary @knolleary
- Dave Conway-Jones @ceejay
- And many others...
Copyright and license
Copyright OpenJS Foundation and other contributors, https://openjsf.org under the Apache 2.0 license.
Top Related Projects
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot