MQTT Driver

Help Contents

Introduction

The Message Queuing Telemetry Transport (MQTT) is a publish-subscribe messaging protocol built on top of TCP/IP. Applications and devices connect to an MQTT server and do one or both of the following:

A Topic is a string that identifies or labels a data value.

The data value is a string, which could be:

The Fernhill SCADA MQTT driver supports topic values using these formats:

The Fernhill SCADA MQTT driver maps I/O Data Tags to topics in an MQTT Server:

Fernhill SCADA relationship with MQTT Server

Fernhill SCADA Supports these types of interaction with MQTT servers:

MQTT Commands Used

The Fernhill SCADA MQTT Driver uses these MQTT commands:

CommandUse in Fernhill SCADA
CONNECT Connects Fernhill SCADA to an MQTT Server.
DISCONNECT Sent by Fernhill SCADA to all connected MQTT Servers when Fernhill SCADA is shutdown.
SUBSCRIBE Used to subscribe to the topics required by the I/O Data Tags associated with the MQTT Server Tag.
UNSUBSCRIBE Used when an I/O Data Tag associated with an MQTT Connection is edited. Edit operations that can cause an UNSUBSCRIBE command include:
  • The tag is modified.
  • The tag is deleted.
  • The tag is moved between MQTT Servers.
PING Periodically the Fernhill SCADA driver sends a PING request to test the availability of the MQTT Server.
PUBLISH Publish messages are both sent and received by Fernhill SCADA.
Messages published by the MQTT server update the value of tag(s) in the Fernhill SCADA Server.
Fernhill SCADA sends a Publish request to the MQTT server in the following circumstances:

Fernhill SCADA MQTT Tags

The MQTT driver provides this tag type to communicate with MQTT Servers:

Icon Tag Type Version Description
Channel Icon MQTT Connection Tag 3.22 A connection between Fernhill SCADA and an MQTT Server.

Fernhill SCADA IO Data Tags

You can use these IO Data Tags to map to topics in an MQTT Server:

Icon Tag Type Version Description
Analog Data Tag IO Analog Data Tag 3.12 When associated with an MQTT Server, maps an analog tag to a topic in the MQTT Server. The IOItemName field specifies how the analog tag is mapped to a topic in the MQTT Server. See MQTT IOItemName Format to learn how this field is formatted.
Digital Data Tag IO Digital Data Tag 3.12 When associated with an MQTT Server, maps a digital tag to a topic in the MQTT Server. The IOItemName field specifies how the digital tag is mapped to a topic in the MQTT Server. See MQTT IOItemName Format to learn how this field is formatted.
String Data Tag IO String Data Tag 3.12 When associated with an MQTT Server, maps a string tag to a topic in the MQTT Server. The IOItemName field specifies how the string tag is mapped to a topic in the MQTT Server. See MQTT IOItemName Format to learn how this field is formatted.
Word Data Tag IO Word Tag 3.12 When associated with an MQTT Server, maps a 16-bit unsigned integer tag to a topic in the MQTT Server. The IOItemName field specifies how the 16-bit unsigned integer tag is mapped to a topic in the MQTT Server. See MQTT IOItemName Format to learn how this field is formatted.
Double Word Data Tag IO Double Word Tag 3.12 When associated with an MQTT Server, maps a 32-bit unsigned integer tag to a topic in the MQTT Server. The IOItemName field specifies how the 32-bit unsigned integer tag is mapped to a topic in the MQTT Server. See MQTT IOItemName Format to learn how this field is formatted.

Further Information

MQTT IOItemName Format

To learn how to specify topic values and optional read filters.

Fernhill SCADA Drivers

For information about other drivers available in Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.