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

Publishing the data from Node-RED on an edge device

In this section, we will configure our Raspberry Pi. To get started, launch the Raspberry Pi and open the Node-RED flow editor. This Node-RED flow editor should still have a flow to send the sensor data implemented in Chapter 10, Handling Sensor Data on the Raspberry Pi, to the server. If you have deleted this flow, or if you have not created it, please re-execute it by referring to Chapter 10, Handling Sensor Data on the Raspberry Pi. Double-click the mqtt out node that makes up the flow to open the settings window. We used Mosquitto last time, but this time we will connect to CloudMQTT.

Perform the following steps to configure Node-RED on the Raspberry Pi to connect to CloudMQTT:

  1. Access the flow you created in Chapter 10, Handling Sensor Data on the Raspberry Pi.

    In this chapter, we only use a flow with the mqtt out node because this scenario is just for sending data to a Raspberry Pi:

    Figure 11.9 – Accessing the...