Here is Getting Started Guide with Node-RED for ESP32 Arduino to Learn on localhost & IBM Cloud. Node-RED is a way to visualize data on IBM Watson IoT platform. In our earlier guides, we supplied the required sketches/snippets for ESP32 Arduino to send data to IBM Watson IoT platform. But any user will not be satisfied with only sending data to IBM Watson IoT platform, they will expect to see real-time graphs.
Node-RED was originally created by IBM emergenging technology. It is an open source software. It is a flow-based development tool for visual programming for wiring together hardware devices, APIs and online services as part of the Internet of Things. You will Node-RED not only for ESP32, but also for several other boards. As step of learning, we should first install it on localhost to get used with the basics. Later, we can easily launch instance of Node-RED on IBM Cloud and connect our ESP32.
Installing Node-RED on localhost
Node-RED has following different components. Node-RED visual tool for wiring the Internet of Things :
Node-RED Dashboard UI :
Node generator command line tool to generate Node-RED node modules from several various sources, including Open API document and function node’s source :
Node-RED command Line Tool to remotely administer a Node-RED instance :
In case of IBM Cloud’s Node-RED we are getting them running in preconfigured manner. Node-RED has dedicated website with detailed guide. Like for installation of Node-RED on Microsoft Windows 10 :
First we will download and install Node.js for Windows :
Then we will launch Windows Powershell, and issue the following commands :
# check whether node & npm installed
node --version; npm --version
# install node-red
npm install -g --unsafe-perm node-red
Starting Node-RED will require only
node-red command :
You can open
http://localhost:1880 on your browser to view the web UI. You will get guide to create flow :
You can add normal Arduino (like UNO, not ESP32) with Node-RED :
Playing around Node-RED will make you used with the thing and help to become easy to work with Node-RED on IBM Cloud as production instance.
Installing Node-RED on IBM Cloud
Go to control panel of IBM Cloud/Bluemix (I use
console.bluemix.net). We will use Bluemix Node-RED Starter.
Go to catalogue and search for “Node-RED Starter”. Choose “Node-RED Starter” and fill information. You’ll get 375 GB/hr per month free. With that, you can easily test, run and delete the instance after working. Here is documents for Node-RED on IBM Cloud :
Click “Create” button and wait for 10-15 minutes to get the things deployed (you’ll get 404 Not Found out of doing hurry). As soon the instance gets deployed, you can add username, password through the web wizard and login to Node-RED flow editor.
Now, we need to connect our Node-RED starter instance with our already created IBM Watson IoT Platform service of our previous guide. From dashboard and Cloud Foundry Apps, go the Node-RED app dashboard. Go to “Connections” > “Connect Existing Compatible Service”. Add “Internet of Things” app and you’ll get thing kind of message :
Your 'thecustomizewindows' app must be restaged to use the new 'Internet of Things Platform-sc' service. Restaging makes this service available for use. Do you want to restage it now?
Click “Restage”. It will take some time. Now you can play with IBM Cloud’s Node-RED flow editor making ESP32 active.Tagged With node red esp32 , node-red esp32 , https://thecustomizewindows com/2019/03/getting-started-with-node-red-for-esp32-arduino-localhost-ibm-cloud/ , esp32 node red , esp32 nodered cloud , nodered esp32 , nodejs for esp32 , esp32 nodered , esp32 node-red , node-RED