Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home IoT & Smart Home

NodeRED Flow for Beginners: Visual IoT Programming Guide

NodeRED Flow for Beginners: Visual IoT Programming Guide

March 11, 2026 /Posted byJayesh Jain / 0

If you’re new to IoT and find traditional coding intimidating, the Node-RED flow IoT beginners combination is your perfect entry point. Node-RED is a visual, browser-based programming tool developed by IBM that lets you connect devices, APIs, and services by dragging and dropping “nodes” and linking them together with wires. There’s no complex syntax to memorize — you build logic visually, making it ideal for students, hobbyists, and engineers transitioning into IoT from non-software backgrounds. In this comprehensive guide, we’ll set up Node-RED, connect an ESP32, and build real dashboard projects step by step.

Table of Contents

  1. What Is Node-RED and Why Use It?
  2. Installing Node-RED on Raspberry Pi / Windows / Linux
  3. Core Concepts: Nodes, Flows, and Messages
  4. Connecting ESP32 to Node-RED via MQTT
  5. Building Your First IoT Dashboard
  6. Creating Automation Flows
  7. Frequently Asked Questions

What Is Node-RED and Why Use It?

Node-RED is a flow-based programming tool built on Node.js. It provides a visual editor in your web browser where you can create programs (called “flows”) by connecting nodes together. Each node does something specific — read from a sensor, send an HTTP request, trigger on a time schedule, send an email, control an output, or display data on a dashboard. By connecting these nodes, you create IoT logic without writing a single line of traditional code.

Originally created by IBM for internal tooling, Node-RED became open source in 2013 and is now one of the most popular IoT middleware platforms worldwide. It runs on Raspberry Pi, Linux servers, Windows, macOS, and even low-power computers like Orange Pi. In India, it’s widely used in college IoT labs, industry 4.0 demonstrations, and home automation projects.

Key advantages of Node-RED for Indian IoT developers:

  • Zero cost: Completely free and open source
  • Huge library: Over 4,000 community nodes — for WhatsApp, Google Sheets, Telegram, MySQL, MQTT, HTTP, WebSockets, and more
  • Visual debugging: See messages flowing through your pipeline in real time
  • Dashboard: The node-red-dashboard package creates professional-looking web dashboards with gauges, charts, buttons, and switches
  • Works offline: Runs entirely on your local network, no cloud dependency required
D1 Mini V2 NodeMCU ESP8266

D1 Mini V2 NodeMCU 4M Bytes Lua Wi-Fi IoT Development Board – ESP8266

A compact and affordable Wi-Fi board perfect for beginners to publish sensor data to Node-RED via MQTT — ideal for first Node-RED projects.

View on Zbotic

Installing Node-RED

On Raspberry Pi (Recommended for Always-On IoT Server)

Raspberry Pi is the most popular platform for running Node-RED as a permanent IoT server in India. The official installation script makes it one command:

bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

After installation, enable it to start on boot:

sudo systemctl enable nodered.service
sudo systemctl start nodered.service

Access the editor at http://[raspberry-pi-ip]:1880 from any device on your network.

On Windows

Install Node.js from nodejs.org (LTS version), then open Command Prompt and run:

npm install -g --unsafe-perm node-red
node-red

Access at http://localhost:1880.

Install Dashboard and MQTT Nodes

In Node-RED, click the hamburger menu → Manage Palette → Install tab. Search for and install:

  • node-red-dashboard — Web UI with gauges, charts, buttons
  • node-red-contrib-mqtt-broker — Embedded MQTT broker (or use Mosquitto separately)

Core Concepts: Nodes, Flows, and Messages

Understanding these three concepts is all you need to start building:

Nodes

Nodes are the building blocks. They appear as rectangles in the editor. Each node has an input port (left side) and/or output port (right side). There are three categories:

  • Input nodes: Generate messages — MQTT subscriber, HTTP request, Inject (timer/manual trigger), sensor data
  • Processing nodes: Transform messages — Function (JavaScript), Switch (conditional routing), Change (modify payload), JSON parser
  • Output nodes: Do something with messages — MQTT publisher, HTTP response, Dashboard widgets, Email, Debug

