FreeOpcUa / python-opcua

LGPL Pure Python OPC-UA Client and Server
http://freeopcua.github.io/
GNU Lesser General Public License v3.0
1.36k stars 658 forks source link

set moniteringmode failed #647

Open chamanth opened 6 years ago

chamanth commented 6 years ago

hi ppl !! how to allow the client to control the monitoring of attributes , when i try to disable it , it comes back to reporting in UA expert. please let me know how to give access , is it through "create_monitered_items" , since iam new to this platform ,help in code that needs to be written would be appreciated.

screen

oroulet commented 6 years ago

This is probably not implemented in our server yet

chamanth commented 6 years ago

ok ! so what is "create_monitored_items(monitored_items)" mentioned in the documentation. if u do not mind would let me know how do use this defintion for our example if is someway related to the what i asked .

thanks in advance!!

chamanth commented 6 years ago

@zerox1212 @oroulet

Opc.Ua.ServiceResultException: BadNotImplemented bei Opc.Ua.ClientBase.ValidateResponse(ResponseHeader header) bei Opc.Ua.SessionClient.SetMonitoringMode(RequestHeader requestHeader, UInt32 subscriptionId, MonitoringMode monitoringMode, UInt32Collection monitoredItemIds, StatusCodeCollection& results, DiagnosticInfoCollection& diagnosticInfos) bei Opc.Ua.Client.Subscription.SetMonitoringMode(MonitoringMode monitoringMode, IList1 monitoredItems) bei Resources.UASubscription.EnableItems(List1 items, Boolean enable)

i get the following errors while implementing in opc expert

chamanth commented 6 years ago

@oroulet @zerox1212 we are struck in this phase of the project. please help us . without that correcting this, server aggregation is not being possible in opc expert. opcexpert error

oroulet commented 6 years ago

I haven't looked in detailled but most probably disabling reporting for subscriptions is not implemented, so you need to go through the subscription code and add support for it. Probably not very complicated but you need to know well python and read(and understand) the OPC UA spec

zerox1212 commented 6 years ago

Sorry I don't have time to look at implementing this. The best way to get help is to try yourself and make a "work in progress" pull request so we can review it.