Add value from api to opc server

Hi

how to move the value from api to opc server

the opc server is working and i can get the value from API
but how do i make the connection between?
i have tryed with the set count msg.payload.variableValue but is has to be a fixed value i manually
have to edit

my end task is to have multible values from api send to the opc server

[
    {
        "id": "11a578056fc3d56a",
        "type": "tab",
        "label": "value from Api ",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "8a4b4e742a3916ec",
        "type": "OpcUa-Server",
        "z": "11a578056fc3d56a",
        "port": "53881",
        "name": "",
        "endpoint": "",
        "users": "",
        "nodesetDir": "",
        "folderName4PKI": "",
        "autoAcceptUnknownCertificate": true,
        "registerToDiscovery": false,
        "constructDefaultAddressSpace": false,
        "allowAnonymous": true,
        "endpointNone": true,
        "endpointSign": true,
        "endpointSignEncrypt": true,
        "endpointBasic128Rsa15": true,
        "endpointBasic256": true,
        "endpointBasic256Sha256": true,
        "maxNodesPerBrowse": 0,
        "maxNodesPerHistoryReadData": 0,
        "maxNodesPerHistoryReadEvents": 0,
        "maxNodesPerHistoryUpdateData": 0,
        "maxNodesPerRead": 0,
        "maxNodesPerWrite": 0,
        "maxNodesPerMethodCall": 0,
        "maxNodesPerRegisterNodes": 0,
        "maxNodesPerNodeManagement": 0,
        "maxMonitoredItemsPerCall": 0,
        "maxNodesPerHistoryUpdateEvents": 0,
        "maxNodesPerTranslateBrowsePathsToNodeIds": 0,
        "maxConnectionsPerEndpoint": "",
        "maxMessageSize": "",
        "maxBufferSize": "",
        "x": 940,
        "y": 140,
        "wires": [
            [
                "24ece21aaa3a8d8a"
            ]
        ]
    },
    {
        "id": "24ece21aaa3a8d8a",
        "type": "debug",
        "z": "11a578056fc3d56a",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1150,
        "y": 140,
        "wires": []
    },
    {
        "id": "a16a28b2a3cb0758",
        "type": "comment",
        "z": "11a578056fc3d56a",
        "name": "Description",
        "info": "This flow shows how to change server value\nwithout a client.",
        "x": 920,
        "y": 100,
        "wires": []
    },
    {
        "id": "5b47ecfce0d5dc07",
        "type": "inject",
        "z": "11a578056fc3d56a",
        "name": "add count (Float)",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "ns=1;s=count_pcs;datatype=Float",
        "payload": "{\"opcuaCommand\": \"addVariable\"}",
        "payloadType": "json",
        "x": 640,
        "y": 120,
        "wires": [
            [
                "8a4b4e742a3916ec"
            ]
        ]
    },
    {
        "id": "7ba35f5f8881938d",
        "type": "inject",
        "z": "11a578056fc3d56a",
        "name": "Set count",
        "props": [
            {
                "p": "payload.messageType",
                "v": "Variable",
                "vt": "str"
            },
            {
                "p": "payload.variableName",
                "v": "count_pcs",
                "vt": "str"
            },
            {
                "p": "payload.datatype",
                "v": "Float",
                "vt": "str"
            },
            {
                "p": "payload.namespace",
                "v": "1",
                "vt": "str"
            },
            {
                "p": "payload.variableValue",
                "v": "payload.count",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "x": 660,
        "y": 160,
        "wires": [
            [
                "8a4b4e742a3916ec"
            ]
        ]
    },
    {
        "id": "ca1e3d0303a046c6",
        "type": "http request",
        "z": "11a578056fc3d56a",
        "name": "",
        "method": "GET",
        "ret": "obj",
        "paytoqs": "ignore",
        "url": "https://api.agify.io?name=meelad",
        "tls": "",
        "persist": false,
        "proxy": "",
        "insecureHTTPParser": false,
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 390,
        "y": 260,
        "wires": [
            [
                "5c03e0c170b13a3d"
            ]
        ]
    },
    {
        "id": "cfd3dab651156b95",
        "type": "inject",
        "z": "11a578056fc3d56a",
        "name": "4min",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 210,
        "y": 260,
        "wires": [
            [
                "ca1e3d0303a046c6"
            ]
        ]
    },
    {
        "id": "5c03e0c170b13a3d",
        "type": "debug",
        "z": "11a578056fc3d56a",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 560,
        "y": 260,
        "wires": []
    }
]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.