How-To Guides
DeviceHub Guides

Use the OPC UA Client Advanced driver for OPC UA Alarms & Events

10min
note this feature is available from litmus edge 3 16 2 release you can use the opc ua client advanced driver in litmus edge to browse, integrate, and manage opc ua alarms & events (a\&e) these events are imported as tags within your device configuration and can be customized to include specific event properties this includes attributes such as eventtype , message , severity , receivetime , eventid , sourcename , sourcenode , and more before you start make sure you meet the following prerequisites before configuring your device a stable network connection between your litmus edge device and the opc ua server to send alarms and events data your opc ua login details, including authentication tokens or certificates use the opc ua client advanced for opc ua alarms & events follow the steps below to add an opc ua client advanced device, browse event tags, and view the event data using the analytics datahub subscribe function node step 1 add opc ua client advanced device to devicehub in litmus edge, navigate to devicehub > devices click the connect a device box the connect device dialog box appears in the driver name drop down list, select opc ua > opc ua client advanced configure the parameters for the device see connect a device docid\ ish7bqhzxswtdx8vbnszb and opc ua docid zxylrxf7 fyfuxf4h x6 or opc ua client advanced docid 6b8e6zxjpadp0mopxqiqu to learn more step 2 set up the opc ua client advanced browse tags in devicehub , click on the opc ua client advanced device you just added navigate to tags section and click the add tag (+) icon select browse tags to open the browse parameters dialog box choose between two options for browse mode data access for accessing real time data variables events to monitor alarms and conditions for this guide, select events click apply parameters to open the opc ua server’s tag tree for exploration expand the tag tree to find the events you want to track (e g , alarms & conditions ) select the desired alarms/events from the tree structure and click add to include them as tags important note understanding the significance of the namespace index values linked to event properties is crucial when adding an opc ua a\&e tag in litmus edge the namespace index is mandatory for the unique identification of the event property within the opc ua server's address space every opc ua event property is distinctly identified by both its name and namespace index finding the namespace index to determine the correct namespace index for a specific event property beyond the default set, you may need to use an opc ua client tool, such as uaexpert , to inspect the details of the events available from your opc ua server these tools typically display the namespace index associated with each property when you select an opc ua a\&e tag, a standard set of event properties (such as eventid , eventtype , sourcenode , sourcename , and time ) will be added by default to the tag configuration these are defined by the opc ua a\&e specification namespace index ordering behavior for non nested opc ua event properties, the order of namespace index values does not affect litmus edge's responses see manage tags docid 19fclype fbpdvcxxwrb4 for more details step 3 modify event properties in edit tag dialog box to add or customize event properties beyond this default set, click the add item button within the edit tag dialog box this will allow you to enter the namespace index and the event property name of the additional property you wish to include in the tag's payload key points enter the correct namespace index value obtained from your opc ua server information (potentially via a tool like uaexpert ), and the precise name of the event property incorrect values will lead to incorrect or missing data the opc ua a\&e model defines a hierarchy of event types and their properties litmus edge offers a standard set of commonly used properties, but not all opc ua specification or custom extension event properties are shown in the edit tag view initially this design prioritizes relevant information however, using the add item function and specifying the namespace index and event property name allows you to access and include additional properties in your data while adding the nested event properties, the ascending namespace index ordering is important as an incorrect sequence may lead to unresolved or missing nested data to add a custom event property to add a custom event property which, upon inspection in your opc ua client tool, has a namespace index of 1 in the edit tag dialog box, click the add item button in the namespace index field, enter 1 in the event property name field, enter a suitable name click update tag to save your changes step 4 enable the connector after adding the connector, click the start icon in the connector tile to enable it if you see a failed status, you can review the manage connectors docid 3u7jzldinehy8shvifd d and relevant error messages step 4 copy the raw topic click the opc ua client advanced connector tile navigate to tags section and click the opc ua device in the side menu find the raw topic field in the tag details and click the copy button to copy the topic save this topic somewhere safe you'll need it to configure the analytics node later step 5 use analytics to verify the data transfer in litmus edge, navigate to analytics on the analytics canvas, click add processor the create a processor dialog box displays select datahub subscribe in the topic field, paste the raw topic you copied earlier from step 4 click save on the analytics canvas, click save the configured analytics flows should look like the following click the view icon in the datahub subscribe processor to view the event data monitor the real time event data published to the litmus edge message broker, which includes key value fields such as eventid , eventtype , message , receivetime , and severity