Branch: master
Find file Copy path
e70c880 Jan 31, 2019
1 contributor

Users who have contributed to this file

110 lines (79 sloc) 4.32 KB

Node-Red on the Omega2 Pro

A quick guide on using Node-RED with the Omega2 Pro.

Installing Node-RED

Before playing with Node-Red, we’ll need to update OnionOS and then install the Node-Red App.

First, make sure you’re Omega’s set up and connected to the internet.

You can follow the steps we have outlined here: and here:

Then, connect to the Omega’s command line ( and let’s update OnionOS:

onion os update

Once that’s done, you’ll want to navigate to OnionOS in your browser. Here’s a helpful guide on the subject:

Use the App Manager to install Node-Red:


If the installation through the App Manager is not successful, you can always resort to using opkg on the command line:

opkg update
opkg install oos-app-nodered

After installation, it will take about a minute for Node-Red to load and start running.

After every Omega2 Pro reboot, it will take about an additional minute after boot before Node-Red starts running and can be accessed in the browser.

You can then launch the app from the OnionOS home screen:

home screen

And there it is, NodeRed running in OnionOS on the Omega2 Pro:


Use the visual drag-and-drop programming style to create and deploy your own flows:


Some Examples

John Walicki, member of the IBM Watson IoT Developer Advocate team, has created some awesome example flows that make use of Watson IoT and Node-Red on the Omega2 Pro. Check them all out in John's Node-RED-Onion-Omega2-Examples GitHub Repo.

Installing Additional Node Packages

If you’re interested in using additional Node packages with Node-Red, you’ll need to install NPM:

opkg update
opkg install node-npm

To install packages with NPM, there’s a specific syntax that needs to be used. Instead of:

npm install <PACKAGE>


node --max_old_space_size=512 $(which npm) install <PACKAGE>

Installing Node Packages that require Compilation

If the Node package that you’re trying to install needs to be compiled, there is an additional step.

First, you'll need to install and configure node-gyp:

opkg update ; opkg install python
node --max_old_space_size=512 $(which npm) install -g node-gyp

Next, we'll install gcc and make, so npm can be used to install packages that require compilation:

Follow these instructions to enable the LEDE package repos:

(Just don’t comment out the Onion repos)

Your /etc/opkg/distfeeds.conf file should look something like this:

#src/gz reboot_core
src/gz reboot_base
#src/gz reboot_onion
## src/gz reboot_luci
src/gz reboot_packages
## src/gz reboot_routing
## src/gz reboot_telephony
src/gz omega2_core
src/gz omega2_base
src/gz omega2_packages
src/gz omega2_routing
src/gz omega2_onion

Then run these commands:

opkg update
opkg install make gcc
ar -rc /usr/lib/libpthread.a

And you’re all set, you’ll be able to install any Node package with the following command:

node --max_old_space_size=512 $(which npm) install <PACKAGE>