python-opcua icon indicating copy to clipboard operation
python-opcua copied to clipboard

subscribe_events error: BadMonitoredItemFilterInvalid

Open XieYiC opened this issue 8 years ago • 1 comments

hi,: I try to subscribe events from opc ua server, and get the following error message: " The monitored item filter parameter is not valid.(BadMonitoredItemFilterInvalid). " and my client could not recieve any event from server.
I would be glad, if someone could take the time to give me a short explanation of that.

Example code:

if name == "main": logging.basicConfig(level=logging.WARN) logger = logging.getLogger("KeepAlive") logger.setLevel(logging.DEBUG) client = Client("opc.tcp://localhost:8082/test1/server/") # client = Client("opc.tcp://admin@localhost:4840/freeopcua/server/") #connect using a user try: client.connect() handler = SubHandler() myvar = client.get_node("ns=1;s=t|opc_ua_3") myvar1 = client.get_node("ns=1;s=t|opc_ua_2") sub = client.create_subscription(0, handler) handle = sub.subscribe_data_change([myvar, myvar1]) time.sleep(1) sub.subscribe_events() except Exception as e: print e

XieYiC avatar Jan 18 '18 03:01 XieYiC

Hi, I have the same problem, do you find a solution for your problem?

ts4iot avatar Dec 22 '22 09:12 ts4iot