In this tutorial we are going to look at using the node-red-contrib-bool-gate module which provides four basic boolean logic functions. If you are unfamiliar with logic gate operation the first section covers the logic gates and the second covers using the logic gates in node-red flows. Click to rate this post! [Total: 0 Average: 0]
Continue readingAuthor: steve
Timing Events in Node-Red
Having things happen at a particular time, or in response to another event is a common requirement in node-red flows. Examples are: Turning on/off central heating at scheduled times. Turning on sprinkler system at a particular time. Turning on a conveyor belt after an item has been added. Sending an email in response to a fault. Click to rate this post! [Total: 0 Average: 0]
Continue readingWorking With Files and Folders
Node-red has 2 core nodes that allow you to read and write to files. However if you want to explore the file system you will need to: Install additional nodes Use the exec node with OS commands Use the nodejs fs module. Click to rate this post! [Total: 0 Average: 0]
Continue readingRetrieving and Displaying Data from a SQLite Database
In this tutorial we will look at how you retrieve and display data from a node-red database. The tutorial uses data I collect for monitoring several of my websites. Click to rate this post! [Total: 0 Average: 0]
Continue readingNode-Red Event Loop Explained
Node-red is a nodejs application which uses a single thread. What makes nodejs fast is the use of asynchronous functions. Most programs will sit and wait for something to complete before continuing with the next task. However nodejs applications start a task and then continue on with the next task. They return to the previous task when they are notified that it is complete. Click to rate this post! [Total: 0 Average: 0]
Continue readingUsing 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 readingUsing 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 readingUsing 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 readingHandling 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 readingAn 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