node-red-contrib-iiot-opcua - Write to server

Example:

  • Server
  • Write
  • Response
[
    {
        "id": "99f50081.0b1cc",
        "type": "tab",
        "label": "IoT/IIoT OPC UA",
        "disabled": false,
        "info": ""
    },
    {
        "id": "e07b0f5c.ea11f",
        "type": "OPCUA-IIoT-Write",
        "z": "99f50081.0b1cc",
        "connector": "7730ce9c.79d11",
        "name": "",
        "showStatusActivities": false,
        "showErrors": false,
        "x": 450,
        "y": 140,
        "wires": [
            [
                "ba3af79e.ca4f08",
                "69ebb04.6ca045",
                "11b5d536.4f70ab",
                "32c60d54.000cf2"
            ]
        ]
    },
    {
        "id": "96785eb5.b01a1",
        "type": "OPCUA-IIoT-Inject",
        "z": "99f50081.0b1cc",
        "injectTypeListener": false,
        "payload": "",
        "payloadType": "num",
        "topic": "ns=4;s=TestReadWrite",
        "datatype": "Double",
        "repeat": "1",
        "crontab": "",
        "once": true,
        "startDelay": "",
        "name": "TestReadWrite",
        "x": 140,
        "y": 140,
        "wires": [
            [
                "649fc049.d246d"
            ]
        ]
    },
    {
        "id": "32c60d54.000cf2",
        "type": "debug",
        "z": "99f50081.0b1cc",
        "name": "",
        "active": false,
        "console": "false",
        "complete": "false",
        "x": 630,
        "y": 240,
        "wires": []
    },
    {
        "id": "ba3af79e.ca4f08",
        "type": "debug",
        "z": "99f50081.0b1cc",
        "name": "",
        "active": false,
        "console": "false",
        "complete": "diagnostics",
        "x": 640,
        "y": 200,
        "wires": []
    },
    {
        "id": "69ebb04.6ca045",
        "type": "debug",
        "z": "99f50081.0b1cc",
        "name": "",
        "active": false,
        "console": "false",
        "complete": "true",
        "x": 610,
        "y": 280,
        "wires": []
    },
    {
        "id": "3beabc15.f64e34",
        "type": "debug",
        "z": "99f50081.0b1cc",
        "name": "",
        "active": false,
        "console": "false",
        "complete": "true",
        "x": 450,
        "y": 200,
        "wires": []
    },
    {
        "id": "11b5d536.4f70ab",
        "type": "OPCUA-IIoT-Response",
        "z": "99f50081.0b1cc",
        "name": "",
        "x": 620,
        "y": 140,
        "wires": [
            [
                "ba3563cc.ac239"
            ]
        ]
    },
    {
        "id": "ba3563cc.ac239",
        "type": "debug",
        "z": "99f50081.0b1cc",
        "name": "",
        "active": false,
        "console": "false",
        "complete": "false",
        "x": 810,
        "y": 140,
        "wires": []
    },
    {
        "id": "b188d18.f1e423",
        "type": "OPCUA-IIoT-Server",
        "z": "99f50081.0b1cc",
        "port": "55388",
        "endpoint": "",
        "acceptExternalCommands": true,
        "maxAllowedSessionNumber": "",
        "maxConnectionsPerEndpoint": "",
        "maxAllowedSubscriptionNumber": "",
        "alternateHostname": "",
        "name": "",
        "showStatusActivities": false,
        "showErrors": false,
        "allowAnonymous": true,
        "isAuditing": false,
        "users": [
            {
                "name": "test",
                "password": "test"
            },
            {
                "name": "peter",
                "password": "peter"
            }
        ],
        "x": 270,
        "y": 60,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "649fc049.d246d",
        "type": "function",
        "z": "99f50081.0b1cc",
        "name": "Random",
        "func": "var min = 1000 * -1;\nmsg.payload = Math.random() * (80000 - min) + min;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 300,
        "y": 140,
        "wires": [
            [
                "e07b0f5c.ea11f",
                "3beabc15.f64e34"
            ]
        ]
    },
    {
        "id": "7730ce9c.79d11",
        "type": "OPCUA-IIoT-Connector",
        "z": "",
        "endpoint": "opc.tcp://localhost:55388/",
        "keepSessionAlive": false,
        "loginEnabled": true,
        "securityPolicy": "None",
        "securityMode": "NONE",
        "name": "SERVER ONE",
        "showStatusActivities": false,
        "showErrors": false
    }
]
biancode

Flow Info

created 1 month ago

Node Types

Core
  • debug (x5)
  • function (x1)
Other
  • OPCUA-IIoT-Connector (x1)
  • OPCUA-IIoT-Inject (x1)
  • OPCUA-IIoT-Response (x1)
  • OPCUA-IIoT-Server (x1)
  • OPCUA-IIoT-Write (x1)
  • tab (x1)

Tags

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