Tutorial: Node-RED dashboards – creating your own UI widget

Node-RED’s dashboard nodes provide a comprehensive set of UI components for building basic dashboards suitable for the Internet of Things (IoT) – offering graphs, gauges, basic text as well as sliders and inputs. However, there will always be situations when you need something custom. The template node is the solution and in this tutorial we’ll show you a quick example of using it to create your own UI widget. Continue reading “Tutorial: Node-RED dashboards – creating your own UI widget”

Node-RED: Lecture 6 – Example 6.9 Creating a Blog Site With Node-RED

This final example will show you how to build a micro blog service with only a few nodes in Node RED. You’ll be using the MongoDB node as a storage for posts, http nodes to provide end points for the service and the html node to format the micro-blog web page. Continue reading “Node-RED: Lecture 6 – Example 6.9 Creating a Blog Site With Node-RED”

Node-RED: Lecture 6 – Example 6.8 Letting a function node send multiple messages on a single output

Example 5.2 in Lecture 5 demonstrated how to set up and send messages on multiple output nodes. This example shows how to send multiple message, but on the same output, from a single function node. Continue reading “Node-RED: Lecture 6 – Example 6.8 Letting a function node send multiple messages on a single output”

Node-RED: Lecture 6 – Example 6.7 Multiple inputs to a function node

Function nodes in Node-RED were designed to process messages as single entities. However, in some cases your functions might depend on two separate data sources. There are many ways to handle multiple inputs to a function node. This example shows one approach based on context data.

Continue reading “Node-RED: Lecture 6 – Example 6.7 Multiple inputs to a function node”

Node-RED: Lecture 6 – Example 6.6 Getting earthquake data from an external API

This example demonstrates how to get data from an external API and how to separate that data using a function node. We will use data from an external API that provides access to earthquake data which is made available by the US geological survey (USGS). Continue reading “Node-RED: Lecture 6 – Example 6.6 Getting earthquake data from an external API”

Node-RED: Lecture 6 – Example 6.5 Defining and using an iterator sub-flow

As mentioned in lecture 5, sub-flows can be used to package up functions into nodes in your node palette. In this example, you’ll create a sub-flow that processes an array of values in a message payload and outputs a new processed array[3]. Continue reading “Node-RED: Lecture 6 – Example 6.5 Defining and using an iterator sub-flow”

Node-RED: Lecture 6 – Example 6.4 Using the context element to share a function and make it accessible to all functions in the canvas

This example shows how to use the context object and its global element to share data across function nodes. Continue reading “Node-RED: Lecture 6 – Example 6.4 Using the context element to share a function and make it accessible to all functions in the canvas”

Node-RED: Lecture 3 – Example 3.3 Using a change node to change or manipulate a message payload

Another useful node is the change node, which will allow you to change a message payload or add new properties. You can use this node to affect the properties in a message, either by changing existing ones, deleting them or adding new properties.

Continue reading “Node-RED: Lecture 3 – Example 3.3 Using a change node to change or manipulate a message payload”

Lecture 7: Node-Red dashboards (Part 3)

For our final example of building Dashboards and UIs we’ll use a generic technique we’ve experimented with before. That’s the web service approach that uses a http node to allow us to accept http requests and return web pages. We used this approach in example 1.3 but didn’t explain the details. Continue reading “Lecture 7: Node-Red dashboards (Part 3)”