Using Dashboard Switches with Command Feedback

When issuing a command it is usually necessary to get a acknowledgement of the command execution. For example when throwing a switch to turn a light on you would want to know that the action has been performed. If the action hasn’t been performed we can the try again either manually or automatically. Click to rate this post! [Total: 0 Average: 0]

Continue reading

Using the Node-Red Shelly Nodes

Shelly devices support both the http and the MQTT protocol and you can use either protocol to control and change the settings of Shelly devices. Just as with Tasmota devices you can use either the standard HTTP and MQTT nodes or alternatively install the Shelly nodes. Click to rate this post! [Total: 1 Average: 5]

Continue reading

Using ChatGPT to write Node-Red Code

After watching the webinar replay on the AI assistant in Flowfuse I decided to give it a try using chatGPT. Note: Flowfuse also use ChatGPT in their AI assistant. One of the examples in the video was to generate sample test data so I thought I would give it a try. Click to rate this post! [Total: 2 Average: 5]

Continue reading

Handling Errors in Node-Red Flows

An error in a node-red flow will generally cause an error message to be written to the debug sidebar. However in many cases it is important that you handle errors rather than just simply logging them. Node red provides the catch node for catching errors caused by nodes in the tab. Click to rate this post! [Total: 0 Average: 0]

Continue reading

An Introduction to Dashboard 2

Up until now node-red dashboards have all been based on the dashboards nodes in the node-red-dashboard module. This was a third party module and was based on a version of angular (V1) which is no longer maintained. The project is now deemed to be on Life support -see here Click to rate this post! [Total: 6 Average: 3.2]

Continue reading

Node-Red -Blocking and non Blocking- Synchronous and Asynchronous

With most programs functions are blocking in that they will complete their task before returning. Generally this type of programming is easy to manage as you have only one task active at any time. This style of programming is known as synchronous, but  the problem with it is that it can make applications very slow as they have to continually wait. Click to rate this post! [Total: 0 Average: 0]

Continue reading

Converting JSON Data to CSV

Incoming MQTT data is often JSON formatted data and in order to extract data values from it. Storing the data directly as JSON formatted data is also common However it is also very common to store this data as CSV or a least convert it to CSV for use in legacy systems. Click to rate this post! [Total: 2 Average: 5]

Continue reading

Function Node Programming-Part 1

Introduction The function node is used to run JavaScript code against the msg object. The function node accepts a msg object as input and can return 0 or more message objects as output. This message object must have a payload property (msg.payload), and usually has other properties depending on the proceeding nodes. In order to use the function node you will need a basic understanding of JavaScript. Click to rate this post! [Total: 0 Average: 0]

Continue reading

Using Nodejs Modules in Node-Red

Because node-red is a nodejs applications it is possible to use nodejs modules in node-red. Depending on the version of node-red that you are using there are two ways of doing this: Editing the settings File -All versions Setup tab in the function node -1.3 and above Click to rate this post! [Total: 2 Average: 5]

Continue reading

Using Node-Red with Influxdb

Influxdb is specially designed for time series data and as such it is a popular choice for storing sensor type data. Influxdb underwent a major change in version 2.0 and so you need to careful what version you are using. Click to rate this post! [Total: 1 Average: 5]

Continue reading