Node-RED Programming Guide

updated 2023

The node red guide is a series of lectures designed to get you started with Node-RED. Starting from the very basics, it introduces you to how Node-RED works and how to get the most out of its built in nodes. Each lecture consists of a series of hands-on examples that take you from basic to intermediate Node-RED programming in easy to follow steps.

Node-RED: Lecture 1 – A brief introduction to Node-RED This lecture will introduce you to some examples of Node-RED, both to give you a sense of its capabilities and to introduce its basic concepts. We’ll also discuss the history of Node-RED and its origins to give you an idea of what Node-RED is good for and of what types of tasks are best left to a more traditional programming language and environments.

Node-RED: Lecture 2 – Building your first flows This lecture will introduce you to the Node-RED visual tool and get you started building your first flow. You’ll learn how to create simple flows, use debug nodes to track messages through the flows and how to use the function node to write simple JavaScript code that tailors the node to your specific needs.

Node-RED: Lecture 3 – Basic nodes and flows In this lecture you will get to see a few of the more commonly used nodes and build on some of the things you learnt in previous lectures. You’ll start off with a series of examples based around the popular MQTT protocol that shows how to wire together a set of basic but very useful message processing nodes. Then you’ll briefly look at other ways to get messages into and out of your flows using protocols such as TCP, UDP and websockets.


If you find these lectures and tutorials helpful, why not buy us a coffee!


Node-RED: Lecture 4 – A tour of the core nodes This lecture will take a look at the core set of nodes that Node-RED installs by default and then show you the extended set of nodes that the cloud-based Node-RED service – FRED – supports.

Node-RED: Lecture 5 – The Node-RED programming model In this lecture, you’ll take a more detailed look at Node-RED’s programming model and some of its key concepts and explore the details of the message flow model that underlies Node-RED. Then you’ll dive into how to program your own function nodes using JavaScript and create reusable sub flows to add your own functionality to the set of nodes supplied with Node-RED.

Node-RED: Lecture 6 – Intermediate flows This lecture will build on the ideas you saw in lecture 5 and focus on examples that explore some of the key concepts from that lecture. The examples in this lecture are a little more complex than previous examples – mainly in the sense that the function nodes are more complex – but are still kept as clean and simple as possible.

Node-RED: Lecture 7 – Dashboards and UI techniques.  In this lecture you will take a look a few techniques to allow you to visualize data passing through flows. We’ll focus on three approaches;

  • PART 1: the use of a third party dashboard tool – FreeBoard,
  • PART 2: using the standard Node-RED default UI nodes
  • PART 3: using a standard external JavaScript charting library (Morris.JS).

Node-RED: Lecture 8 – examples of advanced flows. This lecture is a collection of tutorials and blogs that we’ve written showing Node-RED used for more sophisticated applications. It includes usage of IBM watson for AI bots, some hard core MQTT and OPC for the IoT crowd etc

List of examples used in the lectures – a listing of all of the examples used in all lectures