MQTT Driver

Help Contents

Introduction

MQTT is a publish-subscribe messaging protocol built on top of TCP/IP. Applications and devices connect to an MQTT Broker 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:

Fernhill SCADA supports topic values using these formats:

MQTT Broker

Fernhill SCADA interfaces to an MQTT Broker using the Message Services Driver and the MQTT Driver:

Fernhill SCADA relationship with MQTT Broker

The Message Services Driver can publish reports to MQTT topics.

The MQTT Driver maps I/O Data Point Tags to topics in an MQTT Broker:

Note: Fernhill SCADA does not include an MQTT Broker. There are a number of open source brokers you can use:

MQTT Commands Used

The MQTT Driver in Fernhill SCADA uses these MQTT commands:

CommandUse in Fernhill SCADA
CONNECTConnects Fernhill SCADA to an MQTT Broker.
DISCONNECTSent by Fernhill SCADA to all connected MQTT Broker when Fernhill SCADA is shutdown.
SUBSCRIBE Used to subscribe to the topics required by the I/O Data Point Tags associated with the MQTT Connection 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 Brokers.
PINGPeriodically the Fernhill SCADA driver sends a PING request to test the availability of the MQTT Broker.
PUBLISH Publish messages are both sent and received by Fernhill SCADA.
Messages published by the MQTT Broker update the value of tag(s) in the Fernhill SCADA Server.
Fernhill SCADA sends a Publish request to the MQTT Broker in the following circumstances:

Fernhill SCADA MQTT Tags

The MQTT driver provides this tag type to communicate with an MQTT Broker:

IconTag TypeVersionDescription
Channel IconMQTT Connection Tag3.22A connection between Fernhill SCADA and an MQTT Broker.

Fernhill SCADA I/O Data Point Tags

You can use these I/O Data Point Tags to map to topics in an MQTT Broker:

IconTag TypeVersionDescription
Analog Data Point TagI/O Analog Data Point Tag3.12 When associated with an MQTT Connection Tag, maps an Analog Data Point Tag to a topic in the MQTT Broker. The IOItemName field sets how the Analog Data Point Tag> is mapped to a topic in the MQTT Broker. See MQTT IOItemName Format to learn how this field is formatted.
Digital Data Point TagI/O Digital Data Point Tag3.12 When associated with an MQTT Connection Tag, maps a Digital Data Point Tag to a topic in the MQTT Broker. The IOItemName field sets how the Digital Data Point Tag is mapped to a topic in the MQTT Broker. See MQTT IOItemName Format to learn how this field is formatted.
String Data Point TagI/O String Data Point Tag3.12 When associated with an MQTT Connection Tag, maps a String Data Point Tag to a topic in the MQTT Broker. The IOItemName field sets how the String Data Point Tag is mapped to a topic in the MQTT Broker. See MQTT IOItemName Format to learn how this field is formatted.
Word Data Point TagI/O Word Data Point Tag3.12 When associated with an MQTT Connection Tag, maps a 16-bit Word Data Point Tag to a topic in the MQTT Broker. The IOItemName field sets how the Word Data Point Tag is mapped to a topic in the MQTT Broker. See MQTT IOItemName Format to learn how this field is formatted.
Double Word Data Point TagI/O Double Word Data Point Tag3.12 When associated with an MQTT Connection Tag, maps a 32-bit Double Word Data Point Tag to a topic in the MQTT Broker. The IOItemName field sets how the Double Word Data Point Tag is mapped to a topic in the MQTT Broker. See MQTT IOItemName Format to learn how this field is formatted.
Long Word Data Point TagI/O Long Word Data Point Tag3.48 When associated with an MQTT Connection Tag, maps a 64-bit Long Word Data Point Tag to a topic in the MQTT Broker. The IOItemName field sets how the Long Word Data Point Tag is mapped to a topic in the MQTT Broker. See MQTT IOItemName Format to learn how this field is formatted.

Further Information

MQTT IOItemName Format

To learn how to choose 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.

MQTT.org

To learn about the MQTT standard.