Overview

Node-RED runs on the Node.js platform, a cross-platform JavaScript engine. For more information on Node.js, see nodejs.org.

If you’re using a GROOV-AR1 groov Box appliance, then Node-RED and the SNAP PAC nodes are now pre-installed with the groov Admin R1.570.44 update.

To install Node.js and Node-RED on your own computer, see the following instructions.

Install Node.js

The recommended installer is on the Node.js homepage, and other downloads are available on their download page.

Our SNAP PAC nodes require Node.js version 4.4.5 or newer, so get the current stable version.

For Windows, it’s a typical installer that you download and run.

For Linux, Node.js is available via many package managers. For instance, instructions for Debian-based systems like Ubuntu and the Raspberry Pi’s Raspbian are here. There are also various binary downloads available.

Once Node.js is installed, you should verify that the version is 4.4.5 or newer. Open a command prompt or terminal window, and enter:

node -v

You should get a response like:

Install Node-RED

Like Node-RED, Node.js packages are installed with the npm command-line tool. npm is the Node Package Manager, and is typically used to download and install packages from the central Node registry at npmjs.com.

The full Node-RED installation instructions are on their site.

On Windows, from a command-prompt, type:

npm install -g node-red

On Linux, from a terminal window, type:

sudo npm install -g --unsafe-perm node-red

It can take a few moments before much happens. The npm tool will begin to install Node-RED and all of its dependencies.

Along the way, you’ll probably see some errors like this:

Those errors can be safely ignored. The Node-RED website says that those are optional dependencies, and that “Node-RED will work without these optional dependencies”.

Run Node-RED

Now run Node-RED with:

node-red -v

The output will look like:

Welcome to Node-RED
===================

16 May 15:10:26 - [info] Node-RED version: v0.13.4
16 May 15:10:26 - [info] Node.js  version: v4.2.5
16 May 15:10:26 - [info] Windows_NT 10.0.10586 x64 LE
16 May 15:10:26 - [info] Loading palette nodes
16 May 15:10:27 - [warn] ------------------------------------------
16 May 15:10:27 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node
16 May 15:10:27 - [warn] [tail] Not currently supported on Windows.
16 May 15:10:27 - [warn] ------------------------------------------
16 May 15:10:27 - [info] Settings file  : C:\Users\sabrina\AppData\Roaming\npm\n
16 May 15:10:27 - [info] User directory : \Users\sabrina\.node-red
16 May 15:10:27 - [info] Flows file : \Users\sabrina\.node-red\flows_sabrina-W
16 May 15:10:27 - [info] Creating new flow file
16 May 15:10:27 - [info] Starting flows
16 May 15:10:27 - [info] Started flows
16 May 15:10:27 - [info] Server now running at http://127.0.0.1:1880/

Open your web browser to the address shown (for example, http://127.0.0.1:1880) and you should see the default Node-RED screen:

Node-RED default

Next Step

Continue to the Hello, world! example.