OPC UA Plugin


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


You can run a discover without a configuration file. In this case, all the variables in the OPC UA namespace are displayed in a hierarchy. The namespaces and the values for the namespace_index are also displayed. The namespace index is an integer value to denote the enumerated namespace. There must be a config file when running log. 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 duplicated across different namespaces. ALWAYS run discover first to see which variables are available, before developing the config file. A sample of the config file is provided as opcua.config. The config file defines which variables need to be collected, what names they appear on the the Ardexa cloud, units and scaling. Example file is as follows:
# Ardexa Table Name, Ardexa Source Name, Ardexa Variable Name, OPCUA Variable Name, Type, Units, Scale
data, machine1, Temperature, 1:Temperature, decimal, C, 1
data, machine1, Luminosity, 1:Brightness, decimal, %, 5
data, machine1, Value1, 1:PresetValue1, integer, , 2
data, machine1, Value2, 1:PresetValue2, keyword, ,
data, machine1, On, 1:RelaySetOn, bool, ,
data, machine1, ActualTemp, 2:HMI_PID_Temp_Data, 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.


  • 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
Copy link