Description
Class name: com.ebd.hub.datawizard.util.IoTDataRetrieveJob
Configuration: Absolute or relative path to a .conf or .properties file containing the retrieval parameters.
This class retrieves data from an OPC UA server on a scheduled (cron) basis. It uses the IoTClientService (the OPC UA client service that manages server connections) to connect to server aliases defined in ./etc/iotclient.xml. The class supports reading node values and calling OPC UA methods.
The IoTClientService must be active before this class can run. See IОТ (Input Agent) for service setup and alias configuration.
Parameters
All parameters are defined in the configuration file referenced in the Configuration file field of the cron input agent. Lines starting with # are treated as comments and are ignored.
Parameter | Required | Description |
|---|---|---|
| yes | Name of the OPC UA server alias. Must match an alias defined in |
| no | Character encoding for the output data. Example: |
| no | OPC UA node ID to read. |
| no | If |
| no | If |
| no | Custom label used as the section header in the output. Defaults to |
| no | OPC UA node ID of a method to call. |
| no | If |
| no | Parent node ID for the method. Specify it only when the method requires a parent node context. |
| no | Input parameter for the method call. Repeat this key once per parameter; order matters. Values can be numeric or string. Example: |
Examples
Client data retrieval with method call
This example reads a node tree from a local OPC UA server and calls a profile method with seven parameters. The alias localserver must be defined in ./etc/iotclient.xml.
alias = localserver
charset = UTF8
readident.nodefields = ns=2;s=85/LDI/DataDBInfo
readident.nodefields.addHeaderComment = true
readident.nodefields.recursive = true
methodcall.profilecall = ns=2;s=85/LDI/LDCPs/profile_32a706d9:17434cdcb55:-3f00.57c377bb4259e254:32a706d9:17434cd0b19:-8000/call
methodcall.profilecall.addHeaderComment = true
methodcall.profilecall.param = 1
methodcall.profilecall.param = 2
methodcall.profilecall.param = 3
methodcall.profilecall.param = 4
methodcall.profilecall.param = text1
methodcall.profilecall.param = text2
methodcall.profilecall.param = text3
readident.serverversion = ns=0;i=2264
readident.serverversion.addHeaderComment = trueBoiler data retrieval
This example reads two node trees from an OPC UA boiler simulator server. The commented-out entries show how to add a method call and additional read operations after a simulated start.
alias = boiler
readident.scalars = ns=2;i=10159
readident.scalars.addHeaderComment = true
readident.scalars.recursive = true
readident.boiler1beforestart = ns=4;i=1241
readident.boiler1beforestart.addHeaderComment = true
readident.boiler1beforestart.outputident = Boiler 1 Before Start
readident.boiler1beforestart.recursive = true
#methodcall.startsimulation = ns=4;i=1343
#methodcall.startsimulation.parent = ns=4;i=1287
#
#readident.boiler1afterstart = ns=4;i=1241
#readident.boiler1afterstart.addHeaderComment = true
#readident.boiler1afterstart.outputident = Boiler 1 After Start
#readident.boiler1afterstart.recursive = true
#
#readident.serverversion = ns=0;i=2264
#
#methodcall.stopsimulation = ns=4;i=1346
#methodcall.stopsimulation.parent = ns=4;i=1287Registration
Add the class to custom_own_classes.properties in IS/etc/admin/datawizard/:
com.ebd.hub.datawizard.util.IoTDataRetrieveJobSee also
IОТ (Input Agent): IoTClientService setup, alias configuration, and
iotclient.xmlreferenceCustom class (cron input agent): general information on time-driven custom classes and the configuration file field