SCADA Know-How | In-Depth Application Guide to MQTT Protocol (2.0)
2025-07-24 08:36:14

1.  Introduction to the MQTT Protocol

 

MQTT (Message Queuing Telemetry Transport) is an ISO standard (ISO/IEC PRF 20922) messaging protocol using a publish-subscribe pattern. It operates over the TCP/IP protocol suite and can maintain device communication even with poor hardware performance of remote devices or unstable network conditions, making it widely applicable in various fields. As a publish-subscribe-based messaging protocol, MQTT requires a message middleware, i.e., the MQTT Broker server. Please make sure that a suitable operating environment has been set up before proceeding.

 

Note:

1. The MQTT data sharing feature does not require separate authorization.

2. The SOLISCADA software does not include built-in deployment of an MQTT Broker server. You have to install and deploy it by yourself.


1、MQTT Data Flow Diagram.png


2.  MQTT Applications

 

In SOLISCADA, the SCADA system can subscribe to data published by third-party MQTT using the Database-MQTT Driver, and it can also publish data through MQTTClient for third-party clients to read.

 

Subscribing to the Data Published by Third-party MQTT using the MQTT Driver

 

Tags created under the driver are read-only and values cannot be written to them.

 

2、Subscribing to the Data Published by Third-party MQTT using the MQTT Driver.png

 

Forwarding SCADA Real-time Data, Historical Data, and Alarm Data using the MQTT Service

 

Support forwarding SCADA real-time data and allow third parties to modify SCADA tag values in real time.

 

Allow third parties to query historical data.

 

Allow third parties to subscribe to real-time alarm notifications and query historical alarm records.

 

3、Forwarding SCADA Real-time Data.png

 

2.1 Subscribing to the Data using the MQTT Driver

 

With the MQTT driver, the current client can connect to the MQTT service (MQTT Broker server) to receive real-time messages published to the MQTT server by other clients. Tags created under the driver are read-only and values cannot be written to them.

 

You can subscribe to relevant topics on the server by configuring topic names and display specified data from the messages by configuring tags.

 

4、Subscribing to the Data using the MQTT Driver.png

 

2.1.1 Driver Configuration

 

Add the MQTT driver in Database-Local Node, then right-click the driver to enter the driver configuration page and add clients and Topics.

 

5、add clients and Topics.png

 

