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. These include the ideas of context, messages and sub-flows. The examples in this lecture are a little more complex than previous examples Continue reading “Node-RED: Lecture 6 – Intermediate flows”
Category: Examples
List of examples in the lectures
Examples
A list of examples used in the lectures
Examples Lecture 1 | |
1.1 | Using Twitter to control a Raspberry PI |
1.2 | Using Node-RED to alert you when you’re falling behind on your exercise schedule |
1.3 | Building a simple web service using Node-RED’s built-in HTTP nodes |
Examples Lecture 2 | |
2.1 | Building your first flow: Hello World |
2.2 | A second flow: weather alerts |
Examples Lecture 3 | |
3.1 | Receiving JSON via an MQTT message |
3.2 | Using the switch node to handle a JSON object |
3.3 | Using a change node to change or manipulate a message payload |
3.4 | Using the rbe (report by exception) node |
3.5 | Scaling input with the range node |
3.6 | Using an mqtt output node to test the flow |
3.7 | Using Websockets with Node-RED |
3.8 | Sending TCP requests. |
Examples Lecture 5 | |
5.1 | Creating and returning a new message in a function node |
5.2 | Creating and returning multiple messages in a function node |
5.3 | Using Context in a function node |
5.4 | Using Global Context |
5.5 | Creating a sub-flow |
5.6 | Packaging Function nodes using subflows |
5.7 | Creating a Slack Bot to query data |
Examples lecture 6 | |
6.1 | Retrieving data from a web page |
6.2 | Counting words in a string |
6.3 | Using Context to generate rolling averages |
6.4 | Using the context element to share a function and make it accessible to all functions in the canvas. |
6.5 | Defining and using an iterator sub flow |
6.6 | Getting earthquake data from an external API and returning it as multiple messages. |
6.7 | Multiple Inputs on a Function Node |
6.8 | Letting a Function Node Send Multiple Messages on a single output |
Examples in lecture 7 | |
7.1 | Using the FreeBoard dashboard node |
7.2 | Using the nodered.contrib.ui nodes |
7.3 | Using a JavaScript charting library |
Misc dashboard examples | |
Tutorial | Multiple lines on a chart |
Tutorial | Creating your own UI widget – textual |
Tutorial | Creating your own UI widget – using an external graph library |
Tutorial | Interactive charts |
Tutorial | Using the SQL lite node |
Node-RED: Lecture 6 – Example 6.3 Using context to generate rolling averages
A special module called context, used to store data between function invocations, is available to function nodes. This can be useful when the function needs to retain state to do its processing. For example, in a typical Industrial IoT scenario, Continue reading “Node-RED: Lecture 6 – Example 6.3 Using context to generate rolling averages”
Node-RED: Lecture 6 – Example 6.2 Counting words in a string using a function Node
Next, let’s write a more complex function node that receives some text in a message payload, then outputs multiple messages containing all individual words and the number of times each word was used. Continue reading “Node-RED: Lecture 6 – Example 6.2 Counting words in a string using a function Node”
Node-RED: Lecture 3 – Example 3.8 Sending TCP requests
This example shows you how to send TCP requests using the tcp node. In this case you will make an HTTP request following the specifications in Continue reading “Node-RED: Lecture 3 – Example 3.8 Sending TCP requests”
Node-RED: Lecture 3 – Example 3.2 Using the switch node to handle a JSON object
This example continues to use the MQTT node we setup in Example 3.1. If you aren’t following these examples sequentially you may want to review example 3.1 as it shows how to use the free MQTT broker, HiveMQ which we are using for the MQTT node in these examples.
Continue reading “Node-RED: Lecture 3 – Example 3.2 Using the switch node to handle a JSON object”Node-RED: Lecture 8 Advanced flows with Node-RED
This lecture is a set of links to advanced tutorials we have written. These include:
- Tutorial: Using FRED (Cloud Node-RED) to build an AI chatbot using IBM Watson
- Tutorial: Using FRED (Cloud Node-RED) with the GE Predix Timeseries Microservice
- Tutorial: Using OPC-UA with FRED (Cloud Node-RED)
- Monitor a Pi Zero hosted security camera with Node-RED & MQTT
Continue reading “Node-RED: Lecture 8 Advanced flows with Node-RED”
JavaScript primer
JavaScript Primer
While we don’t have enough space here to cover JavaScript completely, here is a quick overview for those familiar with other programming languages to get started writing your own nodes. To experiment with JavaScript, you can use the JavaScript console supplied with your favourite browser or startup Continue reading “JavaScript primer”