<< Click to Display Table of Contents >> Driver's Configuration Parameters |
This Driver's [P] configuration parameters are not used. All settings are performed on the configuration window, shown on the next figure.
General tab
The available options on the General tab are described on the next table.
Available options on the General tab
Option |
Description |
---|---|
Version |
Protocol version. Available options are 3.1, 3.1.1, or 5 |
Client ID |
Name used by this client as an identifier for all other clients. There must not be another client connected to the same Broker with that name |
User |
Name of a user used in connection messages (ConnAck), if needed and allowed by a Broker |
Password |
Password used together with the user name |
Read QoS |
Indicates the QoS (Quality of Service) code used to request Tag subscriptions. Possible values are 0: No Confirm, 1: Confirm, or 2: Handshake. A Broker compares the requested QoS code with the QoS code originally published, then sending at least a compatible data |
KeepAlive (s) |
Time, in seconds, that a client sends a ping message in MQTT protocol (PingReq) to check whether a connection with a Broker is still active. The default value of this option is 5 (five) seconds |
Receive Max |
Available only in version 5 of MQTT protocol, defines how many QoS 1 (one) or 2 (two) messages can be received from a Broker simultaneously before being acknowledged |
Max Packet Size |
Available only in version 5 of MQTT protocol, defines the maximum size, in bytes, for MQTT packets |
Use Topic Alias |
Available only in version 5 of MQTT protocol. When selecting this option, a numeric identifier is used internally to replace a long topic, thus reducing the size of packets |
Topic Alias Max |
Available when the Use Topic Alias option is selected. Limits how many topics can be replaced by numeric identifiers during communication |
Use Session Control |
Informs whether this Driver must keep the status of the active session, that is, if a disconnection occurs and then a connection occurs, the QoS 1 (one) and 2 (two) messages sent by other clients can be recovered |
Session Expiry Interval |
Available only in version 5 of MQTT protocol, defines the time, in seconds, that a session remains stored on a Broker after disconnection |
Resend Unanswered Subscriptions Timeout (s) |
Informs the number of seconds to resend a subscription of an item if it did not receive the first value during the informed period |
Max Simultaneous Subscription Requests |
Maximum number of item subscription requests to be sent at each message |
Error on Tags Response Mismatch |
Informs whether this Driver must return an error for Tags whose message does not match the configured Template |
Use Mosquitto Dynamic Security Integration |
Enables integration of control or configuration of Mosquitto permissions, by using pre-defined MQTT messages, triggered by Tags |
Use Elipse Agent Integration |
Enables integration with Elipse Agent, a diagnostics tool for computers with Windows |
Last Will Read Config |
Open the Last Will Read Config window, shown on the next figure, to configure the Last Will message received by this Driver |
Window Last Will Read Config
Available options on the Last Will Read Config window
Option |
Description |
---|---|
Use Last Will Msg for Quality Hierarchy |
When selecting this option, all other settings on this page are enabled for editing, except the Echo ignore duration (seconds) option. If this Driver receives the message configured in the Last Will Message option on a topic that matches the one defined in the Last Will Topic Template option, all topics that match the value configured in the Associated Topics Template option are marked with a bad quality 20, 24, or 28 (invalid) |
Last Will Topic Template |
MQTT topic Template for the Last Will message |
Last Will Message |
Last Will message, such as "Goodbye" |
Template of MQTT topics associated to the Last Will message, that is, the topics that are marked with a bad quality |
|
Ignore echo as valid response |
When selecting this option, the Echo ignore duration (seconds) option is enabled for editing |
Echo ignore duration (seconds) |
This option defines a period, in seconds, during which a message received on a topic is considered an echo sent by a Broker when this Driver publishes to that topic. Thus, this message is disregarded as a valid communication, and the topics corresponding to the value of the Associated Topics Template option are not marked with a good quality (192) |
MQTT topic Templates obey the next specifications:
•They can include fixed fields with predefined names
•The + (plus sign) character is used as a wildcard to represent any topic at a specific level
•Variable fields used for checking or differentiating between Last Will messages
•The # (number sign) character is used as a wildcard for multiple levels, used exclusively at the end of a topic
These specifications comply with the MQTT standard, except for variable fields, which follow the <VARIABLE_NAME> format.
For example, consider a topic structure following the pattern city, city code, device, device identifier and, later, the corresponding parameters, such as "city/003/device/147/...".
To configure the Last Will Topic Template option, users can use the format "city/<CITY_ID>/device/<DEVICE_ID>/lastwill". For the Associated Topic Template option, on the other hand, users can use the format "city/<CITY_ID>/device/<DEVICE_ID>/#".
Thus, when a Last Will message is received, all Tags following the format with the same <CITY_ID> and <DEVICE_ID> from the received Last Will message are marked with a bad quality. If there are other fields in the topic that vary and are not fixed Strings, such as city or device, nor repeated in the associated topics, such as <CITY_ID> and <DEVICE_ID>, the + (plus sign) character can be used. For example, if the associated topics follow the pattern "<APPLICATION_NAME>/<CITY_ID>/<DEVICE_ID>", the Associated Topic Template option can be configured as "+/<CITY_ID>/<DEVICE_ID>/#".
This demonstrates the system's flexibility, allowing to configure how the Last Will message affects Tags and enabling a distinction between different Last Will messages. It is essential that the Templates are followed and that all variable fields, defined in the format <VARIABLE_NAME> in the Last Will Topic Template option, are found with the same values in the Associated Topic Template option.
For these Tags to return to a good quality, the value 192, the corresponding topic must receive a message with a value different from the one configured in the Last Will Message option. However, if the Tag's Item parameter starts with the ! (exclamation point) character, that Tag does not have its quality marked as bad upon receiving the Last Will message, nor returns to a good quality upon receiving a new value.
Publish tab
The available options on the Publish tab are described on the next table.
Available options on the Publish tab
Option |
Description |
---|---|
QoS |
Indicates the service level of messages published by this Driver. The available options are QoS 0: There is almost always a deliver (there may have zero or more deliveries), QoS 1: At least one or more deliveries, or QoS 2: Exactly one deliver |
Deadband % |
Value for the relative dead band applied when writing a numeric value to any Tag without Templates |
Retain messages on Server |
Selecting this option instructs a Broker to keep this client's messages together with their QoS, so that clients subscribing in the future can receive accumulated messages. When a new client subscribes, the last message of each topic, if available, must be sent to that client by the Broker |
Publish Texts in UTF-8 |
Informs if Text-type Tags must have their values converted to the UTF-8 format before writing them. This avoids a wrong interpretation of messages with special characters by other clients |
Enable Last Will |
When enabling this option, the server must keep in memory a topic and a message for the client, which are sent to all other clients when there is an unordered disconnection, that is, without sending a Disconnect message |
Topic |
Topic or address sent during a disconnection (Last Will), such as "ELIPSE\goodbye" |
Message linked to a topic, such as "Goodbye" |
|
Delay Interval |
Available only in version 5 of MQTT protocol, defines the time, in seconds, that a Broker waits after an unexpected disconnection before publishing a Last Will message |
Use Expiry Interval |
Available only in version 5 of MQTT protocol, enables the Expiry Interval option |
Expiry Interval |
Available only in version 5 of MQTT protocol, defines the time, in seconds, after which the Last Will message is discarded by a Broker if it has not been delivered yet |
NOTE |
To define a different value of QoS, Retain, and Expiry Interval for each Tag, users can configure a Tag with parameters N1 equal to 1 (one), N2 equal to QoS (zero, one, or two), N3 equal to Retain (zero or one), and N4 equal to Expiry Interval, in seconds, if the version of MQTT protocol is equal to 5 (five). |
On the Templates tab, users can define different patterns for data on MQTT messages, whose elements can be automatically extracted or filled by this Driver using Links with Tags or Block Tags.
Templates tab
The available options on the Templates tab are described on the next table.
Available options on the Templates tab
Option |
Description |
---|---|
Apply local timezone to timestamps |
When this option is selected, the received timestamps are converted to the timezone used by the operating system. Otherwise, the received timestamps are displayed in UTC timezone |
Template Name |
Informs the name of a Template. Templates with the same name are not allowed |
Data Format |
Declares the format of a Template's message. The available options are JSON, CSV, or XML. The JSON format is preferred for use with MQTT, because it allows defining any type of data structure with less bytes |
Add |
Adds a Template to the list of Templates |
Edit |
Opens a window for editing the selected Template |
Delete |
Deletes the selected Template from the list of Templates |
Click Edit to open a window for editing the selected Template. The name and format of a Template are displayed at the top. The Template itself must be inserted in the edit box.
Window for editing a Template
The available options on the window for editing a Template are described on the next table.
Available options on the window for editing a Template
Option |
Description |
---|---|
Save |
Confirms all changes and closes this window |
Cancel |
Discards all changes and closes this window |
Syntax |
Informs the syntax of a message, in the selected format (JSON, CSV, or XML) together with the keywords used during the process of replacing them by timestamps, qualities, or values. For more information, please check topic Template Syntax |
The Setup tab contains general settings for this Driver.
Setup tab
The available options for this Driver on the Setup tab are described on the next table.
NOTE |
The options of the Setup tab that are not described on the next table are deactivated and have no effect on the configuration of this Driver. |
Available options on the Setup tab
Option |
Description |
---|---|
Start driver OFFLINE |
Select this option for this Driver to start in Offline mode or stopped. This means that the Ethernet interface is not created until users configure this Driver in Online mode by using a Tag in an application. This mode enables a dynamic configuration of the Ethernet interface at run time |
Retry failed connection every n seconds |
Select this option to enable a connection retry of this Driver in an n interval, in seconds. If the Give up after n failed retries option is not selected, this Driver keeps retrying until the connection is established, or until the application is stopped |
Give up after n failed retries |
Enable this option to define a maximum number of connection retries. When the specified number of consecutive connection retries is reached, this Driver goes to the Offline mode, assuming that a hardware problem was detected. If this Driver establishes a successful connection, the number of retries is zeroed. If this new connection is lost, then the counter of retries starts at zero |
Log to file |
Enable this option and configure the name of the file where logs are written. Log files can be large, therefore use this option for short periods of time, only for test and debugging purposes. In case of using the %PROCESS% macro in the name of the log file, it is replaced by the identifier of the current process. This option is particularly useful when using several instances of the same Driver in Elipse E3, Elipse Power, or Elipse Water, thus allowing each instance to generate a separate log file. For example, when configuring this option with the value "c:\e3logs\drivers\mqtt_%PROCESS%.log", it generates a file c:\e3logs\drivers\mqtt_00000FDA.log for the 0FDAh process. Users can also use the %DATE% macro in the file name. In this case a log file per day is generated, in the format aaaa_mm_dd. For example, when configuring this option with the value "c:\e3logs\drivers\mqtt_%DATE%.log", it generate a file c:\e3logs\drivers\mqtt_2005_12_31.log on 12/31/2025 and a file c:\e3logs\drivers\mqtt_2026_01_01.log on 01/01/2006. Analogously, the %DATE_HOUR% macro generates a log file per hour, in the format aaaa_mm_dd_hh |
File size limit (MB) |
Configure the size limit of the log file, in megabytes. A value equal to 0 (zero) means that there is no size limit for the log file |
The Ethernet tab allows configuring parameters of the Ethernet interface.
Ethernet tab
The available options for this Driver on the Ethernet tab are described on the next table.
NOTE |
The options of the Ethernet tab that are not described on the next table are deactivated and have no effect on the configuration of this Driver. |
Available options on the Ethernet tab
Option |
Description |
---|---|
Use SSL |
When selecting this option, the SSL (Secure Sockets Layer) protocol is used for a secure connection with a Broker. The SSL Settings is enabled to configure the certificates |
SSL Settings |
Opens the SSL Settings window to configure the certificates, shown on the next figure |
Main IP |
Type the IP address of a remote device. Users can use either an IP address separated by dots or a URL. For a URL, this Driver uses the available DNS service to map that URL to an IP address, such as "192.168.0.13" or "Server1" |
Port |
Type the TCP/IP port of a remote device, between 0 (zero) and 65535 |
SSL Settings window
The available options on the SSL Settings window are described on the next table.
Available options on the SSL Settings window
Option |
Description |
---|---|
CA File Path (.crt) |
Name and path of a file for the Certificate of Authority (CA). Click |
Certificate File Path (.crt) |
Name and path of a file for the client's SSL Certificate. Click |
Private Key File Path (.key) |
Name and path of a file with private keys for the client's SSL Certificate. Click |
Private Key Password |
Password of the private key, if applicable |
Validate Local Private Key |
Enables or disables validating the file defined in the Private Key File Path (.key) option |
Check Peer Certificate |
Enables or disables checking the client's SSL Certificate |
Check Peer Certificate Expiration |
Enables or disables checking the expiration date of the client's SSL Certificate |
The I/O Tags available for this Driver are described next.
Read-only I/O Tag that informs the communication status of this Driver. Indicates how communication works relative to receiving valid data inside a time period set during the configuration. Possible values are 0 - Inactive communication: This Driver did not receive valid data or stopped receiving data after n milliseconds, as configured on the Setup tab, or 1 - Active communication: This Driver is receiving valid data.
Read-Only I/O Tag that indicates the status of the physical layer. Possible values are 0: The physical layer is stopped, that is, this Driver is in Offline mode, the physical layer failed during initialization, or exceeded the maximum number of reconnection retries, 1: The physical layer was started but not connected, that is, this Driver is in Online mode, but the physical layer is not connected, or 2: The physical layer is connected, that is, the physical layer is ready for use. This DOES NOT mean that a device is connected, only that the access layer is working.
Read-Only Block Tag that allows changing any configuration property of this Driver at run time. This Tag only works while this Driver is in Offline mode. To do so, select the Start driver OFFLINE option on the Setup tab. Writing individual Block Elements is not supported, a whole Block must be written at once.
Reading and writing I/O Tag that informs the current status of this Driver and allows starting or stopping the physical layer. Possible values are 0 - Driver Offline: The physical layer is closed or stopped. This mode allows a dynamic configuration of this Driver's parameters using the IO.SetConfigurationParameters Tag or 1 - Driver Online: The physical layer is open or executing. While it is in Online mode, the physical layer can be connected or disconnected and the current status can be checked in the IO.PhysicalLayerStatus Tag.