Quick Intro to Node-RED

Raspberry Pi & Arduino Home Auto Project-#raspSerie 08

J3
Jungletronics
8 min readNov 20, 2016

--

In this post, we are going to unveil the beauties of this new technology from IBM: Node-RED. It should be able to give you the gist at how everything works.

Node-RED? How cool is that? It’s time to check it out!!!

Ok, let’s jump in the cold water…

Let’s put the process in a step-wise-manner!!!
Get your RPi (Raspberry Pi Model B) and…

Task 00
Raspberry Pi:
The first task, download the newer version of raspberry pi:

Node-RED comes pre-installed on the Raspberry Pi image. It can be used out of the box to begin creating IoT applications.

See this video to get your Rpi up and running!!

Task 01

Task 02

Task 03
Access you RPi via SSH and type:

You should be able to see the service running in your machine.

Task 04

We will stop the service now for installing spare nodes. Follow below.

Task 05

This is the node package manager.

Task 06
In the Node-RED Library page type: arduino.
Now click node-red-node-arduino lib and copy/paste and…

This node to talk to an Arduino running standard firmata 2.2 or better.

Task 07
Continuing in the Node-RED Library page type: contrib-ui.
Go to the library page of node-red-contrib-ui and copy the command for installation…

Task 08
Now grab you Arduino Uno:

Great, if everything installs correctly, get your Arduino and load the firmata on it.

Running firmata on Arduino 1.6.12

Task 09

Connect Arduino via USB on your beloved Rpi.
Make your breadboard. See schematic:

Task 10
Raspberry Pi:
Access your Pi via SSH (see my video explaining how!) again.

This command initializes the node-RED service with the additional nodes: Arduino and ui.

Task 11
Get your RPi IP address (see notes below).
Now you can now close SSH session and pick up your laptop and point your browser to the address of your RPi (note that in the initialization script of Node-RED you get this clue). In my case:

Task 12
Great, the Node-RED interface is offered beautiful for our internet of things project !!!

The node-red interface on port 192.168.1.100:1880 served by Raspberry Pi Model-B

Task 13
Now follow the instructions below, cataloged as a sequence of three flows. Please see the video and everything will be pretty clear to you!!! I swear!!!

Did you enjoy reading this and found it useful? if so please share it with your friends.

If you didn’t like it, I always like to hear how I can do better next time. Please feel free to contact me directly via youtube or tweeter.

Now the challenge is for you!!! It won’t be that hard since I got along well, right?

If you wish to continue reading follow my collections of notes about that fantastic piece of technology named Node-RED.

Bye!!!

Download All Project Archives

References:

guide
flows
Arduino
vids inspiration: 1 and 2
intro Node-RED

Speed Notes About Node-RED

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — Here are the messages sent by the Node-RED from Raspberry Pi init routine (pay attention to the line that asks you to access your browser):

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Here is the stop result from ‘node-red-stop’ command:

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — When running ‘sudo apt-get update’ or ‘upgrade’ have patience, it usually takes a lot of time (mine takes half a day, phew!!!) !!

The “-y” on apt-get upgrade means to assume “yes” answers to any questions.

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — Importing a flow using the Clipboard:

Importing a flow in Node-RED is really simple. Select and copy to your clipboard. Paste it into the modal window and click “Ok”.
For this project copy these simple flows, if you will:

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

flow 1:

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
flow 2:

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
flow 3 :

(Do not forget to edit your email and server otherwise it will not work …:-)

--

--

Jungletronics
Jungletronics

Published in Jungletronics

Explore our insights on Django, Python, Rails, Ruby, and more. We share code, hacks, and academic notes for developers and tech enthusiasts. Happy reading!

J3
J3

Written by J3

😎 Gilberto Oliveira Jr | 🖥️ Computer Engineer | 🐍 Python | 🧩 C | 💎 Rails | 🤖 AI & IoT | ✍️