node-red-contrib-opcua icon indicating copy to clipboard operation
node-red-contrib-opcua copied to clipboard

Subscribe to "events"

Open simon0168 opened this issue 1 year ago • 2 comments

Hello @mikakaraila,

I have a E77 server OPC UA and i want to retrieve a specific event, I can retrieve the event but i dont have any informations in it. In Ua Expert i can select a lot of things, for exemple 3:CycleTime or 4:InjectionUnitCycleParameters_1/4:BarrelTemperatureZoneCycleParameters_2/3:ActualTemperature

Is there a way to retrieve these events on node red?

simon0168 avatar May 05 '23 13:05 simon0168

Hi guys, don't know exactly what you are doing, but meanwhile there is support for custom events out of the box. You will automatically get all fields of the event. (it worked some time ago, did not recheck).

image

Just click custom event, and add the node-id of the event-type. For standard opc ua events i=xx is enough for real custom one you need the namespace as well. Like for example ns=2;i=55.

Koseng avatar May 05 '23 21:05 Koseng

Your source node is perhaps not correct. Normally server receives all events.

On Tue, Jun 20, 2023, 17:29 yayitazale @.***> wrote:

Hi:

Using this feature of custom like this:

[image: imagen] https://user-images.githubusercontent.com/6462849/247139766-ea6b23b2-bdaa-406b-b0de-28c8e28b92fd.png

Nodered crashes with this error on the logs:

20 Jun 14:13:28 - [red] Uncaught Exception:

20 Jun 14:13:28 - [error] TypeError: Cannot read properties of undefined (reading 'toString') at __dumpEvent (/usr/src/node-red/node_modules/node-red-contrib-opcua/opcua/102-opcuaclient.js:248:41) at /usr/src/node-red/node_modules/node-red-contrib-opcua/opcua/102-opcuaclient.js:261:7 at /usr/src/node-red/node_modules/async/dist/async.js:4016:13 at Object.process (/usr/src/node-red/node_modules/async/dist/async.js:1679:21) at /usr/src/node-red/node_modules/async/dist/async.js:1531:23 at /usr/src/node-red/node_modules/async/dist/async.js:74:45 at node:internal/process/task_queues:141:7 at AsyncResource.runInAsyncScope (node:async_hooks:203:9) at AsyncResource.runMicrotask (node:internal/process/task_queues:138:8) at runMicrotasks () 20 Jun 14:13:42 - [info]

I suspect there is something weird with this OPCUA server as I had issues to subscribe to custom events with this method https://github.com/mikakaraila/node-red-contrib-opcua/issues/373. I don't have any issues at all with another vendors machine and also it was working with the old method.

— Reply to this email directly, view it on GitHub https://github.com/mikakaraila/node-red-contrib-opcua/issues/557#issuecomment-1598905772, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHRYDGRIWJ5WUGZPQD2IIDXMGXVVANCNFSM6AAAAAAXXECC7A . You are receiving this because you were mentioned.Message ID: @.***>

mikakaraila avatar Jun 21 '23 14:06 mikakaraila