Subscribing to OPC UA Events

Hello,

I am using Node-RED 3.0.2 with node-red-contrib-opcua 0.2.292.
I want to subscribe to events but I get no data and also no error.
Subscribing/reading normal nodes (ExtensionObjects) works fine.
If I subscribe to Events with uaExpert, I get the desired data:

This is my flow:

    {
        "id": "ad464b54af5eb688",
        "type": "OpcUa-Event",
        "z": "3f73c5999eb84da2",
        "root": "i=2253",
        "activatecustomevent": false,
        "eventtype": "i=2041",
        "customeventtype": "ns=17;i=88",
        "name": "",
        "x": 380,
        "y": 2400,
        "wires": [
            [
                "f6954615cac75d82"
            ]
        ]
    },
    {
        "id": "cfe183dcfdf23d4d",
        "type": "inject",
        "z": "3f73c5999eb84da2",
        "name": "",
        "props": [],
        "repeat": "",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "x": 190,
        "y": 2400,
        "wires": [
            [
                "ad464b54af5eb688"
            ]
        ]
    },
    {
        "id": "f6954615cac75d82",
        "type": "OpcUa-Client",
        "z": "3f73c5999eb84da2",
        "endpoint": "074b43a250e83847",
        "action": "events",
        "deadbandtype": "a",
        "deadbandvalue": 1,
        "time": "100",
        "timeUnit": "ms",
        "certificate": "n",
        "localfile": "",
        "localkeyfile": "",
        "securitymode": "None",
        "securitypolicy": "None",
        "folderName4PKI": "",
        "name": "OPC UA Client machine 11 S4 Events",
        "x": 630,
        "y": 2400,
        "wires": [
            [
                "f0a7bdfcba5aa42d"
            ]
        ]
    },
    {
        "id": "074b43a250e83847",
        "type": "OpcUa-Endpoint",
        "endpoint": "opc.tcp://10.10.151.71:62590",
        "secpol": "None",
        "secmode": "None",
        "none": false,
        "login": true,
        "usercert": false,
        "usercertificate": "",
        "userprivatekey": ""
    }
]

In both I used the Server Node and with the BaseEvent I should get all Events, like I get with uaExpert and checking all Types, right?

Did I make a mistake or is something missing?

Thanks!

Have you checked custom event type name space index? It seems to be quite big 17.
Is your server loading so many nodesets or creates new name spaces...???

"activatecustomevent": false, THIS SHOULD BE true!!
"eventtype": "i=2041",
"customeventtype": "ns=17;i=88",

Yes this is correct, it is copied from uaExpert. I don't know why it is this big. The OPC UA Server is provided by the manufacturer and I don't have any insights.

activatecustomevent was false because used the baseEventType at the time, maybe the customeventtype was still in there from previous setting.

I wanted to answer here that it works now but I couldn't this week.
So after using the correct customeventtype and a restart from the server everything works now. Even the eventdata is fetched correctly.

1 Like

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