How to create flow in Node-RED Admin Basics

by Nov 20, 2020Node-Red

You can easily create a flow in Node-RED by simply following the steps given below but before diving into How to create Flow in Node-RED we will first understand about Node and flow in Node-RED. For installation and tutorial of Node-RED click here.

What is a Node?

A Node can be considered as a basic building block. It is a block with at most 1 input port and many output ports. It can be added to workspace by either dragging from node palette or using quick-add dialogue or importing from clipboard/library. A node is joined together by wires via the port which forms a model or application. Nodes are well defined placed in various sections in node palette based on their function. You can add an additional node using npm. The common type of nodes is Inject node and Debug Node.

Node with Input Output Port

Node Properties

You can open the properties of a node by double-clicking on the node in the workspace. First, we will look at the properties of Inject node.

Inject Node Properties

The Name attribute is the name given to the node in the workspace. Next is the (msg.) you can add additional (msg.anyname) by clicking on the add button and select the type from the dropdown list as shown. Moreover, you can assign a message to another message or any type like string, number, etc and enter its value. You can trigger the node by click or by setting an interval by selecting the type of interval from the dropdown as shown in the figure at right. You can enable and disable the node by clicking on the Enable/Disable button at the bottom right of the properties.

Debug Node Properties

Now we will have a look at the properties of debug node. We can select the type of content to be displayed on the debug console using the Output Attribute. Moreover, we can select where to be displayed using To attribute. The Name attribute is the name given to the node in the workspace. Finally, we have and toggle button at the bottom right to enable and disable the node.

What is Flow?

A Flow is a wired connection of nodes to build applications and programs. In other words, it is a collection of nodes and wires. The blue block is the trigger node, it can be triggered either by clicking on the block or by setting an interval. The green block is the debug node, by default, it displays the payload of the message. Both the block are connected through a wire, which creates a flow

A simple Flow

Flow Properties

You can open the Flow properties by Double clicking on the Flow tab at the top. Also you can add a new flow by double click at the side of the Flow tab

Node-RED Flow tab
Flow Properties

The Name Attribute value can be altered to change the name of the Flow Tab. You can add a description to the flow, it is useful when multiple people are working on the same project or when a new person needs to understand the flow. Finally, at the bottom right you have a toggle button to enable and disable the flow. You can also delete the flow by clicking on the delete button at the top left of properties or close the properties with changes by clicking on Done. You can also open the properties as shown below

Step to open Flow Properties

Creating a Simple Flow

For creating your first simple flow follow the steps given below

  • Drag and drop the inject node and debug node from the node palette available in common section to the workspace in the center. Then connect the node by clicking the output port of inject node and release the left click on the input port of debug node.
Flow diagram
  • Double click on the inject node to open its properties, give a name to the node of your choice, for now we select the the message type as string and enter a message and press Done once completed with configuration.
Inject node properties
  • Now you could see that the name of the node is changed to name entered in Name attribute, Message in my case. Next Double Click on the Debug node and select the output as msg. and enter the message name if not available by default. You can either select a single msg or complete msg object.
Debug Node Properties
  • Now Click on Deploy, You will get a pop-up saying successfully Deployed, then click on debug console present at the right and click on the trigger node. You will see the output in the debug console. Here you have successfully created your first flow. For more information click here.

Creating a multiplication Skill in Alexa using python

Written By Monisha Macharla

Hi, I'm Monisha. I am a tech blogger and a hobbyist. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning!

RELATED POSTS

How to export and import flows-node-red

How to export and import flows-node-red

Flows are imported and exported from the editor using their JSON format. So,Node-red makes it easy to share flows with others. Exporting flows Step 1: Click on the node that you want to export and press CTRL, the node will be highlighted. Step 2: Go the top right side...

Installing and starting Node-red

Installing and starting Node-red

Node-red is a programming tool for wiring together hardware devices, APIs, and online services in new and interesting ways. Install Node-red  Open the official page for Node.js downloads and download Node-red for Windows by clicking the "Windows Installer" option...

How to create a basic Dashboard in Node-RED

How to create a basic Dashboard in Node-RED

You can create a basic Dashboard in Node-RED by following the steps given here. Firstly, the Dashboard is not built-in so you first need to install the Dashboard. Installing Dashboard and Initializing Node-RED Assuming you have already installed Node.js and Node-RED...

Node-RED Tutorial

Node-RED Tutorial

Introduction One of the most important factors that limit the development of the IoT(Internet of Things) applications is the lack of comfortable means to develop rules for IoT devices interacting with each other. IBM developed an Open-Source tool called Node-RED to...

What is Node-RED?

What is Node-RED?

In this article, we will learn about Node-RED and its importance to the Internet of Things. It was developed in the year of 2013 by IBM Emerging Technology- Nick O'Leary and Dave Conway-Jones. The Node-RED is a visual tool that provides a web-based flow editor that...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....