What is Node-RED and How Can I Use it to Create IoT Applications?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
node-red is a graphical development tool that is quickly becoming the industry standard for developing industrial iot applications to get you up to speed with node-red this video explains exactly what node-red is and shows you how easy it is to develop a powerful industrial iot application using node-red by the end of the video we will have built a node-red application that analyzes data processes the data and sends an email alert when the data is within a critical range before we start building our application let's talk about what node-red is node-red is a graphical development tool that makes it easy to connect Hardware devices apis and online services to each other node-red was originally developed by IBM for internal use but was made open source in 2016. since then it has been adopted by the automation industry as an easy way to create industrial iot applications that collect process and share data through the internet node-red makes it easy to develop industrial iot applications in two ways first node-red ships with a huge number of pre-built nodes as a developer you can use these nodes in your application to easily perform complex tasks such as sending data using the mqtt protocol the modbus TCP protocol or via email there are even nodes that let you publish data to online services such as Dropbox and Google Drive currently there are over 2 000 nodes available for you to use in your industrial iot applications and thanks to the tireless work of the open source community that number is steadily growing second node-red is a graphical development tool each node in an application is placed on a canvas and connected to other nodes each node in the application performs a specific task such as collecting data processing data or sending data once the application is deployed a flow is triggered by an event and each node in the flow executes and passes data to the downstream node in the form of a message the event that triggers a flow is something that happens outside of the application like a hardware status change a variable reaching a set point value or a certain amount of time passing by placing and connecting nodes on the canvas someone without deep knowledge of programming can create sophisticated industrial iot applications now that we know what node-red is let's see how we can create an industrial iot application using wide Muller's umation platform in my last video I introduced the umation platform and showed how this modern platform makes it easy to develop real-time applications using a web-based development environment that is served directly from the controller if you missed it you can find a link to that video in the description below the umation platform also ships with a built-in node-red editor making it an ideal choice for quickly and easily developing industrial iot applications in the rest of this video I will show you how to build and deploy a node-red application step by step using you create web the web-based development environment for ucontrol controllers we will build an application that sends an email alert to maintenance technicians when a process parameter reaches a critical level when building the application we will see how to collect process and send data from a control system using node-red to start I have powered up my ucontrol starter kit and connected it to my computer using a USB cable once I have a connection between the controller and my computer I can open my web browser and navigate to 192.168.10.202 the default IP address of the controller's USB port when the login page loads I can log in with the default credentials admin and detmold in case you're wondering depthmold is the German City where widemuller was founded on the you create web home page I click edit to begin modifying the real-time application on the controller the real-time application editor opens and I click on global variables to modify the real-time applications Global variables in the global variables table I add a new variable using the plus icon in the top right corner I call the new variable process temperature and specify that the data type of the variable is integer finally I mapped the variable to the first input of the starter Kit's RTD analog input card this input is connected to the pt100 temperature sensor on the starter kit which we will use throughout the demonstration once my application variables are configured I click deploy to deploy the application on the controller the application is deployed and after a short delay I can click Start to put the controller into run mode after putting the controller in run mode the live view opens and after switching the global variables tab I can monitor the value of the global variables here I can see that the temperature sensor on the starter kit is reporting a value of 218 which is 21.8 degrees Celsius when I cover the pt100 temperature sensor of the starter kit the temperature increases to around 24 degrees Celsius now that the variables for our application are configured let's look at how to build our node-red application before moving on I want to highlight that Global variables are truly Global all of the global variables defined here are added to a global data pool and can be accessed by all of the applications running on the controller including node-red and visualization applications this is a really nice feature that eliminates data redundancies in the project I can access the node-red application by switching back to the you create web home page and clicking on node red in the connectivity app section the node-red editor opens with a default flow called flow 1 created a node-red application can have multiple flows on the left you can see the palette of nodes available to build the application this palette includes the default nodes that ship with the ucontrol controller and additional nodes can be installed as required by the application to start hover your mouse over the i o data in node a tooltip appears and gives a brief explanation of the node's functionality in this case this node is used to read the value of a global variable from a u-control controller which is exactly what we want to do drag the node from the palette and drop it on the canvas I can open the nodes Properties by double-clicking on the Node in the properties panel I verify that the node is retrieving the value from the correct Global variable and that the polling time is 5 Seconds this means that every 5 Seconds this node will retrieve the value of the process temperature variable and start the flow it's worth noting that even though you can have a polling time of 50 milliseconds a node-red application is not a real-time application and should not be used for control typically node-red applications are used for data collection over longer periods of time to see the structure of the data that comes out of a node we can use a debug node I scroll down to the common folder and place a debug node on the canvas to create a connection between two nodes I can drag from the first nodes handle and drop on the second nodes handle you may notice a blue dot on each node this dot indicates that the node has not been deployed as part of the node-red application yet click on deploy to deploy the current application after deploying I click on the bug symbol to open the debug console in this console I can see the messages logged by the debug node I see that the message coming from the i o data in node is an object with the complex data structure that includes the global variables data type name value and the timestamp when the data was retrieved in node-red messages passed between nodes are always objects in this application we want to send an email to a technician when a process value reaches a critical range to make it easy to understand if the process value has reached the critical range we can add an alarm element to the message object it is easy to modify the contents of a message using the function node drag a function node from the palette and drop it on the connecting line between the existing nodes the function node is added in between the existing nodes and the connections between the nodes are automatically added the function node allows you to write JavaScript code to manipulate the contents of the message object you can double-click on the Node to open the JavaScript editor in this example we are dividing the raw value from the sensor by 10 to convert it into degrees Celsius after the conversion we are adding an alarm element to the message object and set the value of that element to 1 when the process value that we are monitoring is greater than 24 and 0 when it is less than 24. when I deploy the application and cover the temperature sensor I see from the debug window that the alarm element has the value 0 when the temperature is below 24 degrees and one when it is above the maintenance technicians at our plant already receive enough emails from managers we don't want to bombard them with even more emails from the controls systems therefore we only want to send an email when the alarm element of the message object changes value we can build this functionality using a report by exception or an rbe node which blocks the execution of a flow unless a certain condition has been met I drag an rbe node onto the canvas between the function and debug node and double-click on the Node to open its properties in the properties window I configure the rbe node to block in less value changes now after I deploy the application I see that the rbe node blocks the flow until the value of the alarm element changes in the debug console I see a message logged when the alarm element becomes one and another message when the alarm element becomes zero now our flow is executed based on an event instead of a certain amount of time passing before we send out an email we need to configure the email's contents to do this we can use another function node once again I drag a function node from the palette place it on the canvas between the rbe node and the debug node and double click on the Node to open its properties I add a snippet of JavaScript code here to update the contents of the message object depending on if the alarm is active or not in this demonstration I'm only setting the contents of the email message but it is possible to set other parts of the email including the subject with the function configuration done I can close this node and deploy the application again in the debug console I see that the contents of the message object are as expected when the temperature reaches a critical value and returns from the critical value finally I can connect my u-control controller to the internet and add an email node to send the message out via email this is the final node in the flow so I cannot add it in between the function node and debug node instead I place it on the canvas and add an extra connection from the function node to the email node as you can see a flow can be split to send messages from one node to multiple nodes throughout a flow I configured the email node with the settings shown here once again I can cover the temperature sensor and when the temperature reaches the critical value I see the email message logged in my debug console when I switch over to my email inbox I see that I've received an email from node red notifying me that the process value is reached a critical value in this quick demonstration I've shown you how easy it is to build sophisticated industrial iot applications using the umation platform and node-red node-red makes it easy to collect process and send data from Hardware devices over the internet many companies including Boreal Lite are using umation in node-red to retrieve data from machines deployed around the world the data retrieved from these machines allows Engineers based at the company headquarters to analyze and optimize the performance of the machines remotely leading to higher productivity and reduced costs if you're interested in learning more about node-red I highly recommend that you pick up a wide molar u-control starter kit so that you can see how easy it is to create industrial iot applications in a web-based development environment in this video we saw how easy it is to develop industrial iot applications with the umation platform but you can also use umation for complex automation tasks in the next video we will see how open and flexible operating systems are revolutionizing Industrial Automation applications [Music] thank you
Info
Channel: RealPars
Views: 61,063
Rating: undefined out of 5
Keywords: What Is Node-RED and How Can I Use It To Create Industrial IoT Applications?, How Can I Use Node-RED To Create Industrial IoT Applications?, Node-RED, IoT, IIoT, what is Node-RED, MQTT, Weidmüller, u-mation platform, u-mation, u-create, Node-RED Application, Node-RED editor, data collection, Debug node, Function Node, RBE Node, Is Node-RED an IoT platform?, industrial application of node-red, node-red iot projects, node-red modbus, node-red tutorial, node-red examples
Id: pVb6Vq84ovg
Channel Id: undefined
Length: 15min 23sec (923 seconds)
Published: Fri Dec 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.