MQTT Client Setup

Topic: CM198

The MQTT Setup dialog displays current MQTT client settings. The C-more panel can connect to one MQTT Broker for each connection for a total of three broker connections.

After you connect to a broker, the PLC can publish and subscribe to topics on that broker.

Enable MQTT

Tick the box to enable the MQTT Client to view configuration settings.

 

Note: For security purposes only enable MQTT connections you plan to use.

Use same connect setting as Connection 1

When you enable Connection 1, you can choose to use the same Connection 1 settings for Connection 2 and/or Connection 3. There is no need to enter all the same connection information again. Settings copy over except the Session Type, which you must set individually. If you update Connection 1 settings, your updates automatically change for Connection 2 or Connection 3 if you enable that option.

Connect to MQTT Server (Broker)

Settings

 

Note: The default time for C-more is 30 seconds.

MQTT Version

Select the highest MQTT version your broker supports. C-more supports: V3.1.1, and V5.0.

If you select V5.0, the following three settings are supported:

 

Note: The maximum interval allowed is 4294967295 seconds (>136 years).

Authentication

Use if the MQTT broker requires authentication before it accepts messages. If needed, enter the Username and Password to connect to the MQTT broker.

SSL/TLS Settings

 

Note: This file imports into the Project file. It only updates in the panel if you select a new file in the software and download the project again.

Last Will and Testament

Tick the box to enable a Last Will and Testament.

MQTT is often used on unreliable networks. Use the Last Will and Testament (LWT) feature in MQTT to notify other clients about a client ungraceful disconnect.

The broker distributes the LWT of the C-more panel in these cases:

  • The broker detects an I/O error or network failure.
  • The panel fails to communicate within the Keep Alive time.
  • The panel closes the network connection without sending a disconnect packet first.
  • The broker closes the network connection because of a protocol error.

Option

QoS

Quality of Service is an agreement between a Message sender and receiver regarding the Message delivery guarantee.

The C-more panel support 2 levels of QoS:

QoS0 (once or not at all)

The fastest method, but also the most unreliable transfer mode because the PLC does not wait for the broker to acknowledge the message. With this QoS there is no possibility of duplicate messages; the Message is sent once or not at all.

QoS1 (at least once)

The PLC sends a Message and waits for an acknowledgment. This guarantees that the Message is delivered at least once, with the possibility for more than one delivery.

Notification

Session