Introduction to Node-RED Framework and Data Flow Deployment
We have previously introduced the basics of Node-RED, including login functionality. Today, we will learn about the specific framework of the open-source visual development tool Node-RED and how to deploy the first data flow.
1
Introduction to the Interface Framework

2
Deployment of the First Data Flow
(1) Drag and Drop Input and Output Nodes:
After entering Node-RED, drag the input node “inject” and the output node “debug” from the control area into the workspace using the left mouse button. After dragging in, you will find that “inject” becomes “timestamp” and “debug” becomes “msg.payload”. This is a normal phenomenon. If your computer or Raspberry Pi is running in an English environment, the names of the nodes in the workspace will naturally change to English.
(2) Change Node Configuration:
Click the dropdown menu (small triangle) after the content option, select text string from the menu, and enter “hello world” in the input box.
You can see that at this time, the name of the “timestamp” node is displayed as “hello world”.
In Node-RED, “flow” represents the direction of data flow. Using the mouse, press and hold the left button to connect from interface 1 to interface 2 in the above image, which completes the connection of the input and output nodes. Connecting the input and output nodes with a line is probably the simplest and most intuitive way to construct a data flow.
Clicking deploy will display a successful deployment message.
Click the button on the left side of the timestamp node to send the message, and click the debugging window in the upper right corner (the small bug button) to view the output message.
3
Manually Editing JSON Format Output
In the timestamp node, the input content can not only be selected as text strings or numbers but can also output in JSON format. You can manually edit the JSON formatted code to output messages in JSON format.
Click the three dots marked in blue on the content line in the image to enter the JSON editor. Enter the JSON formatted code:
After entering, click format JSON to check for errors. Once completed, click deploy. Click the button on the left side of the timestamp to send a JSON formatted message, which will be displayed in the debugging window.


Previous Issues Review
-
Visual Interface Development with Node-RED【02】——Setting Panel Login Username and Password
-
Visual Interface Development with Node-RED【01】——Node Introduction
-
Visual Interface Development——Node-RED Environment Setup
-
If I could make a counterfeit EUV lithography machine, would the country accuse me of selling counterfeit goods?
-
NB-IoT, Cat.1, 5G Will Welcome a New Wave of Development
-
Today, it’s the one-year anniversary of the Little Bear Package!
-
The number of NB-IoT connections in the country has exceeded 100 million. Is that slow or fast?