Node-RED Examples for the Onion Omega2+ / Omega2 Pro
Onion Omega2+ / Omega2 Pro Node-RED flows running on a $5 single board computer!
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
- 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
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
# node --max_old_space_size=512 $(which npm) -g install node-red-contrib-cpu
# 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
- 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+ 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. This flow uses the node-red-contrib-cpu node to send Omega2 Pro CPU stats to Watson IoT Platform This flow sends GPS coordinates to Watson IoT Platform and the Omega2+ OLED display This flow receives the current Weather temp from the IBM Cloud / Watson IoT Platform and displays it on the Omega2+ OLED display. This IBM Cloud flow shows the MQTT events being received and sent to the Omega2+ Watson IoT Quickstart screenshot that graphs the random numbers being sent from the Onion Omega2+.
Enjoy! Give us feedback if you have suggestions on how to improve this tutorial.
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.