How to Build an OPC UA Client Dashboard in Node-RED - Part 3

Interactive OPC UA Client dashboard that communicates with a 3rd party OPC UA Server

Back to Blog Posts
Image representing null

This article is the third and final part of our OPC UA content series. In the first article, we cover some OPC UA fundamentals and walk through an example OPC UA Server flow. In the second article, we built a SSL-secured OPC UA server using data from an Allen Bradley PLC as a source. In this article, we show how to build an OPC Client in Node-RED that communicates with a 3rd party OPC UA Server and utilizes an interactive dashboard.

This article will requires the Prosys OPC UA Simulation Server, an application designed for testing OPC UA client applications and learning the technology. It’s a free cross-platform application that supports Windows, Linux, and MacOS. This article will use the Windows version.

Note: full source code for the OPC Client Dashboard is included at the end of the article.

Custom Nodes Used & Assumptions

Several custom nodes are required in order to properly deploy this flow. For more detailed information on how to install a custom node, follow the instructions from an earlier article where the process on installing custom nodes is explained in detail.

As this is not a production application, no security will be utilized, and it is assumed that the OPC UA Server is running on the same network as the Node-RED OPC Client.

Is it also assumed that the end user of this article has familiarization with dashboards. There are many dashboard basic guides available online, including a node red quick tips - dashboard edition here on FlowFuse. You can still deploy the flow and access the dashboard UI at the url http://localhost:1880/ui (if the default settings are used), though this article does not delve into the details of dashboard building.

Install and Deploy the Prosys OPC UA Simulation Server

The Prosys OPC UA Simulation Server is free to download, but requires a sign-up process. Download and install the server, then run the application. Once the application is started, the first thing you should do is go to options -> switch to expert mode.

This will give us access to the address space tab, which we will need to develop our client application in Node-RED.

expert-mode.png

When the application is run, an endpoint url will be displayed on the status tab, along with an indication that the server is currently running.

