Installing Node-RED as a Custom App

How to install the Node-RED custom application your MultiTech device to run Node-RED

NOTE:  This content only applies to AT91SAM9G25-based products.

Node-RED support as a custom application applies to mPower 5.3.3 and above (does not apply to 5.3.0). This support is implemented as a separate custom application that the user can install and run in the system.

Size requirement: To install Node-RED as a custom app, make sure you have about 90 MB of space available on your device.

Node-RED Custom Application File

A separate custom application is provided called node-red-app-v24.tar.gz. You can install it to the system from DeviceHQ™ or via the mPower UI.

The Node-RED application will be installed on the device at /var/persistent even if the device has SD card installed.

NOTE: To ensure that you have a valid application file, verify the MD5 checksum of the custom application file.

The application has the following properties on DeviceHQ:


Installation Process using Device UI

1.  Go to Apps > Manage Apps.
2.  If not already enabled, check Enabled to enable Custom Apps.
3.  Click Add Custom App. Do the following:

a.  In the App ID field, enter Application ID.
b.  In the App Name field, enter Application Name.
c.  Click Browse, go to the location of the custom app, and select the file.
d.  To install the app, click Install Custom App.
e.  A message appears stating the Node-RED application is being installed. The system updates you on the status of the installation process including packages.
f.  The Node-RED custom application automatically installs eight packages within the application. The process takes up to 10 minutes.
g. The system reboots after all packages are installed.

Installation Process using DeviceHQ

Refer to Chapter 10, Developer in the DeviceHQ User Guide for details on installing a custom application using DeviceHQ.

To verify the installation, you can view the eight installed packages on the Package Management page:

Package Name Version
node-red-stub 1.0-r0.0
node-red-stunnel 0.1-r3.0
node-red 0.15.3-r64.2
nodejs-npm 0.10.48-r2.7.0
Nodejs 0.10.48-r2.7.0
python-compiler 2.7.15-r1.0
python-misc 2.7.15-r1.0
python-multiprocessing 2.7.15-r1.0

Note: The system allows users to delete any package manually. But deleting any of these packages will cause unexpected failures in the Node-RED application behavior.

Launching Node-RED application

By default, the Node-RED Application is disabled and not running. Also, access to Node-RED via LAN and via WAN is also disabled. These settings must be changed in order to run Node-RED.

1.  Go to Administration > Access Configuration > Node-RED Settings.
2.  Check both Via LAN and Via WAN.
3.  Click Save and Apply to save your changes.
4.  Then, go to Apps > Manage Apps > Node-RED Apps.
5.  Check Enabled to enable Node-RED.
6.  Click Save and Apply to save your changes. The system reboots.
7.  Once the system finishes reboot, you can launch Node-RED. Go to Apps > Manage Apps and click on Launch Node-RED in the upper right corner.

To make sure that the Node-RED is running, you can check the processes list by executing the command:

ps -aux | grep node

Uninstall Node-RED custom application

1.  To uninstall the custom application from Web UI, under Apps > Manage Apps > Custom Apps click on the trash can icon to delete it, or execute an uninstall app task from DeviceHQ.
2.  Click OK to confirm that the application is to be removed.

Node-RED functionality stops working as soon as the application is uninstalled, but Node-RED related features are NOT removed from Web UI and the system does NOT reboot automatically when the application is uninstalled. NOTE: The user should disable all required Node-RED settings. To hide Node-RED related settings from Web UI, the user must restart the system manually.

Custom Applications and Self-Diagnostics Features

Custom Applications can affect the device performance and require access to the resources that are not considered available by the Security Violation feature. It is not recommended to enable Self-Diagnostic features such as Security Violation and Resource Overuse while using custom applications simultaneously because it can cause unexpected system or application behavior.

A warning message is shown when the user enables Custom Application if a Self-Diagnostic feature is enabled.

Note: The system does not disable Custom Application or Self Diagnostic feature automatically. A user still can have both features enabled at the same time.