Contents:
Installation
Check installation instruction for different OS from this link: https://nodered.org/docs/getting-started/
Install Example for CENTOS
Installation
Verify if the installation was successful
Type in the command line interface node-red
The following information appears to prove that the installation has been successful
If you want to start Node-RED as a background process
Type in the command line interface nohup node-red &
It will prompt after startup
After seeing the above information, press enter
Type in the command line exit
The above is the installation and startup process of nodered. If you don't understand anything, you can go to the nodered official website. There are installation instructions for various systems. The address has a link at the top
Install in Dragino Gataway
Use Node-RED
Login to Node-RED interface
Enter your public IP address followed by the port number 1880
example:http://xxx.xx.xx.xx:1880/
Add flow
Take NBSN95 mod1 UDP protocol as an example
After logging into the interface click '+' to create a flow
Rename the stream
Drag UDP into the editing area
The same method as above, drag and drop functions and debug into the editing area
configure UDP in
Write to the UDP port that the device node sends to the server
Example My UDP device node sends to server port 8585
just write 8585
Note that the port that is already in use cannot be used. If the receiving fails, you need to check whether the port of the server is occupied. The sending port of the device node should not use the default port used by the server, such as a common port such as 8080.
In order to avoid data confusion, different types of nodes do not use the same UDP port, because different nodes have different data formats and different functions.
When the node successfully sends data, the effect shown in the following figure will appear
About function
If you are familiar with JS code, you can write it yourself
If you are not familiar, we have the JS code for each type of node, you just need to copy and paste it into it