IOT (Input Agent)

This Input Agent allows communication via OPC/UA.

Activating services


The first thing to do is to activate the corresponding services.

Enter the following sections in configuration file ./etc/factory.xml.


...
 
<Call name="addService">
<Arg>com.ebd.hub.services.iot.IoTServerService</Arg>
<Arg>etc/iotserver.xml</Arg>
</Call>
 
<Call name="addService">
<Arg>com.ebd.hub.services.iot.IoTClientService</Arg>
<Arg>etc/iotclient.xml</Arg>
</Call>
 
...

Subscription model


Lobster Integration acts as an IoT client.

Creating configuration file


Create the following configuration file ./etc/iotclient.xml. Note: See also section IOT clients (Administration).


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Lobster//DTD Configure 1.0//EN" "http://www.lobster.de/dtd/configure_1_1.dtd">
 
<Configure class="com.ebd.hub.services.iot.IoTClientService">
<Set name="verbose">false</Set>
 
<Call name="addAlias">
<Arg>
<New class="com.ebd.hub.services.iot.opcua.OpcUaClientSettings">
<Set name="alias">boiler</Set>
<Set name="endpointURL">opc.tcp://opcua.demo-this.com:51210/UA/SampleServer</Set>
<Set name="minSize">4</Set>
<Set name="maxSize">4</Set>
<Set name="allowGrowing">true</Set>
 
<!--
<Set name="username">some_user</Set>
<Set name="password">some_password</Set>
-->
<!-- <Set name="opcSecurityPolicy">None</Set> -->
<!-- securityPolicy possible values:
None
Basic128Rsa15
Basic256
Basic256Sha256
Aes128_Sha256_RsaOaep
Aes256_Sha256_RsaPss
-->
<!-- <Set name="certificateSearchTerm">*CertificateName*</Set> -->
 
</New>
</Arg>
</Call>
</Configure>

GUI


images/download/attachments/137298967/1214-version-1-modificationdate-1681964067589-api-v2.png images/download/attachments/137298967/1215-version-1-modificationdate-1681964067582-api-v2.png


(1) The connection alias. Note: At least one alias must be created for the subscription model to be selectable. See configuration file above.

(2) Subcription Values can be selected in an OpcUa browser via the context menu. If one of these values changes, the profile is triggered, see also (4). The Read Values (3) are then also queried.

(3) Read Values can be selected in an OpcUa browser via the context menu menu. Note: You can also manually insert entries via the context menu and structure them hierarchically. The Read Values can then be moved there via drag and drop. See also (7).

(4) With DataChange, changing values triggers the profile. With Direct, the values are actively queried at regular intervals.

(5) Each received record has a status. If this checkbox is set, the status bad is ignored. If the checkbox is not set, the profile will abort with an error in this case.

(6) If the checkbox is set, all values are queried once when the profile is activated.

(7) Creates a suitable source structure for phase 3.

Client security


For simple access protection you can use the username and password parameters (see above).

If an encryption/certificate is to be used for the connection, please use the opcSecurityPolicy parameter.

The Common Name of the certificate is to be set in parameter certificateSearchTerm.

Server model


Lobster Integration acts as an IoT server.

Creating configuration file


Create the following configuration file ./etc/iotserver.xml.

The OPC/UA server can be accessed under opc.tcp://<URL/IP Integration Server>:4840/opcua_server. The port can be adjusted (see below).


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Lobster//DTD Configure 1.0//EN" "http://www.lobster.de/dtd/configure_1_1.dtd">
 
<Configure class="com.ebd.hub.services.iot.IoTServerService">
<Set name="verbose">False</Set>
<Call name="addDevice">
<Arg>
<New class="com.ebd.hub.datawizard.iot.IoTDashboardDevice"/>
</Arg>
</Call>
<Call name="addServer">
<Arg>
<New class="com.ebd.hub.services.iot.opcua.IoTOpcUAServer">
<!--Set name="tlsSubjectName">*IoT Testserver*</Set-->
<!--Set name="anonymousLoginAllowed">false</Set-->
<!--Only necessary if port needs to be adjusted - Default port is 4840-->
<!--Set name="listenPort">Port</Set-->
            </New>
</Arg>
</Call>
</Configure>

GUI


images/download/attachments/137298967/530-version-1-modificationdate-1681964067593-api-v2.png


(1) If the checkbox is set, a simple response (for an ok or a fail) is sent to the client after the profile has finished. If it is not set, a response with dynamic return values can be created via the target structure. For this purpose, all fields under the root-level node IOT_Result become part of the response.

(2) Selection of partner.

(3) At least one channel must be selected.

Server security


If the endpoint is to be protected via Basic Authentication, parameter anonymousLoginAllowed (see above) must be set to false.

In addition, an IoT channel must then be used in the Input Agent of the profile. The Partner ID and the Partner password must be entered in tab Partner ID of the channel.