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)

Enter the 4 octet IPv4 dotted notation of the MQTT broker

If your MQTT Broker has a unique URL such as test.mosquitto.org, enter that address here. This requires a DNS server to be specified in the panel Ethernet Port configuration
Settings

Select MQTT (unencrypted) or MQTTs (encrypted)

Enter the TCP Port Number used by the MQTT Broker.
- The standard unencrypted port number is 1883.
- The standard encrypted port number is 8883.

Session Keep Alive Time assures that the connection is still open and both broker and client are connected to one another for the specified amount of time. Specify a time interval in seconds and communicate it to the broker when the client establishes the connection.
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:

Helps the broker control unused sessions. This interval, in seconds, tells the broker the period to store session information of the C-more MQTT client. When the session expiry interval is set to 0 or you do not tick the box, the session information is immediately removed from the broker when the C-More panel network connection closes.
Note: The maximum interval allowed is 4294967295 seconds (>136 years). |

Tells the broker the maximum number of unacknowledged Publish messages the panel can receive. If you do not set a Receive Maximum, the maximum value of 65,535 is used.

Allows the broker to reduce the string topic name to an integer to reduce packet size and increase bandwidth.
The C-more panel can restrict the number of Topic Aliases allowed per connection. The broker is only permitted to use values between 1 and 65535. If you don't set a Topic Alias Maximum value, the broker can't use Topic Aliases.
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

Click this radio button to have the MQTT client authenticate the server certificate and use it for encryption.
If you do not enable this feature, the certificate is not verified from a trusted source but is still used for encryption.

Select to use Root CA certificate preloaded in the panel.

Select this option to use your own custom Root CA certificate or Self-Signed certificate.
CA File
Root CA certificate that signs server certificate.
Client Certificate File
Client-side file, used for mutual authentication, for example AWS IOT.
Client Key File
Client-side file, used for mutual authentication, for example AWS IOT.
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.

- Each client specifies its last will Message (a normal MQTT Message with topic, payload, and retain flag) when connecting to a broker.
- The broker stores the Message until it detects that the client has an ungraceful disconnect.
- If the client disconnects abruptly, the broker sends the Message to all clients that are subscribed to the topic specified in the last will message.
- The storedLast Will and Testament Message is discarded if a client has a graceful 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.

Without retained messages, any new subscribers wait for the status to change before the subscriber receives a message.

- The broker sends the Message to all current subscribers and then saves the message.
- The Message for the topic is now a "last known good value".
- New clients that subscribe to a retained topic receive the "last known good value" for that topic as soon as they subscribe.

The topic name for the Last Will and Testament.
- A topic in general is a simple string of 1 to 128 characters.
- It can comprise multiple levels, separated by a forward slash.
- A topic is case-sensitive and can contain spaces.
- A leading forward slash is not recommended.
- Published topics cannot start with $ or use wild cards (+ or #).

The string tag where the Data from the broker topic is stored.
Notification

Tick this box to enter or select a discrete tag name. The selected tag name contains the connection status for the broker.
Session

Clean
If the connection between the client and broker is interrupted during a Clean session, subscriptions to topics are lost and the client needs to subscribe again on reconnect.
Persistent
If the connection between the client and broker is interrupted during Persistent session, all relevant client information saves on the broker. When the connection is re-established, the client does not have to re-issue subscribe messages and reception of inbound publish messages resumes.

Each MQTT Client must have a unique Client ID. By default, a Client ID is generated for the C-more panel using its Part Number and MAC Address. To use a custom Client ID instead, tick this box.

If you enable the Custom Client ID, you must enter a value for the Client ID. The Client ID can be up to 64 characters long. The Client ID must be unique among all clients connecting to the MQTT broker.