Documentation Index

Fetch the complete documentation index at: https://docs.lobster-world.com/llms.txt

Use this file to discover all available pages before exploring further.

IoTDataRetrieveJob

Prev Next

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

alias

yes

Name of the OPC UA server alias. Must match an alias defined in iotclient.xml.

charset

no

Character encoding for the output data. Example: UTF8.

readident.<name>

no

OPC UA node ID to read. <name> is a freely chosen label for this read operation. Example: readident.nodefields = ns=2;s=85/LDI/DataDBInfo.

readident.<name>.addHeaderComment

no

If true, a header comment is added to the output section for this read operation. Default: false.

readident.<name>.recursive

no

If true, child nodes of the specified node are also read. Default: false.

readident.<name>.outputident

no

Custom label used as the section header in the output. Defaults to <name>.

methodcall.<name>

no

OPC UA node ID of a method to call. <name> is a freely chosen label for this method call.

methodcall.<name>.addHeaderComment

no

If true, a header comment is added to the output section for this method call. Default: false.

methodcall.<name>.parent

no

Parent node ID for the method. Specify it only when the method requires a parent node context.

methodcall.<name>.param

no

Input parameter for the method call. Repeat this key once per parameter; order matters. Values can be numeric or string. Example: methodcall.profilecall.param = value1 followed by methodcall.profilecall.param = value2. See the code examples below.

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 = true

Boiler 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=1287

Registration

Add the class to custom_own_classes.properties in IS/etc/admin/datawizard/:

com.ebd.hub.datawizard.util.IoTDataRetrieveJob

See also