MQTT Client Driver

MQTT stands for Message Queuing Telemetry Transport

The MQTT Client Driver is a subscribing client, which can read information from an MQTT broker, either on your local intranet or on the World Wide Web. You may then log, view, alarm and report on values from devices connected to that host, in your VTScada system.

Before using the MQTT client, you must create or purchase an MQTT broker, to which you will publish information for retrieval by VTScada.

Server List

Select (or create) a named server list. (Driver Server Lists) Servers for the list must be defined using the Application Configuration dialog, as described in Servers for Specific Services. Smaller sites that do not have multiple servers, or that use only the default server list, need not configure this field.

MQTT Client Driver properties Connection tab

Set the communication properties of the driver with the following fields:

Port

Select the TCP/IP Port tag that holds the address information for the MQTT data source.
MQTT data is available only over TCP/IP connections.

When configuring your TCP/IP tag, note that port 1883 is reserved with IANA for use with MQTT. Port 8883 is registered with IANA for use with MQTT over SSL. Your data source may use a different port.

This port must not be shared with any other clients.

MQTT Client ID

Every MQTT client must have a unique identifier. This is generated for you using the following four components to guarantee uniqueness on the broker as well as across VTScada applications and within the same application across multiple machines

  • Either of a configuration property called "MQTTClientIDPrefix" if set (useful for branding) or the string "VTScada"
  • The application's GUID (guaranteed unique identifier)
  • The workstation's unique identifier
  • This tag's name

Keep Alive

Specifies the number of seconds, after which the connection will close if no new data is received.

Ensure that the Disconnect Delay in your TCP/IP Port tag is greater than the Keep Alive time set here.

QoS

QoS stands for Quality of Service and specifies an agreement between the sender and receiver of a message. Zero is the lowest quality and should be used for reliable connections and where you do not mind if the occasional message is lost. Use QoS 1 when you need to be sure that every message is sent and you have a system in place to handle duplicate messages. QoS 2 is the most reliable but (due to its nature) the slowest option, ensuring that every message is delivered exactly once.

Hold

Select whether this driver should hold the last message received from the broker in the event of a communications failure.

MQTT Client Driver properties Credentials tab

Use this tab to provide the user name and password if those are required to sign into the MQTT broker. (Not all brokers will require these.)

Username

The name required to sign in to the MQTT broker

Password

The password matching that user name. Passwords are never shown and are not stored in plain text. That said, security depends on ensuring that your link to the MQTT broker uses only a secure connection (TLS).

Hash Password with MD5

Select this option if the MQTT broker saves passwords using that algorithm. The password will be hashed before being sent to the broker.

MQTT Client Driver properties Last Will tab

This provides a mechanism for the broker to notify interested clients that the VTScada client has disconnected. For example, if you set the Last Will Message to "VTScada MQTT Client 1 has disconnected" and the Last Will Topic to be "VTScada/Client/1", then if your application disconnects from the broker for any reason, the broker will send all clients that have subscribed to the topic "VTScada/Client/1" a message saying " VTScada MQTT Client 1 has disconnected "

Last Will Topic

The topic should be specific to the device, although this is not mandatory. One way to do this is to include the device name as part of the topic.

Last Will Message

The information to be sent to the topic in the event of a disconnection. "Offline" is typical.

Last Will QoS

Specify the quality of service with which the Last Will should be sent. (See notes in the description of the Connection tab.)

Last Will Retain

Use a retained message to update the status of a device on a topic. New clients will see the last retained message.