node-red-contrib-iiot-opcua - Browse and Read

Example:

  • Server
  • Brower
  • Client (read)
[
    {
        "id": "11eedb1e.d0a385",
        "type": "tab",
        "label": "IoT/IIoT OPC UA",
        "disabled": false,
        "info": ""
    },
    {
        "id": "1092c3e1.503acc",
        "type": "OPCUA-IIoT-Server",
        "z": "11eedb1e.d0a385",
        "port": "55388",
        "endpoint": "",
        "acceptExternalCommands": true,
        "maxAllowedSessionNumber": "",
        "maxConnectionsPerEndpoint": "",
        "maxAllowedSubscriptionNumber": "",
        "alternateHostname": "",
        "name": "",
        "showStatusActivities": false,
        "showErrors": false,
        "allowAnonymous": true,
        "isAuditing": false,
        "users": [],
        "x": 220,
        "y": 140,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "4a733bd1.115614",
        "type": "OPCUA-IIoT-Browser",
        "z": "11eedb1e.d0a385",
        "connector": "68f87a5b.965074",
        "nodeId": "",
        "name": "",
        "showStatusActivities": false,
        "showErrors": false,
        "x": 320,
        "y": 300,
        "wires": [
            [
                "9b308826.860cc8",
                "7bec0baa.56bef4",
                "f04770d1.e4be1",
                "706f3924.c1b928"
            ]
        ]
    },
    {
        "id": "9b308826.860cc8",
        "type": "ui_template",
        "z": "11eedb1e.d0a385",
        "group": "8a997d00.5e113",
        "name": "",
        "order": 0,
        "width": 0,
        "height": 0,
        "format": "<div layout=\"column\" layout-align=\"space-between\">\n    <div layout=\"row\" layout-align=\"space-around center\">\n        <p>{{msg.payload.endpoint}}</p>\n    </div>\n    <div layout=\"row\" layout-align=\"space-around center\">\n        <p>{{msg.payload.browseTopic}} with {{msg.payload.browserResultCount}} references</p>\n    </div>\n    <div layout=\"row\" layout-align=\"space-between center\">\n        <h1>Results</h1>\n    </div>\n    <div layout=\"row\" layout-align=\"space-between center\">\n        <select ng-model=\"item\" ng-options=\"item.displayName.text for item in msg.payload.browserItems\">\n            <option value=\"\">-- Root --</option>\n        </select>\n        <button ng-click=\"send({payload: {actiontype: 'browse', root: item}})\">Browse</button>\n    </div>\n    <div layout=\"row\" layout-align=\"space-around center\">\n        <div>\n            <ul>\n                <li ng-repeat=\"item in msg.payload.browserItems\">\n                  {{item.displayName.text}} ( {{item.nodeId}} - {{item.browseName}})\n                </li>\n            </ul>\n        </div>\n    </div>\n</div>",
        "storeOutMessages": false,
        "fwdInMessages": false,
        "x": 320,
        "y": 240,
        "wires": [
            [
                "4a733bd1.115614",
                "cc0937fe.a41c38"
            ]
        ]
    },
    {
        "id": "7bec0baa.56bef4",
        "type": "debug",
        "z": "11eedb1e.d0a385",
        "name": "",
        "active": true,
        "console": "false",
        "complete": "true",
        "x": 790,
        "y": 300,
        "wires": []
    },
    {
        "id": "aa4dba8.f1cbb48",
        "type": "OPCUA-IIoT-Inject",
        "z": "11eedb1e.d0a385",
        "payload": "",
        "payloadType": "date",
        "topic": "ns=0;i=85",
        "datatype": "NodeId",
        "repeat": "",
        "crontab": "",
        "once": true,
        "startDelay": "",
        "name": "Root",
        "x": 130,
        "y": 300,
        "wires": [
            [
                "4a733bd1.115614"
            ]
        ]
    },
    {
        "id": "f04770d1.e4be1",
        "type": "OPCUA-IIoT-Response",
        "z": "11eedb1e.d0a385",
        "name": "",
        "x": 640,
        "y": 240,
        "wires": [
            [
                "cc0937fe.a41c38"
            ]
        ]
    },
    {
        "id": "cc0937fe.a41c38",
        "type": "debug",
        "z": "11eedb1e.d0a385",
        "name": "",
        "active": false,
        "console": "false",
        "complete": "true",
        "x": 790,
        "y": 240,
        "wires": []
    },
    {
        "id": "706f3924.c1b928",
        "type": "OPCUA-IIoT-Read",
        "z": "11eedb1e.d0a385",
        "attributeId": "13",
        "maxAge": "0",
        "depth": 1,
        "connector": "68f87a5b.965074",
        "name": "",
        "justValue": true,
        "multipleRequest": true,
        "metaDataInject": false,
        "showStatusActivities": false,
        "showErrors": false,
        "x": 500,
        "y": 340,
        "wires": [
            [
                "b18209a4.7c6fa8"
            ]
        ]
    },
    {
        "id": "b18209a4.7c6fa8",
        "type": "OPCUA-IIoT-Response",
        "z": "11eedb1e.d0a385",
        "name": "",
        "x": 640,
        "y": 340,
        "wires": [
            [
                "498937b9.308938"
            ]
        ]
    },
    {
        "id": "498937b9.308938",
        "type": "debug",
        "z": "11eedb1e.d0a385",
        "name": "",
        "active": true,
        "console": "false",
        "complete": "true",
        "x": 790,
        "y": 340,
        "wires": []
    },
    {
        "id": "68f87a5b.965074",
        "type": "OPCUA-IIoT-Connector",
        "z": "",
        "endpoint": "opc.tcp://localhost:55388/",
        "keepSessionAlive": true,
        "loginEnabled": true,
        "name": "LOCAL SERVER",
        "showStatusActivities": false,
        "showErrors": false
    },
    {
        "id": "8a997d00.5e113",
        "type": "ui_group",
        "z": "",
        "name": "Default",
        "tab": "c01dccd9.0076f",
        "disp": true,
        "width": "10"
    },
    {
        "id": "c01dccd9.0076f",
        "type": "ui_tab",
        "z": "11eedb1e.d0a385",
        "name": "Node-RED OPC UA IIoT",
        "icon": "dashboard"
    }
]
biancode

Flow Info

created 1 month ago

Node Types

Core
  • debug (x3)
Other
  • OPCUA-IIoT-Browser (x1)
  • OPCUA-IIoT-Connector (x1)
  • OPCUA-IIoT-Inject (x1)
  • OPCUA-IIoT-Read (x1)
  • OPCUA-IIoT-Response (x2)
  • OPCUA-IIoT-Server (x1)
  • tab (x1)
  • ui_group (x1)
  • ui_tab (x1)
  • ui_template (x1)

Tags

  • opcua
  • opc
  • ua
  • iiot
  • iot
  • information
  • model
  • OT
  • IT
  • rami4.0
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option