opc-endpoint-url.png Copy the connection endpoint, but be warned that you will likely need to replace the computer name (in my case DESKTOP-0K0483A, with the actual IP address of the machine running the server. The IP address of the machine on my local network is 192.168.0.141, which changes my UA TCP endpoint address to opc.tcp://192.168.0.141:53530/OPCUA/SimulationServer.

Now the simulation server is set up and we are ready to start developing the OPC Client application.

Objectives of the Node-RED OPC Client Dashboard Application

The goal is not to develop a production-level application, rather, it’s to show a variety of features that one can utilize to demonstrate common OPC UA Client application capabilities in Node-RED, while also demonstrating a variety of methods to visualize the results in a dashboard. There are 4 main objectives of the Node-RED OPC Client Dashboard application. They are:

  1. Browse hierarchical server address space structure & display on a dashboard
  2. Read OPC UA values from various namespaces, showing a variety of datatypes and different ways they can be visualized
  3. Write OPC UA values back to the OPC UA server directly from the OPC UA Client dashboard
  4. Read alarms & events from the OPC UA Server and display them on the dashboard

Rather than building the flow step-by-step, the flow source code will be presented for each objective, and a the flow will be explained so that it is understood what is happening in each section of code.

Browse Hierarchical Server Address Space Structure With OPC UA Browser Node

The first flow will browse the hierarchical OPC UA Server address space structure and display it on the dashboard.

image-20230727-085611.png You can import this flow into Node-RED using the code below:

[{"id":"3e09b7a420dd81d2","type":"group","z":"58c0065ebdc1d89d","name":"Browse Hierarchical Address Space Structure & Display on Dashboard","style":{"label":true,"stroke":"#a4a4a4","color":"#000000","fill":"#ffffff"},"nodes":["6b17b2da2b942bb4","61797eccf2785257","4d92d940177b6ee3","68a113d5893b7c01","98560994a7884f15","4dd13685c3c2879e","a29358cca5c1c12a","d0c969b6a59fac3a","639da01fc957e547","29437ca7222d9a64","49983d5da0958bf2","49040d0cf1144f0a","e7c55f412ef86543","7b53b798a025f1d8","71512a0d602095a0","9c3b0c36d69c05cf","de21b7ad98a05833","2d56e9a431c21a3b","ac95bd0e2b304eec","6fdabcc2950ccf4e","1c49fa5142d2cf17"],"x":54,"y":19,"w":1172,"h":422},{"id":"6b17b2da2b942bb4","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":510,"y":160,"wires":[["4d92d940177b6ee3","d0c969b6a59fac3a","639da01fc957e547"]]},{"id":"61797eccf2785257","type":"inject","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Get Base Folder Structure","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.3","topic":"","payload":"","payloadType":"date","x":240,"y":160,"wires":[["6b17b2da2b942bb4"]]},{"id":"4d92d940177b6ee3","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Simulation Folder","rules":[{"t":"set","p":"Objects.Simulation.nodeId","pt":"flow","to":"payload[2].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[2].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":100,"wires":[["98560994a7884f15"]]},{"id":"68a113d5893b7c01","type":"comment","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Display on Dashboard","info":"","x":1100,"y":60,"wires":[]},{"id":"98560994a7884f15","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":1,"width":3,"height":1,"name":"Simulation","label":"Namespace 3","format":" <i class=\"fa fa-folder\" aria-hidden=\"true\"></i>","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1070,"y":100,"wires":[]},{"id":"4dd13685c3c2879e","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":3,"width":3,"height":1,"name":"StaticData","label":"Namespace 5","format":" <i class=\"fa fa-folder\" aria-hidden=\"true\"></i> <i class=\"fa fa-sort-desc\" aria-hidden=\"true\"></i>","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1070,"y":160,"wires":[]},{"id":"a29358cca5c1c12a","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":9,"width":3,"height":1,"name":"MyObjects","label":"Namespace 6","format":" <i class=\"fa fa-folder\" aria-hidden=\"true\"></i> <i class=\"fa fa-sort-desc\" aria-hidden=\"true\"></i>","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1070,"y":220,"wires":[]},{"id":"d0c969b6a59fac3a","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"MyObjects Folder","rules":[{"t":"set","p":"Objects.MyObjects.nodeId","pt":"flow","to":"payload[4].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[4].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":220,"wires":[["a29358cca5c1c12a"]]},{"id":"639da01fc957e547","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"StaticData Folder","rules":[{"t":"set","p":"Objects.StaticData.nodeId","pt":"flow","to":"payload[3].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[3].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":160,"wires":[["4dd13685c3c2879e"]]},{"id":"29437ca7222d9a64","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":510,"y":320,"wires":[["49040d0cf1144f0a","e7c55f412ef86543"]]},{"id":"49983d5da0958bf2","type":"inject","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Get StaticData Folder Structure","props":[{"p":"payload"},{"p":"topic","v":"Objects.StaticData.nodeId","vt":"flow"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.3","topic":"","payload":"","payloadType":"date","x":230,"y":320,"wires":[["29437ca7222d9a64"]]},{"id":"49040d0cf1144f0a","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"AnalogItemArrays Folder","rules":[{"t":"set","p":"Objects.StaticData.AnalogItemArrays.nodeId","pt":"flow","to":"payload[1].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[1].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":340,"wires":[["7b53b798a025f1d8"]]},{"id":"e7c55f412ef86543","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"StaticArrayVariables Folder","rules":[{"t":"set","p":"Objects.StaticData.StaticArrayVariables.nodeId","pt":"flow","to":"payload[6].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[6].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":280,"wires":[["71512a0d602095a0"]]},{"id":"7b53b798a025f1d8","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":8,"width":4,"height":1,"name":"AnalogItemArrays","label":"","format":"<i class=\"fa fa-folder\" aria-hidden=\"true\"></i>  ","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1090,"y":340,"wires":[]},{"id":"71512a0d602095a0","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":6,"width":4,"height":1,"name":"StaticArrayVariables","label":"","format":" <i class=\"fa fa-folder\" aria-hidden=\"true\"></i> ","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1100,"y":280,"wires":[]},{"id":"9c3b0c36d69c05cf","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":12,"width":4,"height":1,"name":"MyDevice","label":"","format":"<i class=\"fa fa-cube\" aria-hidden=\"true\"></i> ","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1060,"y":400,"wires":[]},{"id":"de21b7ad98a05833","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"MyDevice Object","rules":[{"t":"set","p":"Objects.MyObjects.MyDevice.nodeId","pt":"flow","to":"payload[0].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[0].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":400,"wires":[["9c3b0c36d69c05cf"]]},{"id":"2d56e9a431c21a3b","type":"inject","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Get MyObjects Object Structure","props":[{"p":"payload"},{"p":"topic","v":"Objects.MyObjects.nodeId","vt":"flow"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.5","topic":"","payload":"","payloadType":"date","x":230,"y":400,"wires":[["ac95bd0e2b304eec"]]},{"id":"ac95bd0e2b304eec","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":510,"y":400,"wires":[["de21b7ad98a05833"]]},{"id":"6fdabcc2950ccf4e","type":"comment","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Store & Parse nodeId & browseName","info":"","x":810,"y":60,"wires":[]},{"id":"1c49fa5142d2cf17","type":"comment","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Global Address Space Folder Browse","info":"","x":390,"y":120,"wires":[]},{"id":"53f4394dbf12c6b7","type":"OpcUa-Endpoint","endpoint":"opc.tcp://192.168.0.141:53530/OPCUA/SimulationServer","secpol":"None","secmode":"None","none":true,"login":false,"usercert":false,"usercertificate":"","userprivatekey":""},{"id":"4340b56a2335c304","type":"ui_group","name":"Address Space Structure","tab":"0113eb87060106be","order":1,"disp":true,"width":"7","collapse":false,"className":""},{"id":"0113eb87060106be","type":"ui_tab","name":"OPC UA","icon":"dashboard","order":7,"disabled":false,"hidden":false}]

To understand what is going on in this flow, we must refer back to the OPC UA Simulation Server Address Space tab.

When we browse the OPC Server base folder structure in Node-RED, we will be browsing everything included under the Objects tree.

address-space.png In our flow, we get the base folder structure by using an OPC-UA Browser node, as shown, with an endpoint that points to our OPC UA Server endpoint url we grabbed earlier in this article. It is also worth noting we leave the Topic blank. By doing this, we will browse the entire folder structure by default.

image-20230727-090252.png The configuration of the endpoint properties includes no security credentials, as shown below.

endpoint-configure.png

Using the output of a debug node, we get from the OPC UA Browser yield a payload with an array of 5 objects.

address-debug.png

Each object returned represents the 5 objects that are in our OPC UA Server Objects tree.

browse-payload-1.png

However, of those 5 objects, only 3 of them are folders that contain actual OPC values. MyObjects, Simulation, and StaticData. We can ignore Aliases and Server.

address-space-folders-only.png So looking deeper into the payload of our global browse from the OPC UA Browser node, we can drill down into the details and see how they correlate with the folders in the server.

browse-node.png

As shown above, element 2 in the array returned from the global browse corresponds to the Simulation folder. And we are interested in two important values in this data-structure - the NodeId, which is topic an OPC Client uses to point specific OPC values, and the browseName, which is the name we see visually when we try to identify an OPC topic. We can now use this logic to parse out this useful information using a change node.

simulation-folder.png This change node is grabbing the nodeId and browseName . The nodeId is stored in a context variable for later use, while the browseName is used as the payload to be displayed on our dashboard.

The rest of the flow follows this same pattern, to end up with a folder structure that we can display on our dashboard that matches the structure on our OPC Server

  • note - to make the flow more manageable, not all browsable folders were included in the dashboard, as this flow is just meant to serve as an example, rather than be a 1:1 copy of everything in the server.

If you deploy the flow and pull up the dashboard, it results in the following output -

address-space-dashboard.png Showing side-by-side with the server, you can see that we successfully browsed a portion of the address space and displayed the values on the dashboard. Admittedly, a lot of work for not much pay-off, but it’s a worthwhile exercise in understanding how to browse topics using the OPC UA Browser node. The browser node is best used for reading OPC UA values, which will be covered next.

Read OPC UA Values Using OPC UA Browser Node

The next set of flows read OPC UA values from the server and displays them on the dashboard.

read-opc-values.png You can import these flows into Node-RED using the code below:

[{"id":"ab8e5ebe8c14819d","type":"group","z":"58c0065ebdc1d89d","name":"Read Simulation Values & Display on Dashboard","style":{"stroke":"#a4a4a4","label":true,"color":"#001f60","fill":"#ffffff"},"nodes":["482da272d75f9fc9","36b93ad2d6b4b695","1819591e5ebae68d","740c976dd5aca65a","8d671460beac82d8","80e5270d14633586","de478581d1839a70","0128582021fb3fbc","454fe6a32820dbc9","5e955dbca478356f","57da7c9808e5fa56","5658b05beada4467","8f866373ed32349c","35f53fe496f4f68a","c9e043783aeaf0fa"],"x":34,"y":519,"w":1372,"h":302},{"id":"482da272d75f9fc9","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":510,"y":680,"wires":[["80e5270d14633586"]]},{"id":"36b93ad2d6b4b695","type":"inject","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Update Simulation Values @ 1 second","props":[{"p":"payload"},{"p":"topic","v":"Objects.Simulation.nodeId","vt":"flow"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":680,"wires":[["482da272d75f9fc9"]]},{"id":"1819591e5ebae68d","type":"comment","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Read Simulation Values","info":"","x":400,"y":640,"wires":[]},{"id":"740c976dd5aca65a","type":"change","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Get Counter Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[1].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":600,"wires":[["8d671460beac82d8"]]},{"id":"8d671460beac82d8","type":"ui_gauge","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"","group":"825fe3323bd36ae6","order":1,"width":"0","height":"0","gtype":"gage","title":"Counter","label":"units","format":"","min":0,"max":"30","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1260,"y":600,"wires":[]},{"id":"80e5270d14633586","type":"switch","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"empty check","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":730,"y":680,"wires":[["740c976dd5aca65a","de478581d1839a70","454fe6a32820dbc9","57da7c9808e5fa56"]]},{"id":"de478581d1839a70","type":"change","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Get Random Number Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[2].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":660,"wires":[["0128582021fb3fbc"]]},{"id":"0128582021fb3fbc","type":"ui_text","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","group":"825fe3323bd36ae6","order":7,"width":0,"height":0,"name":"","label":"Random Number","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1290,"y":660,"wires":[]},{"id":"454fe6a32820dbc9","type":"change","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Get Sawtooth Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[3].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":720,"wires":[["5e955dbca478356f"]]},{"id":"5e955dbca478356f","type":"ui_chart","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"","group":"825fe3323bd36ae6","order":8,"width":0,"height":0,"label":"Sawtooth","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1260,"y":720,"wires":[[]]},{"id":"57da7c9808e5fa56","type":"change","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Get Sawtooth Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[4].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":780,"wires":[["5658b05beada4467"]]},{"id":"5658b05beada4467","type":"ui_chart","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"","group":"825fe3323bd36ae6","order":9,"width":0,"height":0,"label":"Sinusoid","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1260,"y":780,"wires":[[]]},{"id":"8f866373ed32349c","type":"comment","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Discard Empty Datasets","info":"","x":720,"y":640,"wires":[]},{"id":"35f53fe496f4f68a","type":"comment","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Parse Simulation Values","info":"","x":1010,"y":560,"wires":[]},{"id":"c9e043783aeaf0fa","type":"comment","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Display on Dashboard","info":"","x":1280,"y":560,"wires":[]},{"id":"53f4394dbf12c6b7","type":"OpcUa-Endpoint","endpoint":"opc.tcp://192.168.0.141:53530/OPCUA/SimulationServer","secpol":"None","secmode":"None","none":true,"login":false,"usercert":false,"usercertificate":"","userprivatekey":""},{"id":"825fe3323bd36ae6","type":"ui_group","name":"Simulation Values","tab":"0113eb87060106be","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"0113eb87060106be","type":"ui_tab","name":"OPC UA","icon":"dashboard","order":7,"disabled":false,"hidden":false},{"id":"23696c742b062ee0","type":"group","z":"58c0065ebdc1d89d","name":"Read StaticData Values & Display on Dashboard","style":{"stroke":"#a4a4a4","label":true,"color":"#000000","fill":"#ffffff"},"nodes":["e573ccc34fdcde6e","cf673bdce7b5b77a","eb9263b229ec4811","551d276aed309e6e","9c84f8d19ae7ea45","bf9e5ad82b0f9a0e","14eaeb56e3922c6a","12be1bc3729ee611","d9f2b147a2519719","09882f19a74faff8","d89e22654946066d","9c5762fc7fdbae59","a5981d515cfadb55","a736c876b46c763f"],"x":34,"y":859,"w":1372,"h":202},{"id":"e573ccc34fdcde6e","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":570,"y":940,"wires":[["9c84f8d19ae7ea45"]]},{"id":"cf673bdce7b5b77a","type":"inject","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Update AnalogItemArrays Values @ 1 second","props":[{"p":"payload"},{"p":"topic","v":"Objects.StaticData.AnalogItemArrays.nodeId","vt":"flow"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":260,"y":940,"wires":[["e573ccc34fdcde6e"]]},{"id":"eb9263b229ec4811","type":"comment","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Read StaticData Values","info":"","x":460,"y":900,"wires":[]},{"id":"551d276aed309e6e","type":"change","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Get ByteAnalogItemArray Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":940,"wires":[["bf9e5ad82b0f9a0e"]]},{"id":"9c84f8d19ae7ea45","type":"switch","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"empty check","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":770,"y":940,"wires":[["551d276aed309e6e"]]},{"id":"bf9e5ad82b0f9a0e","type":"ui_text","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","group":"92444e82445bab62","order":1,"width":0,"height":0,"name":"","label":"ByteAnalogItemArray","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1280,"y":940,"wires":[]},{"id":"14eaeb56e3922c6a","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":570,"y":1020,"wires":[["09882f19a74faff8"]]},{"id":"12be1bc3729ee611","type":"inject","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Update StaticArrayVariables Values @1 second","props":[{"p":"payload"},{"p":"topic","v":"Objects.StaticData.StaticArrayVariables.nodeId","vt":"flow"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":260,"y":1020,"wires":[["14eaeb56e3922c6a"]]},{"id":"d9f2b147a2519719","type":"change","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Get BooleanArray Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":1020,"wires":[["d89e22654946066d"]]},{"id":"09882f19a74faff8","type":"switch","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"empty check","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":770,"y":1020,"wires":[["d9f2b147a2519719"]]},{"id":"d89e22654946066d","type":"ui_text","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","group":"92444e82445bab62","order":2,"width":0,"height":0,"name":"","label":"BooleanArray","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1260,"y":1020,"wires":[]},{"id":"9c5762fc7fdbae59","type":"comment","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Discard Empty Datasets","info":"","x":760,"y":900,"wires":[]},{"id":"a5981d515cfadb55","type":"comment","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Parse StaticData Values","info":"","x":1010,"y":900,"wires":[]},{"id":"a736c876b46c763f","type":"comment","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Display on Dashboard","info":"","x":1280,"y":900,"wires":[]},{"id":"92444e82445bab62","type":"ui_group","name":"StaticData Values","tab":"0113eb87060106be","order":3,"disp":true,"width":"6","collapse":false,"className":""},{"id":"38f43e1ab70fe0cf","type":"group","z":"58c0065ebdc1d89d","name":"Read MyDevice Values & Display on Dashboard","style":{"label":true,"color":"#000000","fill":"#ffffff"},"nodes":["513d07a651243e9e","96294bbf031d67e8","3140b66e39039a37","8eda44307f47c12f","cb0a56243f0a6b5e","d6d60ff6a933ad1d","7de0892e28c6fea9","13c6bf381ff0d8b2","8b48799434be36cf","e29a74ea9a1de0ef","a27699b4e9697558"],"x":34,"y":1099,"w":1292,"h":182},{"id":"513d07a651243e9e","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":530,"y":1200,"wires":[["cb0a56243f0a6b5e"]]},{"id":"96294bbf031d67e8","type":"inject","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Read MyDevice Values @ 1 second","props":[{"p":"payload"},{"p":"topic","v":"Objects.MyObjects.MyDevice.nodeId","vt":"flow"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":1200,"wires":[["513d07a651243e9e"]]},{"id":"3140b66e39039a37","type":"comment","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Read MyDevice","info":"","x":420,"y":1160,"wires":[]},{"id":"8eda44307f47c12f","type":"change","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Get MyLevel Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":1180,"wires":[["7de0892e28c6fea9"]]},{"id":"cb0a56243f0a6b5e","type":"switch","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"empty check","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":750,"y":1200,"wires":[["8eda44307f47c12f","d6d60ff6a933ad1d"]]},{"id":"d6d60ff6a933ad1d","type":"change","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Get MySwitch Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[4].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":1240,"wires":[["13c6bf381ff0d8b2"]]},{"id":"7de0892e28c6fea9","type":"ui_gauge","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"","group":"b095aee62f84e514","order":4,"width":"0","height":"0","gtype":"wave","title":"MyLevel","label":"%","format":"","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1200,"y":1180,"wires":[]},{"id":"13c6bf381ff0d8b2","type":"ui_led","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","order":2,"group":"b095aee62f84e514","width":0,"height":0,"label":"MySwitch","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":1190,"y":1240,"wires":[]},{"id":"8b48799434be36cf","type":"comment","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Display on Dashboard","info":"","x":1200,"y":1140,"wires":[]},{"id":"e29a74ea9a1de0ef","type":"comment","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Parse MyDevice Values","info":"","x":980,"y":1140,"wires":[]},{"id":"a27699b4e9697558","type":"comment","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Discard Empty Datasets","info":"","x":740,"y":1160,"wires":[]},{"id":"b095aee62f84e514","type":"ui_group","name":"MyDevice Status & Control","tab":"0113eb87060106be","order":4,"disp":true,"width":"6","collapse":false,"className":""}]

The values are derived from the nodeId values we stored in memory in our previous flow, via our change nodes in the previous flow.

flow-context-nodeid.png As stated earlier, you reference a OPC UA topic by its nodeId. So we will use these node IDs to read actual values from our OPC nodes.

In our first flow, we want to read the values in the Simulation folder at a 1 second interval. So we use an inject node with a msg.topic that references the nodeId corresponding to the Simulation folder.

simulation-injection.png That msg.topic tells the OPC UA Browser node what nodeId to browse. If we look at the debug output of the browser msg.payload, we can see that it produces an array of 7 objects, and an empty set array.

simulation-debug.png If we allow that empty array to be passed, that means all values will be reset to 0 on each read. So to prevent that from happening, we use a switch node to filter out the empty set.

empty-check.png Now only non-empty payloads will be passed, preventing the values being reset to 0 on each read.

Now we can actually read the values. To do this, we use a change node again, referencing the non-empty payload and drilling down to the value that corresponds to the name of the node we want to read. In this case, we’re getting the value of the node Counter located in the Simulation folder.

get-counter-value.png Going back to our OPC Server, we can see that exactly where that value is derived below -

sim-counter-server.png

Now we add a gauge dashboard node to visualize the counter on the dashboard. In the OPC Server, it is shown that the counter increments in a range of 0-30 in 1 count increments.

counter-properties.png Now that we’ve gone through the full process of reading an OPC UA value and displaying it on the dashboard, we can apply the same logic other values published by the OPC UA Server, which are repeated in the remaining parts of the flow.

The end result on the dashboard now looks like this -

opc-read-dashboard.gif

Write OPC UA Values To Server Using OpcUa-Item and Opc-Ua-Client Nodes

The next flow writes OPC UA values to the server using dashboard UI elements.

write-mydevice.png You can import this flow into Node-RED using the code below:

[{"id":"b1eeba37b0d982ef","type":"group","z":"58c0065ebdc1d89d","name":"Write MyDevice Values to OPC UA Server","style":{"label":true,"color":"#000000","fill":"#ffffff"},"nodes":["2cb01ef75f8b5f39","36daedb0c2a5295d","f6d73ab104914017","16224a3eefb5184e","711c6f36547b4efb","cb0e16ceab421d58","968a8b27d03f6372","19c427f70d0ed845","01153fddbbb2cd73"],"x":74,"y":1399,"w":792,"h":182},{"id":"2cb01ef75f8b5f39","type":"ui_switch","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"","label":"Toggle MySwitch","tooltip":"","group":"d60c2dfabc359e22","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"className":"","x":190,"y":1480,"wires":[["36daedb0c2a5295d"]]},{"id":"36daedb0c2a5295d","type":"OpcUa-Item","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","item":"ns=6;s=MySwitch","datatype":"Boolean","value":"","name":"Toggle MySwitch","x":450,"y":1480,"wires":[["f6d73ab104914017"]]},{"id":"f6d73ab104914017","type":"OpcUa-Client","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","endpoint":"53f4394dbf12c6b7","action":"write","deadbandtype":"a","deadbandvalue":1,"time":10,"timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","folderName4PKI":"","useTransport":false,"maxChunkCount":1,"maxMessageSize":8192,"receiveBufferSize":8192,"sendBufferSize":8192,"name":"Write MySwitch","x":700,"y":1480,"wires":[[]]},{"id":"16224a3eefb5184e","type":"comment","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"Dashboard Input","info":"","x":180,"y":1440,"wires":[]},{"id":"711c6f36547b4efb","type":"ui_slider","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"","label":"Modify MyLevel","tooltip":"","group":"d60c2dfabc359e22","order":3,"width":0,"height":0,"passthru":true,"outs":"all","topic":"topic","topicType":"msg","min":0,"max":"100","step":1,"className":"","x":180,"y":1540,"wires":[["cb0e16ceab421d58"]]},{"id":"cb0e16ceab421d58","type":"OpcUa-Item","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","item":"ns=6;s=MyLevel","datatype":"Double","value":"","name":"Modify MyLevel","x":440,"y":1540,"wires":[["968a8b27d03f6372"]]},{"id":"968a8b27d03f6372","type":"OpcUa-Client","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","endpoint":"53f4394dbf12c6b7","action":"write","deadbandtype":"a","deadbandvalue":1,"time":10,"timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","folderName4PKI":"","useTransport":false,"maxChunkCount":1,"maxMessageSize":8192,"receiveBufferSize":8192,"sendBufferSize":8192,"name":"Write MyLevel","x":700,"y":1540,"wires":[[]]},{"id":"19c427f70d0ed845","type":"comment","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"Call OPC UA Item","info":"","x":450,"y":1440,"wires":[]},{"id":"01153fddbbb2cd73","type":"comment","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"Write OPC UA Item to Client","info":"","x":720,"y":1440,"wires":[]},{"id":"d60c2dfabc359e22","type":"ui_group","name":"Barcode Scanner","tab":"b7603898c5b527e4","order":2,"disp":true,"width":"12","collapse":false,"className":""},{"id":"53f4394dbf12c6b7","type":"OpcUa-Endpoint","endpoint":"opc.tcp://192.168.0.141:53530/OPCUA/SimulationServer","secpol":"None","secmode":"None","none":true,"login":false,"usercert":false,"usercertificate":"","userprivatekey":""},{"id":"b7603898c5b527e4","type":"ui_tab","name":"Camera","icon":"camera","order":5,"disabled":false,"hidden":false}]

We have two values to write, a boolean value corresponding to the node object MySwitch, and an integer value corresponding to the object MyLevel. Therefore, we will use a toggle switch to toggle the MySwitch, and a slider to modify MyLevel.

There’s no need to modify the toggle switch properties, other than giving it a name. The slider needs to have the range modified to match the range of the level, which is 0-100%.

level-range.png For the OpcUa-Item nodes, copy the NodeId corresponding to each device,

copy-node-id.png and paste it into OpcUa-Item node. You must also ensure the data-type matches with the value you’re writing to.

opcua-item.png The Opc-Ua-Client needs to have an endpoint and the action changed to WRITE.

client-node.png The process is the same for MySwitch and MyLevel, the only difference being what NodeId is referenced in the OpcUa-Item node.

When deployed, you can confirm values are being written to from the client to the server from the dashboard.

Read Alarms & Events from OPC UA Server Using OpcUa-Event and Opc-Ua-Client Nodes

Our last flow we’ll show how to read OPC UA Alarms & Events.

opc-event-flow.png You can import this flow into Node-RED using the code below:

[{"id":"3013af7593f2847b","type":"group","z":"58c0065ebdc1d89d","name":"Read Alarms & Events From OPC UA Server","style":{"label":true,"color":"#000000","fill":"#ffffff"},"nodes":["bd95b96ed77a621c","26b7db518e4ac448","05b98e27c8317489","67aa6d2ecee3895b","bfb585c5777dfeca","4c47ed5a65160149","b6d318d3372e149f","8d36820730690d7d","87eb7ad331a15823","fd228940746d2e4c","564212f76a83ce5e","8a06f75c33593dc1","6ba832b756579002","be911708a19728b0"],"x":54,"y":1639,"w":1332,"h":282},{"id":"bd95b96ed77a621c","type":"comment","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Call OPC UA Item","info":"","x":430,"y":1780,"wires":[]},{"id":"26b7db518e4ac448","type":"OpcUa-Event","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","root":"ns=6;s=MyLevel.Alarm","activatecustomevent":false,"eventtype":"i=2041","customeventtype":"","name":"MyLevel Alarms","x":460,"y":1820,"wires":[["67aa6d2ecee3895b"]]},{"id":"05b98e27c8317489","type":"inject","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Trigger Alarm Event Capture","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":1820,"wires":[["26b7db518e4ac448"]]},{"id":"67aa6d2ecee3895b","type":"OpcUa-Client","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","endpoint":"53f4394dbf12c6b7","action":"events","deadbandtype":"a","deadbandvalue":1,"time":10,"timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","folderName4PKI":"","useTransport":false,"maxChunkCount":1,"maxMessageSize":8192,"receiveBufferSize":8192,"sendBufferSize":8192,"name":"Get MyLevel Events","x":680,"y":1820,"wires":[["4c47ed5a65160149","8d36820730690d7d","87eb7ad331a15823"]]},{"id":"bfb585c5777dfeca","type":"ui_text","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","group":"b095aee62f84e514","order":5,"width":0,"height":0,"name":"","label":"Latest MyLevel Event","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1180,"y":1780,"wires":[]},{"id":"4c47ed5a65160149","type":"change","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Event Text","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Message.text","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":1760,"wires":[["bfb585c5777dfeca","564212f76a83ce5e"]]},{"id":"b6d318d3372e149f","type":"ui_text","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","group":"b095aee62f84e514","order":7,"width":0,"height":0,"name":"","label":"Latest MyLevel Event Timestamp","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1220,"y":1820,"wires":[]},{"id":"8d36820730690d7d","type":"change","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Event Time","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Time","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":1820,"wires":[["b6d318d3372e149f"]]},{"id":"87eb7ad331a15823","type":"change","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Event Severity","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Severity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":1880,"wires":[["fd228940746d2e4c"]]},{"id":"fd228940746d2e4c","type":"ui_text","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","group":"b095aee62f84e514","order":6,"width":0,"height":0,"name":"","label":"Latest MyLevel Event Severity","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1210,"y":1880,"wires":[]},{"id":"564212f76a83ce5e","type":"ui_toast","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"Event Notification","x":1170,"y":1720,"wires":[]},{"id":"8a06f75c33593dc1","type":"comment","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Parse Event Dataset","info":"","x":950,"y":1720,"wires":[]},{"id":"6ba832b756579002","type":"comment","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Get OPC Events from Client","info":"","x":680,"y":1780,"wires":[]},{"id":"be911708a19728b0","type":"comment","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Display Events on Dashboard","info":"","x":1200,"y":1680,"wires":[]},{"id":"53f4394dbf12c6b7","type":"OpcUa-Endpoint","endpoint":"opc.tcp://192.168.0.141:53530/OPCUA/SimulationServer","secpol":"None","secmode":"None","none":true,"login":false,"usercert":false,"usercertificate":"","userprivatekey":""},{"id":"b095aee62f84e514","type":"ui_group","name":"MyDevice Status & Control","tab":"0113eb87060106be","order":4,"disp":true,"width":"6","collapse":false,"className":""},{"id":"0113eb87060106be","type":"ui_tab","name":"OPC UA","icon":"dashboard","order":7,"disabled":false,"hidden":false}]

We use an inject node to trigger the OpcUa-Event node. In the properties of the event node, we get the NodeId from the MyLevelAlarm event from the OPC Server -

mylevel-event.png And copy that NodeId into the OpcUa-Event node. Event type will be BaseEvent (all).

event-node-properties.png In the Opc-Ua-Client node, we set the Action to EVENTS.

client-events.png If we stick a debug node on the output of the client event, we can see how the OPC Server annunciates events.

event-debug.png Every time MyLevel exceeds certain thresholds (10%, 30%, 70% and 90%) it will flag a Level Exceeded alarm. The event is timestamped and assigned a severity level, which we will record and put onto the dashboard.

To make things simple, we’ll only track the last event. But in a production system, you’d likely want to store these events in a relational database (historian) to keep an alarm history. We’ll also include a notification pop-up when an alarm occurs to notify someone monitoring the dashboard a new alarm has occurred.

Adding alarms and events to our dashboard creates the following result -

opc-event.gif

Conclusion

In this final article, we went over building a OPC UA Client dashboard that can browse the address space, read values from an OPC Server, write values to an OPC Server, and get events from an OPC Server.

This flow provides examples that can serve as a foundation for an interactive OPC Client application built in Node-RED. This now concludes the OPC UA Series.

full source code for this project -

[{"id":"58c0065ebdc1d89d","type":"tab","label":"Prosys OPC UA Client Example","disabled":false,"info":"","env":[]},{"id":"3e09b7a420dd81d2","type":"group","z":"58c0065ebdc1d89d","name":"Browse Hierarchical Address Space Structure & Display on Dashboard","style":{"label":true,"stroke":"#a4a4a4","color":"#000000","fill":"#ffffff"},"nodes":["6b17b2da2b942bb4","61797eccf2785257","4d92d940177b6ee3","68a113d5893b7c01","98560994a7884f15","4dd13685c3c2879e","a29358cca5c1c12a","d0c969b6a59fac3a","639da01fc957e547","29437ca7222d9a64","49983d5da0958bf2","49040d0cf1144f0a","e7c55f412ef86543","7b53b798a025f1d8","71512a0d602095a0","9c3b0c36d69c05cf","de21b7ad98a05833","2d56e9a431c21a3b","ac95bd0e2b304eec","6fdabcc2950ccf4e","1c49fa5142d2cf17"],"x":54,"y":19,"w":1172,"h":422},{"id":"ab8e5ebe8c14819d","type":"group","z":"58c0065ebdc1d89d","name":"Read Simulation Values & Display on Dashboard","style":{"stroke":"#a4a4a4","label":true,"color":"#001f60","fill":"#ffffff"},"nodes":["482da272d75f9fc9","36b93ad2d6b4b695","1819591e5ebae68d","740c976dd5aca65a","8d671460beac82d8","80e5270d14633586","de478581d1839a70","0128582021fb3fbc","454fe6a32820dbc9","5e955dbca478356f","57da7c9808e5fa56","5658b05beada4467","8f866373ed32349c","35f53fe496f4f68a","c9e043783aeaf0fa"],"x":54,"y":479,"w":1372,"h":302},{"id":"23696c742b062ee0","type":"group","z":"58c0065ebdc1d89d","name":"Read StaticData Values & Display on Dashboard","style":{"stroke":"#a4a4a4","label":true,"color":"#000000","fill":"#ffffff"},"nodes":["e573ccc34fdcde6e","cf673bdce7b5b77a","eb9263b229ec4811","551d276aed309e6e","9c84f8d19ae7ea45","bf9e5ad82b0f9a0e","14eaeb56e3922c6a","12be1bc3729ee611","d9f2b147a2519719","09882f19a74faff8","d89e22654946066d","9c5762fc7fdbae59","a5981d515cfadb55","a736c876b46c763f"],"x":54,"y":819,"w":1372,"h":202},{"id":"38f43e1ab70fe0cf","type":"group","z":"58c0065ebdc1d89d","name":"Read MyDevice Values & Display on Dashboard","style":{"label":true,"color":"#000000","fill":"#ffffff"},"nodes":["513d07a651243e9e","96294bbf031d67e8","3140b66e39039a37","8eda44307f47c12f","cb0a56243f0a6b5e","d6d60ff6a933ad1d","7de0892e28c6fea9","13c6bf381ff0d8b2","8b48799434be36cf","e29a74ea9a1de0ef","a27699b4e9697558"],"x":54,"y":1059,"w":1292,"h":182},{"id":"b1eeba37b0d982ef","type":"group","z":"58c0065ebdc1d89d","name":"Write MyDevice Values to OPC UA Server","style":{"label":true,"color":"#000000","fill":"#ffffff"},"nodes":["2cb01ef75f8b5f39","36daedb0c2a5295d","f6d73ab104914017","16224a3eefb5184e","711c6f36547b4efb","cb0e16ceab421d58","968a8b27d03f6372","19c427f70d0ed845","01153fddbbb2cd73"],"x":54,"y":1279,"w":792,"h":182},{"id":"3013af7593f2847b","type":"group","z":"58c0065ebdc1d89d","name":"Read Alarms & Events From OPC UA Server","style":{"label":true,"color":"#000000","fill":"#ffffff"},"nodes":["bd95b96ed77a621c","26b7db518e4ac448","05b98e27c8317489","67aa6d2ecee3895b","bfb585c5777dfeca","4c47ed5a65160149","b6d318d3372e149f","8d36820730690d7d","87eb7ad331a15823","fd228940746d2e4c","564212f76a83ce5e","8a06f75c33593dc1","6ba832b756579002","be911708a19728b0"],"x":54,"y":1499,"w":1332,"h":282},{"id":"6b17b2da2b942bb4","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":510,"y":160,"wires":[["4d92d940177b6ee3","d0c969b6a59fac3a","639da01fc957e547"]]},{"id":"1c49fa5142d2cf17","type":"comment","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Global Address Space Folder Browse","info":"","x":390,"y":120,"wires":[]},{"id":"61797eccf2785257","type":"inject","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Get Base Folder Structure","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.3","topic":"","payload":"","payloadType":"date","x":240,"y":160,"wires":[["6b17b2da2b942bb4"]]},{"id":"4d92d940177b6ee3","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Simulation Folder","rules":[{"t":"set","p":"Objects.Simulation.nodeId","pt":"flow","to":"payload[2].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[2].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":100,"wires":[["98560994a7884f15"]]},{"id":"68a113d5893b7c01","type":"comment","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Display on Dashboard","info":"","x":1100,"y":60,"wires":[]},{"id":"98560994a7884f15","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":1,"width":3,"height":1,"name":"Simulation","label":"Namespace 3","format":" <i class=\"fa fa-folder\" aria-hidden=\"true\"></i>","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1070,"y":100,"wires":[]},{"id":"482da272d75f9fc9","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":530,"y":640,"wires":[["80e5270d14633586"]]},{"id":"36b93ad2d6b4b695","type":"inject","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Update Simulation Values @ 1 second","props":[{"p":"payload"},{"p":"topic","v":"Objects.Simulation.nodeId","vt":"flow"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":260,"y":640,"wires":[["482da272d75f9fc9"]]},{"id":"1819591e5ebae68d","type":"comment","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Read Simulation Values","info":"","x":420,"y":600,"wires":[]},{"id":"740c976dd5aca65a","type":"change","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Get Counter Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[1].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":560,"wires":[["8d671460beac82d8"]]},{"id":"8d671460beac82d8","type":"ui_gauge","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"","group":"825fe3323bd36ae6","order":1,"width":"0","height":"0","gtype":"gage","title":"Counter","label":"units","format":"","min":0,"max":"30","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1280,"y":560,"wires":[]},{"id":"80e5270d14633586","type":"switch","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"empty check","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":750,"y":640,"wires":[["740c976dd5aca65a","de478581d1839a70","454fe6a32820dbc9","57da7c9808e5fa56"]]},{"id":"de478581d1839a70","type":"change","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Get Random Number Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[2].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":620,"wires":[["0128582021fb3fbc"]]},{"id":"0128582021fb3fbc","type":"ui_text","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","group":"825fe3323bd36ae6","order":7,"width":0,"height":0,"name":"","label":"Random Number","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1310,"y":620,"wires":[]},{"id":"4dd13685c3c2879e","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":3,"width":3,"height":1,"name":"StaticData","label":"Namespace 5","format":" <i class=\"fa fa-folder\" aria-hidden=\"true\"></i> <i class=\"fa fa-sort-desc\" aria-hidden=\"true\"></i>","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1070,"y":160,"wires":[]},{"id":"a29358cca5c1c12a","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":9,"width":3,"height":1,"name":"MyObjects","label":"Namespace 6","format":" <i class=\"fa fa-folder\" aria-hidden=\"true\"></i> <i class=\"fa fa-sort-desc\" aria-hidden=\"true\"></i>","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1070,"y":220,"wires":[]},{"id":"d0c969b6a59fac3a","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"MyObjects Folder","rules":[{"t":"set","p":"Objects.MyObjects.nodeId","pt":"flow","to":"payload[4].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[4].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":220,"wires":[["a29358cca5c1c12a"]]},{"id":"454fe6a32820dbc9","type":"change","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Get Sawtooth Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[3].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":680,"wires":[["5e955dbca478356f"]]},{"id":"5e955dbca478356f","type":"ui_chart","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"","group":"825fe3323bd36ae6","order":8,"width":0,"height":0,"label":"Sawtooth","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1280,"y":680,"wires":[[]]},{"id":"57da7c9808e5fa56","type":"change","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Get Sawtooth Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[4].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1040,"y":740,"wires":[["5658b05beada4467"]]},{"id":"5658b05beada4467","type":"ui_chart","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"","group":"825fe3323bd36ae6","order":9,"width":0,"height":0,"label":"Sinusoid","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":1280,"y":740,"wires":[[]]},{"id":"e573ccc34fdcde6e","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":590,"y":900,"wires":[["9c84f8d19ae7ea45"]]},{"id":"cf673bdce7b5b77a","type":"inject","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Update AnalogItemArrays Values @ 1 second","props":[{"p":"payload"},{"p":"topic","v":"Objects.StaticData.AnalogItemArrays.nodeId","vt":"flow"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":900,"wires":[["e573ccc34fdcde6e"]]},{"id":"eb9263b229ec4811","type":"comment","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Read StaticData Values","info":"","x":480,"y":860,"wires":[]},{"id":"551d276aed309e6e","type":"change","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Get ByteAnalogItemArray Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":900,"wires":[["bf9e5ad82b0f9a0e"]]},{"id":"9c84f8d19ae7ea45","type":"switch","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"empty check","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":790,"y":900,"wires":[["551d276aed309e6e"]]},{"id":"639da01fc957e547","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"StaticData Folder","rules":[{"t":"set","p":"Objects.StaticData.nodeId","pt":"flow","to":"payload[3].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[3].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":160,"wires":[["4dd13685c3c2879e"]]},{"id":"29437ca7222d9a64","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":510,"y":320,"wires":[["49040d0cf1144f0a","e7c55f412ef86543"]]},{"id":"49983d5da0958bf2","type":"inject","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Get StaticData Folder Structure","props":[{"p":"payload"},{"p":"topic","v":"Objects.StaticData.nodeId","vt":"flow"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.3","topic":"","payload":"","payloadType":"date","x":230,"y":320,"wires":[["29437ca7222d9a64"]]},{"id":"49040d0cf1144f0a","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"AnalogItemArrays Folder","rules":[{"t":"set","p":"Objects.StaticData.AnalogItemArrays.nodeId","pt":"flow","to":"payload[1].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[1].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":340,"wires":[["7b53b798a025f1d8"]]},{"id":"e7c55f412ef86543","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"StaticArrayVariables Folder","rules":[{"t":"set","p":"Objects.StaticData.StaticArrayVariables.nodeId","pt":"flow","to":"payload[6].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[6].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":280,"wires":[["71512a0d602095a0"]]},{"id":"7b53b798a025f1d8","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":8,"width":4,"height":1,"name":"AnalogItemArrays","label":"","format":"<i class=\"fa fa-folder\" aria-hidden=\"true\"></i>  ","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1090,"y":340,"wires":[]},{"id":"71512a0d602095a0","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":6,"width":4,"height":1,"name":"StaticArrayVariables","label":"","format":" <i class=\"fa fa-folder\" aria-hidden=\"true\"></i> ","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1100,"y":280,"wires":[]},{"id":"bf9e5ad82b0f9a0e","type":"ui_text","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","group":"92444e82445bab62","order":1,"width":0,"height":0,"name":"","label":"ByteAnalogItemArray","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1300,"y":900,"wires":[]},{"id":"14eaeb56e3922c6a","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":590,"y":980,"wires":[["09882f19a74faff8"]]},{"id":"12be1bc3729ee611","type":"inject","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Update StaticArrayVariables Values @1 second","props":[{"p":"payload"},{"p":"topic","v":"Objects.StaticData.StaticArrayVariables.nodeId","vt":"flow"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":980,"wires":[["14eaeb56e3922c6a"]]},{"id":"d9f2b147a2519719","type":"change","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Get BooleanArray Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":980,"wires":[["d89e22654946066d"]]},{"id":"09882f19a74faff8","type":"switch","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"empty check","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":790,"y":980,"wires":[["d9f2b147a2519719"]]},{"id":"d89e22654946066d","type":"ui_text","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","group":"92444e82445bab62","order":2,"width":0,"height":0,"name":"","label":"BooleanArray","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1280,"y":980,"wires":[]},{"id":"513d07a651243e9e","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":550,"y":1160,"wires":[["cb0a56243f0a6b5e"]]},{"id":"96294bbf031d67e8","type":"inject","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Read MyDevice Values @ 1 second","props":[{"p":"payload"},{"p":"topic","v":"Objects.MyObjects.MyDevice.nodeId","vt":"flow"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":1160,"wires":[["513d07a651243e9e"]]},{"id":"3140b66e39039a37","type":"comment","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Read MyDevice","info":"","x":440,"y":1120,"wires":[]},{"id":"8eda44307f47c12f","type":"change","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Get MyLevel Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[0].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":1140,"wires":[["7de0892e28c6fea9"]]},{"id":"cb0a56243f0a6b5e","type":"switch","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"empty check","property":"payload","propertyType":"msg","rules":[{"t":"nempty"}],"checkall":"true","repair":false,"outputs":1,"x":770,"y":1160,"wires":[["8eda44307f47c12f","d6d60ff6a933ad1d"]]},{"id":"d6d60ff6a933ad1d","type":"change","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Get MySwitch Value","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload[4].item.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":1200,"wires":[["13c6bf381ff0d8b2"]]},{"id":"9c3b0c36d69c05cf","type":"ui_text","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","group":"4340b56a2335c304","order":12,"width":4,"height":1,"name":"MyDevice","label":"","format":"<i class=\"fa fa-cube\" aria-hidden=\"true\"></i> ","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1060,"y":400,"wires":[]},{"id":"de21b7ad98a05833","type":"change","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"MyDevice Object","rules":[{"t":"set","p":"Objects.MyObjects.MyDevice.nodeId","pt":"flow","to":"payload[0].item.nodeId","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"payload[0].item.browseName.name","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":400,"wires":[["9c3b0c36d69c05cf"]]},{"id":"2d56e9a431c21a3b","type":"inject","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Get MyObjects Object Structure","props":[{"p":"payload"},{"p":"topic","v":"Objects.MyObjects.nodeId","vt":"flow"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.5","topic":"","payload":"","payloadType":"date","x":230,"y":400,"wires":[["ac95bd0e2b304eec"]]},{"id":"ac95bd0e2b304eec","type":"OpcUa-Browser","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","endpoint":"53f4394dbf12c6b7","item":"","datatype":"","topic":"","items":[],"name":"OPC Client Namespace Browse","x":510,"y":400,"wires":[["de21b7ad98a05833"]]},{"id":"7de0892e28c6fea9","type":"ui_gauge","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"","group":"b095aee62f84e514","order":4,"width":"0","height":"0","gtype":"wave","title":"MyLevel","label":"%","format":"","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":1220,"y":1140,"wires":[]},{"id":"13c6bf381ff0d8b2","type":"ui_led","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","order":2,"group":"b095aee62f84e514","width":0,"height":0,"label":"MySwitch","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":1210,"y":1200,"wires":[]},{"id":"2cb01ef75f8b5f39","type":"ui_switch","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"","label":"Toggle MySwitch","tooltip":"","group":"b095aee62f84e514","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"className":"","x":170,"y":1360,"wires":[["36daedb0c2a5295d"]]},{"id":"36daedb0c2a5295d","type":"OpcUa-Item","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","item":"ns=6;s=MySwitch","datatype":"Boolean","value":"","name":"Toggle MySwitch","x":430,"y":1360,"wires":[["f6d73ab104914017"]]},{"id":"f6d73ab104914017","type":"OpcUa-Client","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","endpoint":"53f4394dbf12c6b7","action":"write","deadbandtype":"a","deadbandvalue":1,"time":10,"timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","folderName4PKI":"","useTransport":false,"maxChunkCount":1,"maxMessageSize":8192,"receiveBufferSize":8192,"sendBufferSize":8192,"name":"Write MySwitch","x":680,"y":1360,"wires":[[]]},{"id":"16224a3eefb5184e","type":"comment","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"Dashboard Input","info":"","x":160,"y":1320,"wires":[]},{"id":"8b48799434be36cf","type":"comment","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Display on Dashboard","info":"","x":1220,"y":1100,"wires":[]},{"id":"bd95b96ed77a621c","type":"comment","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Call OPC UA Item","info":"","x":430,"y":1640,"wires":[]},{"id":"26b7db518e4ac448","type":"OpcUa-Event","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","root":"ns=6;s=MyLevel.Alarm","activatecustomevent":false,"eventtype":"i=2041","customeventtype":"","name":"MyLevel Alarms","x":460,"y":1680,"wires":[["67aa6d2ecee3895b"]]},{"id":"05b98e27c8317489","type":"inject","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Trigger Alarm Event Capture","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":1680,"wires":[["26b7db518e4ac448"]]},{"id":"67aa6d2ecee3895b","type":"OpcUa-Client","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","endpoint":"53f4394dbf12c6b7","action":"events","deadbandtype":"a","deadbandvalue":1,"time":10,"timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","folderName4PKI":"","useTransport":false,"maxChunkCount":1,"maxMessageSize":8192,"receiveBufferSize":8192,"sendBufferSize":8192,"name":"Get MyLevel Events","x":680,"y":1680,"wires":[["4c47ed5a65160149","8d36820730690d7d","87eb7ad331a15823"]]},{"id":"711c6f36547b4efb","type":"ui_slider","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"","label":"Modify MyLevel","tooltip":"","group":"b095aee62f84e514","order":3,"width":0,"height":0,"passthru":true,"outs":"all","topic":"topic","topicType":"msg","min":0,"max":"100","step":1,"className":"","x":160,"y":1420,"wires":[["cb0e16ceab421d58"]]},{"id":"cb0e16ceab421d58","type":"OpcUa-Item","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","item":"ns=6;s=MyLevel","datatype":"Double","value":"","name":"Modify MyLevel","x":420,"y":1420,"wires":[["968a8b27d03f6372"]]},{"id":"968a8b27d03f6372","type":"OpcUa-Client","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","endpoint":"53f4394dbf12c6b7","action":"write","deadbandtype":"a","deadbandvalue":1,"time":10,"timeUnit":"s","certificate":"n","localfile":"","localkeyfile":"","securitymode":"None","securitypolicy":"None","folderName4PKI":"","useTransport":false,"maxChunkCount":1,"maxMessageSize":8192,"receiveBufferSize":8192,"sendBufferSize":8192,"name":"Write MyLevel","x":680,"y":1420,"wires":[[]]},{"id":"bfb585c5777dfeca","type":"ui_text","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","group":"b095aee62f84e514","order":5,"width":0,"height":0,"name":"","label":"Latest MyLevel Event","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1180,"y":1640,"wires":[]},{"id":"4c47ed5a65160149","type":"change","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Event Text","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Message.text","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":1620,"wires":[["bfb585c5777dfeca","564212f76a83ce5e"]]},{"id":"b6d318d3372e149f","type":"ui_text","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","group":"b095aee62f84e514","order":7,"width":0,"height":0,"name":"","label":"Latest MyLevel Event Timestamp","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1220,"y":1680,"wires":[]},{"id":"8d36820730690d7d","type":"change","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Event Time","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Time","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":1680,"wires":[["b6d318d3372e149f"]]},{"id":"87eb7ad331a15823","type":"change","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Event Severity","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Severity","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":1740,"wires":[["fd228940746d2e4c"]]},{"id":"fd228940746d2e4c","type":"ui_text","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","group":"b095aee62f84e514","order":6,"width":0,"height":0,"name":"","label":"Latest MyLevel Event Severity","format":"","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1210,"y":1740,"wires":[]},{"id":"564212f76a83ce5e","type":"ui_toast","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"className":"","topic":"","name":"Event Notification","x":1170,"y":1580,"wires":[]},{"id":"6fdabcc2950ccf4e","type":"comment","z":"58c0065ebdc1d89d","g":"3e09b7a420dd81d2","name":"Store & Parse nodeId & browseName","info":"","x":810,"y":60,"wires":[]},{"id":"8f866373ed32349c","type":"comment","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Discard Empty Datasets","info":"","x":740,"y":600,"wires":[]},{"id":"35f53fe496f4f68a","type":"comment","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Parse Simulation Values","info":"","x":1030,"y":520,"wires":[]},{"id":"c9e043783aeaf0fa","type":"comment","z":"58c0065ebdc1d89d","g":"ab8e5ebe8c14819d","name":"Display on Dashboard","info":"","x":1300,"y":520,"wires":[]},{"id":"9c5762fc7fdbae59","type":"comment","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Discard Empty Datasets","info":"","x":780,"y":860,"wires":[]},{"id":"a5981d515cfadb55","type":"comment","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Parse StaticData Values","info":"","x":1030,"y":860,"wires":[]},{"id":"a736c876b46c763f","type":"comment","z":"58c0065ebdc1d89d","g":"23696c742b062ee0","name":"Display on Dashboard","info":"","x":1300,"y":860,"wires":[]},{"id":"e29a74ea9a1de0ef","type":"comment","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Parse MyDevice Values","info":"","x":1000,"y":1100,"wires":[]},{"id":"a27699b4e9697558","type":"comment","z":"58c0065ebdc1d89d","g":"38f43e1ab70fe0cf","name":"Discard Empty Datasets","info":"","x":760,"y":1120,"wires":[]},{"id":"8a06f75c33593dc1","type":"comment","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Parse Event Dataset","info":"","x":950,"y":1580,"wires":[]},{"id":"19c427f70d0ed845","type":"comment","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"Call OPC UA Item","info":"","x":430,"y":1320,"wires":[]},{"id":"01153fddbbb2cd73","type":"comment","z":"58c0065ebdc1d89d","g":"b1eeba37b0d982ef","name":"Write OPC UA Item to Client","info":"","x":700,"y":1320,"wires":[]},{"id":"6ba832b756579002","type":"comment","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Get OPC Events from Client","info":"","x":680,"y":1640,"wires":[]},{"id":"be911708a19728b0","type":"comment","z":"58c0065ebdc1d89d","g":"3013af7593f2847b","name":"Display Events on Dashboard","info":"","x":1200,"y":1540,"wires":[]},{"id":"475336420d03d64d","type":"ui_spacer","z":"58c0065ebdc1d89d","name":"spacer","group":"4340b56a2335c304","order":2,"width":4,"height":1},{"id":"b062bda097966b0d","type":"ui_spacer","z":"58c0065ebdc1d89d","name":"spacer","group":"4340b56a2335c304","order":4,"width":4,"height":1},{"id":"bca4de20b077c6a7","type":"ui_spacer","z":"58c0065ebdc1d89d","name":"spacer","group":"4340b56a2335c304","order":5,"width":3,"height":1},{"id":"943c46d47e94a1cb","type":"ui_spacer","z":"58c0065ebdc1d89d","name":"spacer","group":"4340b56a2335c304","order":7,"width":3,"height":1},{"id":"f97ba8b89dda4ec8","type":"ui_spacer","z":"58c0065ebdc1d89d","name":"spacer","group":"4340b56a2335c304","order":10,"width":4,"height":1},{"id":"751daf8eaa27f30b","type":"ui_spacer","z":"58c0065ebdc1d89d","name":"spacer","group":"4340b56a2335c304","order":11,"width":3,"height":1},{"id":"53f4394dbf12c6b7","type":"OpcUa-Endpoint","endpoint":"opc.tcp://192.168.0.141:53530/OPCUA/SimulationServer","secpol":"None","secmode":"None","none":true,"login":false,"usercert":false,"usercertificate":"","userprivatekey":""},{"id":"4340b56a2335c304","type":"ui_group","name":"Address Space Structure","tab":"0113eb87060106be","order":1,"disp":true,"width":"7","collapse":false,"className":""},{"id":"825fe3323bd36ae6","type":"ui_group","name":"Simulation Values","tab":"0113eb87060106be","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"92444e82445bab62","type":"ui_group","name":"StaticData Values","tab":"0113eb87060106be","order":3,"disp":true,"width":"6","collapse":false,"className":""},{"id":"b095aee62f84e514","type":"ui_group","name":"MyDevice Status & Control","tab":"0113eb87060106be","order":4,"disp":true,"width":"6","collapse":false,"className":""},{"id":"0113eb87060106be","type":"ui_tab","name":"OPC UA","icon":"dashboard","order":7,"disabled":false,"hidden":false}]

Written By:

Published on:

Related Articles:

Sign up for updates