Node-RED Examples for the Onion Omega2+ / Omega2 Pro
Branch: master
Clone or download
John Walicki
Latest commit 255554c Jan 31, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
flows Node-RED Onion Omega2 Examples Jan 29, 2019
screenshots Node-RED Onion Omega2 Examples Jan 29, 2019
LICENSE Node-RED Onion Omega2 Examples Jan 29, 2019
README.md IBM Cloud Registration link Jan 31, 2019

README.md

Node-RED Examples for the Onion Omega2+ / Omega2 Pro

Onion Omega2+ / Omega2 Pro Node-RED flows running on a $5 single board computer!

Introduction

These Node-RED recipes for the Omega2+ / Omega2 Pro demonstrate:

  • Hello World
  • Send Random Numbers 1-100 to Watson IoT Platform, the Omega2+ OLED display, and LEDs
  • Send CPU stats from the Omega2 Pro to Watson IoT Platform
  • Display hourly Weather report from IBM Cloud on the Omega2+ OLED display
  • Send GPS coordinates to Watson IoT Platform and the Omega2+ OLED display
  • The IBM Cloud flow that sends / receives the Omega2+ MQTT events

Learning Objectives

  • Learn how to install Node-RED on the Omega2 Pro
  • Create Node-RED flows that execute on the Onion Omega2 devices
  • Send data from the Omega2 edge device to the IBM Cloud and Watson IoT Platform
  • Receive commands and data from IBM Cloud and display information on the Omega2 LED

Prerequistes

  • Install Node-RED on the Omega2 Pro

  • Once Node-RED is installed, several additional Node-RED nodes will be necessary. Install the following nodes using the npm command line.

  • To install additional Node packages with Node-RED, install NPM:

    # opkg update
    # opkg install node-npm
    
  • Install node-red-contrib-cpu # node --max_old_space_size=512 $(which npm) -g install node-red-contrib-cpu

  • Install node-red-contrib-ibm-watson-iot # node --max_old_space_size=512 $(which npm) -g install node-red-contrib-ibm-watson-iot

  • Register for a free IBM Cloud Lite Account

  • Log into IBM Cloud

  • Create a Internet of Things Platform Starter

Download

  • There are screenshots posted so you can see the Node-RED flows
  • If you're interested in trying these recipes on your Onion Omega2+ / Omega2 Pro, import the flows here

Node-RED flows in this repository:

This Hello World flow shows Node-RED running on the Onion Omega2+ Hello World flow This flow sends Random Numbers from 1-100 to Watson IoT Platform, the Omega2+ OLED display and flashes the Omega2+ LED high/medium/low - red/yellow/green. Random Number flow This flow uses the node-red-contrib-cpu node to send Omega2 Pro CPU stats to Watson IoT Platform CPU Stats This flow sends GPS coordinates to Watson IoT Platform and the Omega2+ OLED display GPS Coordinates flow This flow receives the current Weather temp from the IBM Cloud / Watson IoT Platform and displays it on the Omega2+ OLED display. Weather flow This IBM Cloud flow shows the MQTT events being received and sent to the Omega2+ IBM Cloud flow Watson IoT Quickstart screenshot that graphs the random numbers being sent from the Onion Omega2+. WIoTP Quickstart screenshot

Authors


Enjoy! Give us feedback if you have suggestions on how to improve this tutorial.

License

This tutorial is licensed under the Apache Software License, Version 2. Separate third party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 (DCO) and the Apache Software License, Version 2.