Messages (msg object)

Everything in Node-RED flows as a JavaScript object called msg. The most important property is msg.payload, which carries the data. For example, when an MQTT message arrives from your ESP32 temperature sensor, msg.payload will contain the temperature value (e.g., "28.5"). You can add your own properties too (e.g., msg.topic, msg.timestamp).

Flows

A flow is a connected network of nodes on a single tab. You can have multiple flows on multiple tabs. Think of each tab as a different aspect of your IoT system — one tab for temperature monitoring, another for security alerts, another for device control.

Connecting ESP32 to Node-RED via MQTT

MQTT is the standard IoT messaging protocol, and it’s the bridge between your ESP32 hardware and Node-RED. You need an MQTT broker — a server that routes messages between publishers (ESP32) and subscribers (Node-RED). We’ll use Mosquitto, a lightweight open-source MQTT broker.

Install Mosquitto Broker

sudo apt install mosquitto mosquitto-clients
sudo systemctl enable mosquitto
sudo systemctl start mosquitto

Mosquitto runs on port 1883 by default. For local testing, no authentication is needed — for production, always add a password file.

ESP32 MQTT Publisher Code

#include <WiFi.h>
#include <PubSubClient.h>
#include <DHT.h>

const char* ssid     = "YOUR_WIFI";
const char* password = "YOUR_PASSWORD";
const char* mqtt_server = "192.168.1.100"; // Your Node-RED server IP

#define DHTPIN 4
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
WiFiClient espClient;
PubSubClient client(espClient);

void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) delay(500);
  client.setServer(mqtt_server, 1883);
  dht.begin();
}

void loop() {
  if (!client.connected()) {
    client.connect("ESP32Client");
  }
  float temp = dht.readTemperature();
  float hum  = dht.readHumidity();
  String payload = "{"temperature":" + String(temp) + ","humidity":" + String(hum) + "}";
  client.publish("home/livingroom/sensor", payload.c_str());
  delay(10000);
}
DHT11 Temperature and Humidity Sensor with LED

DHT11 Temperature And Humidity Sensor Module with LED

Perfect beginner sensor for your first Node-RED dashboard — provides both temperature and humidity readings, readable directly by ESP32 with a single wire.

View on Zbotic

Building Your First IoT Dashboard

With the ESP32 publishing data, let’s build a dashboard in Node-RED to display it.

  1. Drag an mqtt in node onto the canvas. Double-click it, set Server to your Mosquitto IP:1883, and Topic to home/livingroom/sensor.
  2. Drag a JSON node and connect it after the mqtt in node (this parses the JSON string into a JavaScript object).
  3. Drag a change node, set it to Set msg.payload to msg.payload.temperature. Connect it after the JSON node.
  4. Drag a gauge node (from Dashboard section). Set Label to “Temperature”, Unit to “°C”, Range 0-50. Connect it after the change node.
  5. Repeat steps 3-4 for humidity using a separate change node and gauge.
  6. Click Deploy (top right red button).
  7. Access your dashboard at http://[node-red-ip]:1880/ui.

You should now see live temperature and humidity gauges updating every 10 seconds from your ESP32. This is your first working Node-RED IoT flow!

Creating Automation Flows

Node-RED’s power comes from chaining logic. Let’s add a simple automation: send a WhatsApp message (via Telegram or email) when temperature exceeds 35°C.

  1. After the JSON node, add a switch node. Set it to check msg.payload.temperature > 35. Connect only the “true” output to the next step.
  2. Add a template node with message: ⚠️ Alert! Living room temperature is {{payload.temperature}}°C
  3. Add an email node (install node-red-node-email) with your Gmail details. Or add the Telegram node for phone notifications.
  4. Add a delay node before the alert node set to “Rate Limit: 1 message per 15 minutes” — this prevents alert flooding.

In five nodes, you’ve built a real alert system that would have required dozens of lines of code in traditional programming. This is why Node-RED is so powerful for IoT beginners.

Ai Thinker NodeMCU-32S ESP32 Dev Board

Ai Thinker NodeMCU-32S ESP32 Development Board – IPEX Version

The go-to ESP32 board for Node-RED projects — dual-core processor, Wi-Fi, Bluetooth, and enough GPIO to connect sensors, relays, and actuators simultaneously.

View on Zbotic

BMP280 Barometric Pressure and Altitude Sensor

BMP280 Barometric Pressure and Altitude Sensor I2C/SPI Module

Expand your Node-RED dashboard with atmospheric pressure and altitude data — this I2C sensor connects directly to ESP32 and publishes environmental data over MQTT.

View on Zbotic

Frequently Asked Questions

Do I need programming knowledge to use Node-RED?

No prior programming knowledge is required for basic flows. You can build dashboards, alerts, and device control entirely using visual nodes. However, basic JavaScript knowledge becomes useful when you use the Function node for custom logic that can’t be achieved with built-in nodes alone.

Can Node-RED connect to cloud platforms like AWS or Google Cloud?

Yes. There are community nodes for AWS IoT Core, Google Cloud IoT, Azure IoT Hub, ThingsBoard, Ubidots, and most major IoT cloud platforms. Node-RED can act as a local edge processing layer that aggregates sensor data before sending processed results to the cloud.

Is Node-RED secure for production use?

By default, Node-RED has no authentication. Before using it in production, enable the admin password in settings.js, add HTTPS with a self-signed or Let’s Encrypt certificate, and restrict access to your local network only using firewall rules.

What devices can connect to Node-RED?

Any device that supports MQTT, HTTP, WebSocket, or serial communication can connect to Node-RED. This includes ESP32, ESP8266, Arduino with Ethernet/Wi-Fi shields, Raspberry Pi, Python scripts, Node.js apps, and even commercial IoT devices that support standard protocols.

How many sensors can Node-RED handle simultaneously?

Node-RED runs on Node.js’s asynchronous event loop, making it surprisingly efficient. A Raspberry Pi 4 running Node-RED can comfortably handle hundreds of simultaneous MQTT connections and thousands of messages per minute without any performance issues.

Start Your Node-RED IoT Journey

Get the ESP32 boards, sensors, and components you need to build your first Node-RED IoT project. Available at Zbotic.in with fast pan-India delivery.

Shop IoT Components at Zbotic

Tags: ESP32, iot, MQTT, Node-RED, visual programming
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Blynk 2.0 vs Thingspeak: IoT D...
blog blynk 2 0 vs thingspeak iot dashboard comparison 2026 595424
blog diy smart doorbell esp32 cam with telegram notification 595431
DIY Smart Doorbell: ESP32-CAM ...

Related posts

Svg%3E
Read more

IoT Home Insurance Sensor Kit: Leak, Smoke, and Motion

April 1, 2026 0
Table of Contents IoT and Home Insurance Water Leak Detection Smoke and Fire Detection Motion and Intrusion Sensing Building the... Continue reading
Svg%3E
Read more

IoT Pet Tracker: GPS Collar with Geofencing Alerts

April 1, 2026 0
Table of Contents Introduction and Overview Hardware Components Required GPS Module Integration with ESP32 Cloud Platform Setup Real-Time Tracking Dashboard... Continue reading
Svg%3E
Read more

IoT Aquaponics Controller: Fish and Plant Automation

April 1, 2026 0
Table of Contents The Water Monitoring Challenge in India Sensor Technologies for Water Building the Sensor Node Data Transmission and... Continue reading
Svg%3E
Read more

IoT Composting Monitor: Temperature and Moisture Tracking

April 1, 2026 0
Table of Contents Why Temperature Monitoring Matters Sensor Selection Guide Hardware Assembly and Wiring Firmware Development Cloud Data Logging Alert... Continue reading
Svg%3E
Read more

IoT Beehive Monitor: Weight, Temperature, and Humidity

April 1, 2026 0
Table of Contents Why Monitor Beehives Weight Measurement System Temperature and Humidity Sensing Building the Monitor Data Analysis for Bee... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now