In the client configuration page, fill in the address and port number of the MQTT Broker server, client ID, username, and password. (Configure client ID, username, and password according to the broker server's requirements, or use the default configurations.)

 

6、In the client configuration page.png

 

In the Topic configuration page, enter the topic under which third-party clients publish data. The SCADA subscription topic must match the third-party publication topic.

 

7、In the Topic configuration page.png

 

2.1.2 Adding Tags

 

Right-click the driver to add tags, then select the tag type and I/O address.

 

8、select the tag type and IO address.png

 

Keep the I/O address type and data address synchronized with the message content.

 

Attention:

Currently, values cannot be written to tags subscribed using the MQTT driver.

 

2.1.3 Data Address Configuration Example

 

In addition to the single-level JSON type configured in 2.1.2, the SCADA software also supports other JSON types, as shown in the figure below.

The payload data address is the data address when adding SCADA tags.

 

9、Data Address Configuration Example.png

 

2.2 Forwarding the Data using the MQTT Service

 

SOLISCADA supports publishing real-time data, historical data, and alarm information externally via the MQTT protocol, and also allows modification of real-time data.

After launching InPlant SCADA monitoring, configuring MQTTClient parameters, and successfully establishing a connection, the software can push data to the MQTT Broker server through MQTTClient for third-party clients to subscribe to.

 

10、Forwarding the Data using the MQTT Service.png

 

2.2.1 Enabling the MQTT Forwarding Service in Global Settings

 

On the project management page, check "MQTT Data Forwarding Service" under the tab "Startup" of Global Settings. After publishing the project, launch the monitoring software.

 

11、Enabling the MQTT Forwarding Service in Global Settings.png

 

2.2.2 MQTTClient Configuration 

 

After starting monitoring and logging in, right-click the icon in the system tray, and select "Properties" to open MQTTClient.

 

12、open MQTTClient.png

 

Configure service parameters: Enter the address and port number of the MQTT broker server, client ID, username, password, etc. Select "Other(Json)" and then start it.

 

13、Configure service parameters.png

 

After starting, the status shows "Connected".

 

14、the status shows Connected.png

 

Configure general properties: MQTT version (recommended to remain the default) and push method.

 

15、Configure general properties.png

 

2.2.3 Real-time Data Topics

 

2.2.3.1 Third Parties Subscribe to Real-time Values

 

When a third-party client wants to obtain real-time values of tags from the SCADA local real-time database, it needs to subscribe to the "Publication Topic".

 

16、Third Parties Subscribe to Real-time Values.png

 

17、Publication Topic.png

 

l Check "All Tags" and set the topic name. When third-party clients subscribe to the topic, they will receive real-time data of all tags.

 

l If you only want to allow data of some specific tags to be accessed, check "Custom Open Bit Number" and then configure the topics and the list of tags that can be accessed: ① click "Add" to add a new topic with the default name "Topic+Number"; ② select a topic and click "Rename" to modify the topic name (it can contain English letters, digits, and underscores with up to 32 characters); ③ select a topic and click "Add" on the right to select the tags to be subscribed to in the tag selector. Note: Different subscription topics can include the same tags.

 

18、Custom Open Bit Number.png

 

2.2.3.2 Third Parties Publish Modified Values

 

When a third-party client wants to modify the real-time values of tags in the SCADA local real-time database, it needs to publish the "Subscription Topic".

 

19、Third Parties Publish Modified Values.png

 

20、Subscription Topic.png

 

Subscription Topic: When a tag's read-write attribute is set to read-write, third-party clients can write values to the tag via MQTTClient.

 

Note: Currently, values cannot be written to tags subscribed using the MQTT driver as described in Section 2.1 (these tags are read-only).

 

2.2.3.3 Third Parties Subscribe to Real-time Values: Custom Format Fields

 

When third-party clients retrieve real-time values of tags from the SCADA local real-time database, in addition to the default JSON format, they can also customize simple format fields.

 

To modify the message format, locate the configuration file MQTTRTDataJsonSchema.conf in the project runtime directory (default path: D:\ECSRun\ProjectName\HMI\SubProject\Run). This file does not exist by default—it is generated upon the first startup by default or can also be created manually. After modification, restart the MQTT service in the software.

 

21、Third Parties Subscribe to Real-time Values Custom Format Fields.png

 

Custom Format 1: Single-level JSON

 

22、Custom Format 1 Single-level JSON.png

 

Custom Format 2: Multi-level JSON

 

23、Custom Format 2 Multi-level JSON.png

 

Custom Format 3: Single-level JSON Array

 

24、Custom Format 3 Single-level JSON Array.png

 

2.2.4 Historical Data Query Topic

 

When querying historical data, third-party clients need to send a query message to the MQTT service. A new message must be sent for each query. Upon successful query, the latest historical data can be retrieved. Each query can fetch data of up to 8 tags, with a maximum of 5,000 data points per tag.

 

25、Historical Data Query Topic.png

 

When third-party clients send/receive data using the MQTT communication, they must adhere to the specified format.

 

26、adhere to the specified format.png

 

Third-party Clients Publish: Subscribe to Query Historical Data

 

Configure parameters including: tag names to query, time range, time interval, topic to receive, etc.

 

27、Third-party Clients Publish Subscribe to Query Historical Data.png

 

Third-party Clients Subscribe: Receive Historical Data

 

28、Third-party Clients Subscribe Receive Historical Data.png

 

2.2.5 Alarm Topics

 

After subscribing to the corresponding topic for real-time alarms, third-party clients can receive real-time alarm messages; after sending historical alarm query messages, they can obtain historical alarm data. The obtained alarm information does not include event alarms.

 

2.2.5.1 Subscribing to Real-time Alarm Messages

 

After a third-party client sends a subscription message once, the MQTT service will push real-time alarm data to the client; after sending an unsubscription message once, the MQTT service will stop sending real-time alarm data.

 

29、Subscribing to Real-time Alarm Messages.png

 

30、Format for Subscribing to Real-time Alarm Messages.png

 

Third-party Clients Publish: Subscribe to Alarm Messages

 

Subscribe to alarm messages via the topic "11".

 

31、Third-party Clients Publish Subscribe to Alarm Messages.png

 

Third-party Clients Subscribe: Receive Alarm Messages

 

32、Third-party Clients Subscribe Receive Alarm Messages.png

 

2.2.5.2 Subscribing to Query Historical Alarm Messages

 

When querying historical alarms, a new query message must be sent for each query. Upon successful query, the latest historical data can be obtained. A single query can retrieve up to 10,000 alarms; a maximum of 1,000 alarms can be pushed each time, and if exceeded, they will be pushed in batches.

 

33、Format for Querying Historical Alarm Messages.png

 

Third-party Clients Publish: Subscribe to Historical Alarm Messages

 

34、Third-party Clients Publish Subscribe to Historical Alarm Messages.png

 

Third-party Clients Subscribe: Receive Historical Alarm Messages

 

35、Third-party Clients Subscribe Receive Historical Alarm Messages.png

 

1.  MQTT Application Manual 

 

For detailed manual instructions, please refer to the help document of the SCADA software.

 

3.1.1.1 MQTT Driver

 

36、MQTT Driver.png

 

3.1.1.2 MQTT Forwarding

 

37、MQTT Forwarding.png


Other News
SCADA Essentials:Know & Do.png
SCADA Know-How | SOLISCADA Software Project Restoration and Backup
2025-07-03 09:01:45
SCADA Essentials:Know & Do.png
SCADA Know-How | SOLISCADA Recipe Function Guide
2025-07-03 08:25:55
SCADA Essentials:Know & Do.png
SCADA Know-How | Five Tips to Help You with SCADA Bitwise Value Extraction!
2025-06-26 07:01:38
SCADA Essentials:Know & Do.png
SCADA Know-How | Event Settings
2025-06-26 06:02:47
The Next Wave of SCADA Technology.jpg
Where is SCADA Technology Heading in the Era of Industrial Digitalization?
2025-06-23 03:14:19
封面图.png
SCADA Know-How | SOLISCADA Client/Server & Redundancy Architecture
2025-06-06 08:50:13
封面图.png
SCADA Know-How | SOLISCADA Historical Trend (Data) Configuration
2025-06-06 08:10:05
SOLISCADA SCADA Software- Top Questions Answered.png
New to SOLISCADA? Your Top Questions Answered
2025-05-29 06:08:31
669059318231109 (1).png
SOLISCADA: The Advanced SCADA Software for Industrial Monitoring & Control
2025-03-18 09:37:23
We are passionate pioneers in industrial monitoring and intelligent automation, offering revolutionary SCADA software that inspires engineers, connects industries, and drives intelligent, sustainable innovation worldwide.
Get Started
soliscada@supcon.com
Copyright @ 2025 SUPCON. All rights reserved. Privacy Policy