README
Purpose
The purpose of this plugin is to read data from OPCUA Servers.
Usage
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:
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.
NOTES:
Anything that starts with
#
is a comment line, and will be ignoredThe
Type
can be either:decimal
,integer
,bool
,keyword
orarray
If the
Type
starts witharray
, then there must be 3 components separated by a colon:
, as followsThe 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
Variables are named as (example)
4:INPUT_3
. The leading4
is the namespace index. The available namespaces are displayed when running adiscover
.
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:
Also, an OPCUA connection string may have a suffix associated with it. For example, the connection string may be something like: "opc.tcp://192.168.1.10:52345/opcua
, 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
Arguments
IP Address
.. something like: 192.168.1.4configuration 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 to4840
--namespace_index
. This is an optional entry only available when usingdiscover
. It is the namespace for which toi discover variables. It is defaulted to0
--auth_file
... this is the authentication file discussed above.--suffix
. This is the suffix, if one exists, as discussed above.
Last updated