Replies: 8 comments 25 replies
-
opcua-asyncio/asyncua/common/subscription.py Line 189 in 51fb682 is "4:Application" really the emitting node or is it "Server" ? |
Beta Was this translation helpful? Give feedback.
-
please post the references of "server", "4:CODESYS Control Win V3 x64" and "4:Application" ther must be a reference which says "GeneratesEvents" or "HasCondition"!? |
Beta Was this translation helpful? Give feedback.
-
Using QuickOPC I can subscribe to events. def subscribe_to_events():
endpoint_descriptor = UAEndpointDescriptor("opc.tcp://L042IEAMO2:4840")
# Instantiate the client object and hook events
client = EasyUAClient()
client.EventNotification += print
# client.SubscribeEvent(endpoint_descriptor, AddressSpace.Standard.UAObjectIds.Server, 1000)
IEasyUAClientExtension.SubscribeEvent(
client,
endpoint_descriptor,
UANodeDescriptor(AddressSpace.Standard.UAObjectIds.Server),
1_000,
)
Threading.Thread.Sleep(30 * 1000)
So what is the difference between |
Beta Was this translation helpful? Give feedback.
-
class SimpleAttributeOperand(FrozenClass):
def __init__(self):
self.TypeDefinitionId = NodeId(2041) # Using this NodeId it works, but why?! Previously it was Is it a bug? |
Beta Was this translation helpful? Give feedback.
-
I am at the latest master commit The problem that Or am I wrong? |
Beta Was this translation helpful? Give feedback.
-
i am on 0.9.14 and i tested it against the prosys simserver: |
Beta Was this translation helpful? Give feedback.
-
@AndreasHeine I really appreciate your help! I recreated the import asyncio
from asyncua import Client
class Handler:
def event_notification(self, event) -> None:
print(f"{event=}")
async def async_main():
client = Client("opc.tcp://L042IEAMO2:4840")
async with client:
ev_src = client.get_node("ns=4;s=|var|CODESYS Control Win V3 x64.Application")
ev_type_node = client.get_node("ns=0;i=2782")
handler = Handler()
sub = await client.create_subscription(500, handler)
await sub.subscribe_events(ev_src, ev_type_node)
await asyncio.sleep(60)
if __name__ == "__main__":
asyncio.run(async_main()) I could narrow this issue down to the following facts (please see the screenshot).
I don't know why but Codesys OPC UA server does require the proper In the documentation it is written that
which implies me that it really should be After monkey patching
|
Beta Was this translation helpful? Give feedback.
-
Folks, FYI a recent issue I faced with a TwinCAT server is similar to the problem described here: #1205 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
First of all thanks for your effort putting into this precious project.
I am using Codesys runtime which provides OPC UA Server interface.
It works fine with
opcua-asyncio
, I have been usingsubscribe_data_change
in production for almost half a year without any issue.Now, I would like to do the same for events with
subscribe_events
.I created the wanted OPC UA events based on this guide and I can see those ones using UaExpert but cannot using the below snippet.
On the below image I marked red the events I would like to subscribe to.

What I am doing wrong?
I would appreciate your help.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions