Book Image

Practical Node-RED Programming

By : Taiji Hagino
5 (1)
Book Image

Practical Node-RED Programming

5 (1)
By: Taiji Hagino

Overview of this book

Node-RED is a free and open source flow-based programming tool used to handle IoT data that allows programmers of any level to interconnect physical I/O, cloud-based systems, databases, and APIs to build web applications without code. Practical Node-RED Programming is a comprehensive introduction for anyone looking to get up to speed with the Node-RED ecosystem in no time. Complete with hands-on tutorials, projects, and self-assessment questions, this easy-to-follow guide will help you to become well versed in the foundations of Node-RED. You’ll learn how to use Node-RED to handle IoT data and build web applications without having to write complex code. Once you’ve covered the basics, you’ll explore various visual programming techniques and find out how to make sample flows as you cover web development, IoT development, and cloud service connections, and finally build useful real-world applications. By the end of this book, you’ll have learned how to use Node-RED to develop a real-world application from scratch, which can then be implemented in your business.
Table of Contents (19 chapters)
1
Section 1: Node-RED Basics
6
Section 2: Mastering Node-RED
11
Section 3: Practical Matters

Running Node-RED on a local machine

We can now create the flow for sensing data on an IoT edge device, and in this scenario, the local machine uses Raspberry Pi. The reason for this will be described in the Using the standalone verison of Node-RED section, but in summary, this tutorial is for IoT edge device.

I have already explained how to start Node-RED on Raspberry Pi, so you should now know how to run it, but if you need a refresher, please refer to the Install Node-RED for Raspberry Pi section in Chapter 2, Setting Up the Development Environment.

Now, follow these steps to start Node-RED on your Raspberry Pi:

  1. Let's start by executing Node-RED from the Raspberry Pi menu:

    Figure 5.1 – Running Node-RED from the Raspberry Pi menu

  2. You can check the status of Node-RED on your terminal. If Started flows is shown, Node-RED is ready to use:

    Figure 5.2 – Terminal of Raspberry Pi

  3. You can access the Node-RED flow editor with the localhost:1880 URL:
  4. ...