MQTT Plug-in
You set the following properties in the configuration of the MQTT plug-in:
Router configuration:

| Name | Assign a unique name to the MQTT connection. |
| Cloud profile | Choose here between the MQTT standard, AWS, Azure IoT or Wago cloud. |
| Keep alive (s) | The ping interval in which the OPC Router sends a ping to the server. If no data comes in the interval, the router will abort the wait. |
| Wait for transfer | Wait for transfer causes the router to respond to the broker only after the transfer has completed or failed. |
Cloud profile:
For more information on using MQTT and the Cloud Profiles, see our Knowledge Base at:
https://www.opc-router.com/knowledge-base/
You can switch between different cloud profiles, which have different properties:
AWS:

| API endpoint address | Enter the address for the connection to the AWS Cloud here. |
| Import new certificate | Select this item if you want to import a new certificate. |
| Certificate | Select here the certificate from the AWS IoT Cloud. |
| Private key file | Select here the file from the AWS IoT Cloud. You can download this file beforehand. You can find more information about this on our Knowledge Base. |
| Select existing certificate | Select this item if you want to select a certificate from the OPC Router Store or if you want to create a new certificate. |
| Client certificate | Select a certificate from the OPC Router Store or create a new certificate. |
Azure IoT:
.png)
For instructions on how to create a connection in Azure IoT Cloud, please visit our Knowledge Base.
| Host name | The name of the connection to the Azure IoT Cloud. |
| Shared access key name | The name of the policy to the Azure IoT Cloud. |
| Shared access key | Enter the key to establish a secure connection. |
| Enter connection string | Open the pop-up to enter the connection string. |
| DeviceID | Enter the Device ID for the device here. |
| Time to live (days) | Enter here the Duration of validity which is generated from the access key. When the time is expired, a new token is generated from the access key. Important: The shared access key does not need to be replaced. |
| Primary device key | Select here if it should be a Primary Device. |
| Secondary device Key | Select here if it should be a Secondary Device. |
Wago Cloud:
.png)
| End point | The destination to which the data is sent from the field level. |
| DeviceID | Enter your DeviceID. You can find it in your Wago Cloud account. |
| Activation key | Enter your activation key. The activation key can be found in your Wago Cloud account. |
Connection settings

| Broker connection | Enter the address of the broker |
| Port | Port on the server used for the MQTT connection |
| SSL | Uses SSL encryption. The server must support this, the corresponding Port must be set. |
| Persistent session | Activate if a persistent connection is desired. Missed messages are sent afterwards. |
| Timeout (ms) | Length of time to wait to see if a connection can be re-established. |
| SSL protocol | Choose the protocols. |
| Client ID | Display of the Client ID. The button “Create new Client ID” creates a new ID. |
| Create new Client ID | Creates a new Client ID that is displayed in the Client ID field. |
| Username | Username for logging in to the server. |
| Password | Password for logging in to the server. |
| Client certificate | Selection of a client certificate from the drop-down list, which the OPC Router also sends. |
| Trusted certificates | Select which certificates to accept. For example, all certificates, Windows certificates only, or router certificates only. |
| MQTT version | Select the MQTT protocol version from the drop-down menu. |
| Quality of service type | Selection the Standard Quality of Service:
|
The Client ID must be unique and independent. There may only be one client ID per server, otherwise errors may occur in the plug-in.
Tab: First Will
.png)
| First Will aktivieren | Activate checkbox to activate the “First will” checkbox. Activity when establishing a connection. |
| Topic | Specifies which topic the first will to look at. |
| Payload | Specifies which user data is to be transmitted during communication. |
| Quality of service | Selection the Quality of Service:
|
| Retain First Will | Activate if you want the broker has to hold the data. |
Tab: Last Will
.png)
| Activate last will | Activate checkbox to activate the last will. Activity before a connection termination. |
| Topic | Specifies which topic the load should look at. |
| Payload | Specifies which user data has to be transmitted during communication. |
| Quality of Service | Selection the Quality of Service:
|
| Retain Last Will | Activate if you want the broker has to hold the data. |
| Send Last Will on disconnection | Activate if the last will to be sent even when the connection is terminated. |