Search by Tags

Node-RED

 

Article updated at 18 Sep 2020
Compare with Revision




Subscribe for this article updates

Select the version of Torizon from the tabs below. If you don't know the version you are using, run the command cat /etc/os-release on the board.

Torizon 5.0.0

Introduction

Quoting from nodered.org:

Node-RED is a programming tool for wiring together hardware devices, APIs, and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single click.

This article complies to the Typographic Conventions for Torizon Documentation

Running on Torizon

Prerequisites

  • A Toradex Computer on Module with Torizon installed.

Setup

Getting Node-RED to run on Torizon is very easy, especially because the Node-RED project provides good support and documentation for Docker.

Below is the most basic setup to get started. Execute this command on the SoM:

Note: you can try to use another tag for a newer version, such as latest or any other tag listed on the images's Docker Hub, as long as it is available for your hardware architecture. We use a fixed version to make sure that such a version actually works and further updates do not compromise our examples and documentation.

# docker run -it -p 1880:1880 --name mynodered nodered/node-red:1.0.6-2

Expand the collapsible section below to see sample output. A similar output will be presented:

Command output from Node-RED bring-up in a container

In summary, the Docker image is downloaded and started, and Node-RED is exposed through port 1880.

Usage

On a desktop PC connected to the same network as the Computer on Module, open a web-browser (for example Chrome or Firefox) and use either one of the following URLs:

  • http://<Board's Ethernet IP>:1880

    or

  • http://<SoM name>-<serial number>.local:1880

See the example below for my Apalis iMX8, with Ethernet IP 192.168.10.5 and serial number 0333444555. The zero to the left cannot be disregarded:

  • http://192.168.10.5:1880

    or

  • http://apalis-imx8-0333444555.local:1880

And now you have access to the web-based Node-RED dashboard:


  • Node-RED Dashboard running on a Colibri iMX8X

    Node-RED Dashboard running on a Colibri iMX8X

Next Steps / Additional Resources

Well done, now you know the basics! Go ahead and read the extensive Node-RED official documentation, which includes documentation for Docker as well:

Webinars

Toradex has presented webinars about Node-RED and you can watch them on demand.

Get your ideas off the drawing board with Node-RED

Tirando ideias do papel com Node-RED - Brazilian Portuguese

Torizon 4.0.0

Introduction

Quoting from nodered.org:

Node-RED is a programming tool for wiring together hardware devices, APIs, and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single click.

This article complies to the Typographic Conventions for Torizon Documentation

Running on Torizon

Prerequisites

  • A Toradex Computer on Module with Torizon installed.

Setup

Getting Node-RED to run on Torizon is very easy, especially because the Node-RED project provides good support and documentation for Docker.

Below is the most basic setup to get started. Execute this command on the SoM:

Note: you can try to use another tag for a newer version, such as latest or any other tag listed on the images's Docker Hub, as long as it is available for your hardware architecture. We use a fixed version to make sure that such a version actually works and further updates do not compromise our examples and documentation.

# docker run -it -p 1880:1880 --name mynodered nodered/node-red:1.0.6-2

Expand the collapsible section below to see sample output. A similar output will be presented:

Command output from Node-RED bring-up in a container

In summary, the Docker image is downloaded and started, and Node-RED is exposed through port 1880.

Usage

On a desktop PC connected to the same network as the Computer on Module, open a web-browser (for example Chrome or Firefox) and use either one of the following URLs:

  • http://<Board's Ethernet IP>:1880

    or

  • http://<SoM name>-<serial number>.local:1880

See the example below for my Apalis iMX8, with Ethernet IP 192.168.10.5 and serial number 0333444555. The zero to the left cannot be disregarded:

  • http://192.168.10.5:1880

    or

  • http://apalis-imx8-0333444555.local:1880

And now you have access to the web-based Node-RED dashboard:


  • Node-RED Dashboard running on a Colibri iMX8X

    Node-RED Dashboard running on a Colibri iMX8X

Next Steps / Additional Resources

Well done, now you know the basics! Go ahead and read the extensive Node-RED official documentation, which includes documentation for Docker as well:

Webinars

Toradex has presented webinars about Node-RED and you can watch them on demand.

Get your ideas off the drawing board with Node-RED

Tirando ideias do papel com Node-RED - Brazilian Portuguese

BSP 2.8

Introduction

It is possible to use the Angstrom package manager to install Node.js and Node-RED on the board. IT may also be feasible to integrate into an image built with The Yocto Project / OpenEmbedded, though this article does not present instructions to cover this case.

Prerequisites

Setup

Install Node.js and Node-RED with the following commands:

# opkg install nodejs nodejs-npm
# npm install -g node-red --unsafe-perm

Start Node-RED:

# node-red

Optional Dependencies

Install the optional dependencies:

# opkg install python-misc python-compiler python-multiprocessing

The Angstrom feeds cannot install a native SDK in our Embedded Linux BSP 2.8 due to a bug. If you need to compile Node.js or Node-Red modules with C bindings, you must do a custom OpenEmbedded build and add the native SDK:

local.conf
IMAGE_INSTALL_append = " packagegroup-sdk-target"

Usage

Refer to the previous Usage section for Torizon.

Next Steps / Additional Resources

Well done, now you know the basics! Go ahead and read the extensive Node-RED official documentation: