Node-Red and JSONata for Beginners

JSONata is a lightweight query and transformation language for JSON data and allows queries to be carried out directly on JSON data. —ref The alternative,and the one I most often use is to convert JSON to JavaScipt and then query it using JavasScript functions. Click to rate this post! [Total: 0 Average: 0]

Continue reading

Function Node Programming-Arrays,Objects and Loops

To work with node-red function node you will need a basic understanding of JavaScript objects and arrays. An object is a collection of key value pairs separated by a comma and enclosed in braces ({}) Example: let data={“voltage”:100,current:2}; Note that the key doesn’t need to be in quotes but it  often is. Click to rate this post! [Total: 0 Average: 0]

Continue reading

Using The Table DashBoard UI Widget Node

The table  dashboard ui widget node is used to add tabular data to a dashboard. The node is based on the tabulator module which you can read about here and see examples here. Click to rate this post! [Total: 0 Average: 0]

Continue reading

Encrypting and Decrypting MQTT Message Payloads

Most MQTT implementations use SSL by default for data security. However SSL is a link encryption method and doesn’t secure the payload end to end unless SSL is applied to all links. In addition if the data is stored at the destination it will be unencrypted unless it is encrypted before storage. Click to rate this post! [Total: 0 Average: 0]

Continue reading

Storing and Retrieving JSON Data In SQLite

It has always been possible to store JSON Data in an SQLite database as JSON data is simply text data. However what was not previously possible was how to query this JSON data using a key. This changed in version 3.9 in 2015 (SQLite history) and so there is now no need to separate out the JSON data so that you can query using a key. . Click to rate this post! [Total: 5 Average: 4.2]

Continue reading

Republishing HTTP Data Over MQTT with Node-Red

Today most of the data we receive across the Internet is received using the HTTP protocol. HTTP is the protocol that powers the Web,and is the most common protocol on the Internet. HTTP was designed for viewing static web pages and uses  a request/response technique for  viewing a web page. Click to rate this post! [Total: 1 Average: 5]

Continue reading

Working With MQTT Dynamic Connections

Prior to node-red version 2.1 an MQTT node would auto connect when the flow was started and it was not possible to disconnect from a broker. In addition the subscribe node was configured with a topic, and it wasn’t possible to subscribe to additional topics or unsubscribe from topics once the flow had started. Click to rate this post! [Total: 5 Average: 5]

Continue reading

Node-Red Configuration Nodes Overview

Some nodes like the MQTT-in and MQTT-out nodes share configuration data. The MQTT-in and MQTT-out nodes share the broker configuration. Settings like broker address, port, clean sessions,authentication are part of the configuration node. Click to rate this post! [Total: 0 Average: 0]

Continue reading

Splitting a Message Payload in Node-Red

This tutorial is part of a series of project tutorials I will be creating for beginners looking to get familiar with node-red by creating actual flows. In this simple project we will look at splitting a simple message payload, and then display the data in a text box and on gauges on a dashboard. The payload consists of a simple string containing temperature and humidity readings separated by a ampersand (&). Click to rate this post! [Total: 1 Average: 4]

Continue reading