IoT News
IoT Applications

Building Node-RED Environment Based on Industrial ARM Edge Computer

Views : 1159
Author : Jerry Chen
Update time : 2024-07-19 17:52:59

Build Node-RED Environment

Node-RED is an open source visual process programming environment based on Nodejs. It can easily build custom applications and complete complex tasks by connecting simple nodes. Node-RED provides a simple way to quickly connect to external services, thus realizing the development of IoT applications.

Industrial ARM Edge Computer BL302

 

The advantages of Node-RED include: easy to use, can be edited and published using a visual graphical interface; scalability, can add new functions; support for multiple protocols, can support HTTP, MOTT, Websocket and other protocols; high availability, can support large-scale distributed deployment; security, can support security authentication and encryption; portability, can support multiple operating systems.

Industrial ARM Edge Computer BL302

 

Install Nodejs

Install Node-RED

If you need to use node-v18.12.1-linux-armv7l.tar.xz, you need to upgrade the lib library to 2.5, 2.6, 2.7; the default lib library of this machine is 2.3 (enter ldd --version to view the local glibc version).

Take node-redV16.14.0 as an example, first copy the node-v16.14.0-linux-armv7l.tar.xz file to a directory of the device (or create a new one on the root directory).

root@fl-imx6ull:~# cp /run/media/sda1/node-v16.14.0-linux-armv7l.tar.xz  /test

Then use the tar xf command to decompress the file.

root@fl-imx6ull:~# tar xf node-v16.14.0-linux-armv7l.tar.xz

Then link node, npm, and npx in the file to /usr/bin.

root@fl-imx6ull:~# ln -sf /test/node-v16.14.0-linux-armv7l/bin/node /usr/bin
root@fl-imx6ull:~# ln -sf /test/node-v16.14.0-linux-armv7l/bin/npm /usr/bin
root@fl-imx6ull:~# ln -sf /test/node-v16.14.0-linux-armv7l/bin/npx /usr/bin

Connect to the network, enter the following command and wait for a few minutes to install node-red.

Installation should be done under node-v16.14.0-linux-armv7l/bin/.

root@fl-imx6ull:~# npm install -g --unsafe-perm node-red

If an error occurs that the certificate is invalid, you can enter the following command

npm set strict-ssl false

If you are stuck at timing idealTree:#root Completed in 75683ms without response, enter the following command to resolve it:

npm config set registry https://registry.npm.taobao.org

npm config get registry

npm install -g node-red

After the installation is successful, check whether the installation is successful and the corresponding version number node -v; npm -v.

After the node is installed successfully, you need a soft link to /usr/bin

root@fl-imx6ull:~# ln -sf /test/node-v16.14.0-linux-armv7l/bin/node-red   /usr/bin

In this way, node-red can be executed in any directory;

root@fl-imx6ull:~# node-red

otherwise execute

node/test/node-v16.14.0-linux-armv7l/bin/node-red

If the execution fails, you need to operate npm uninstall, and then npm install.

After running node-red, open Google Chrome, enter http://(BL302 Internet accessible IP):1880; for example: http://192.168.2.232:1880, and enter the node-red interface.

Node Red

More information about BLIIoT--Beilai Tech.Co.,Ltd. Industrial ARM Edge Computer BL302 : https://www.bliiot.com/edge-computing-gateway-p00359p1.html

Related News
Read More >>