Comment on page



The purpose of this plugin is to read data from OPCUA Servers.


You can run a discover without a configuration file. In this case, all the variables in the OPCUA namespace are displayed in a hierarchical tree format. If the debug is run from the command line with a debug value of -v, the actual values for all the namespace nodes will also be displayed. The returned tree will look something like this:
Name: Objects.Ardexa.SensorField_15 namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15
Name: Objects.Ardexa.SensorField_15.WGF34 namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34
Name: Objects.Ardexa.SensorField_15.WGF34.Ard125 namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125
Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Addr namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Addr
Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Rotation_Value namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Rotation_Value
Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Power namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Power
Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Alarm namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Alarm
Name: Objects.Ardexa.SensorField_15.WGF34.Ard125.Ard125.Last_10_Temps namespace_index: 2. NodeID: ns=2;s=Ardexa/SensorField_15/WGF34/Ard125.Last_10_Temps
The namespace index is an integer value to denote the enumerated namespace. It will be listed at the very top of a discovery run. It is also shown in the above listing as ns=2 or namespace_index: 2. In order to log data, there must be a config file. If a configuration file is run with discover, then only those variables in the configuration file and their values will be shown. If using a configuration file YOU MUST specify the correct namespace, since sometimes the same variables names are contained across different namespaces. ALWAYS run discover first to see which variables are available, before developing the config file. The config file defines which variables need to be collected, what names they appear as on the the Ardexa cloud, and the units and scaling. Based on the example above, the configuration file required to collect the last 5 items shown above is as follows. Note that the OPCUA Variable Name is listed as the NodeID (taken from the above listing), but prepended with the namespace index and a colon.
# Ardexa Table Name, Ardexa Source Name, Ardexa Variable Name, OPCUA Variable Name, Type, Units, Scale
data, machine1, Address, 2:Ardexa/SensorField_15/WGF34/Ard125.Addr, keyword,
data, machine1, Rotation_Value, 2:Ardexa/SensorField_15/WGF34/Ard125.Rotation_Value, integer,
data, machine1, Power, 2:Ardexa/SensorField_15/WGF34/Ard125.Power, decimal, W, 0.1
data, machine1, Alarm, 2:Ardexa/SensorField_15/WGF34/Ard125.Alarm, bool,
data, machine1, Temperature, 2:Ardexa/SensorField_15/WGF34/Ard125.Last_10_Temps array:decimal:3, C, 10
  1. 1.
    Anything that starts with # is a comment line, and will be ignored
  2. 2.
    The Type can be either: decimal, integer, bool, keyword or array
  3. 3.
    If the Type starts with array, then there must be 3 components separated by a colon :, as follows
    • The 1st item must be the word array
    • The 2nd item must be: decimal, integer, bool, keyword
    • The 3rd item must be an integer, which defines the array index to capture. Indicies start at 1
  4. 4.
    Variables are named as (example) 4:INPUT_3. The leading 4 is the namespace index. The available namespaces are displayed when running a discover.
Authentication is optional. Most OPCUA Servers do not require authentication. If using authentication, a file must be included in the auth_file area which can contain up to 2 items of information as follows:
username: {whatever}
password: {whatever}
Also, an OPCUA connection string may have a suffix associated with it. For example, the connection string may be something like: "opc.tcp://, where 52345 is the TCP port. The /opcua at the end is a suffix. Include it in the cvonfiguration if one exists, otherwise leave it blank


  • IP Address .. something like:
  • configuration File full path ... this is the config file discussed above.
  • --port This is an optional entry denoting the TCP Port of the OPCUA server. It is defaulted to 4840
  • --namespace_index. This is an optional entry only available when using discover. It is the namespace for which toi discover variables. It is defaulted to 0
  • --auth_file ... this is the authentication file discussed above.
  • --suffix. This is the suffix, if one exists, as discussed above.