Skip to content

OPC-UA Device Service

The Open Platform Communications - Unified Architecture (OPC-UA) Device Service provides a means of integrating OPC-UA devices with Edge Xpert. For further information about OPC-UA, refer to the OPC Foundation's website.

The Edge Xpert OPC-UA Device Service is based on open62541, a well-known open-source implementation of the IEC-62541 OPC-UA standard.

Key Features

The OPC-UA Device Service supports the following key features:

  • Secure and insecure connections to a remote OPC-UA Server
  • Reading and writing OPC-UA nodes
  • Monitored Item Service for monitoring Data Change Items and Event Items
  • Browse Service
  • Discovery of OPC-UA endpoints


OPC-UA subscriptions allow the monitoring of nodes in a remote server.

Each connection sets up a distinct Subscription Item, which can contain one or more Monitored Items. When a Monitored Item changes on the server, the server is responsible for notifying subscribed Device Services of the change. When the OPC-UA Device Service is notified of a change, it returns the new value for the Monitored Item in a POST command to Edge Xpert.

To set a device resource as a Monitored Item, set the monitored attribute to True, as described above in OPC-UA Attributes. For further information on Monitored Items, see Add Monitored Items.

Supported Data Types

The following table lists the OPC-UA data types and their equivalent Edge Xpert data types.

OPC-UA Data Type Edge Xpert Data Type
UA_Boolean Bool
UA_Byte UInt8
UA_DateTime Int64
UA_Double Float64
UA_Float Float32
UA_Int8 Int8
UA_Int16 Int16
UA_Int32 Int32
UA_Int64 Int64
UA_String String
UA_UInt16 UInt16
UA_UInt32 UInt32
UA_UInt64 UA_UInt64

OPC-UA Device Profile

The device profile defines what resources are available on a particular device. The following profile attributes can be defined in the YAML file:

Attribute Description
nodeID The identifier of the node in the OPC-UA server
nsIndex The Namespace Index of the node in the OPC-UA server
browsePath The name of a child node qualified with a namespace URI
IDType The data type used for the nodeID attribute
monitored Allows the monitoring of defined nodes in a remote server using OPC-UA subscriptions

This must be set to "true" for subscriptions to be established
publishInterval Applies only when monitored is set to True

The value in milliseconds of the publishing interval requested when creating a new subscription ID

An example device resource can be seen below. This defines a monitored node that is identified through the use of a node ID, namespace index, and ID type.

 - description: A Simulated Counter
   name: Counter1
   isHidden: false
     valueType: Uint32
     readWrite: R
     units: String
     defaultValue: "0"
     IDType: "NUMERIC"
     monitored: "True"
     nodeID: "1001"
     nsIndex: "3"
For information on adding devices with the browsePath attribute instead of nodeID, see OPC-UA Browse Service.

Using the OPC-UA Device Service

For information on using the OPC-UA device service, see OPC-UA General Example and OPC-UA Security Example.

Back to top