Skip to main content
Version: 5.4

MQTT Plug-in

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

Router settings:

PropertyDescription
NameAssign a unique name to the MQTT connection.
Cloud profileChoose between MQTT Standard, AWS, Azure IoT, or Wago Cloud.
Keep alive (s)The ping interval at which the OPC Router sends a ping to the server. If no data arrives during the interval, the router will cancel the wait.
Wait for transferWait for transfer causes the router to respond to the broker only when the transfer is complete or has failed.

Cloud profile:

note

For more information on using MQTT and cloud profiles, please refer to our Knowledge Base:

https://www.opc-router.de/knowledge-base/

You can switch between different cloud profiles, each with different properties:

AWS:

FeatureDescription
API endpoint addressEnter the address for the connection in the AWS Cloud here.
Import new certificateSelect this option if you want to integrate a new certificate.
CertificateSelect the certificate from the AWS IoT Cloud here.
Private key fileSelect the file from the AWS IoT Cloud here. You can download this file beforehand. For more information, see our Knowledge Base.
Select existing certificateSelect this option if you want to select a certificate from the OPC Router certificate management or create a new certificate.
Client certificateSelect a certificate from the OPC Router certificate management or create a new certificate.

Azure IoT:

For instructions on creating a connection in the Azure IoT Cloud, please refer to our Knowledge Base.

PropertyDescription
HostnameThe name of the connection in the Azure IoT Cloud.
Shared access key nameThe name of the policy in the Azure IoT Cloud.
Shared access keyEnter the key to establish a secure connection.
Enter connection stringOpen the pop-up to enter the connection string.
DeviceIDEnter the device ID for the device here.
Time to live (days)

Here you specify the validity period for the token generated from the access key. When the period has expired, a new token is generated from the access key.

Important: The shared access key does not need to be replaced. It remains the same.

Primary Device KeySelect here whether it should be a primary device.
Secondary Device KeySelect here whether it should be a secondary device.

Wago Cloud:

PropertyDescription
EndpointThe destination to which the data is sent from the field level.
DeviceIDEnter your DeviceID. You can find this in your Wago Cloud account.
Activation KeyEnter your Activation Key. You can find the Activation Key in your Wago Cloud account.

Connection Options:

PropertyDescription
Broker connectionEnter the broker address.
PortPort on the server used for the MQTT connection.
SSLUses SSL encryption. The server must support this, and the corresponding port must be set.
Persistent sessionActivate if a persistent connection is desired. Missed messages are sent later.
Timeout (ms)Duration during which the system waits to see if a connection can be reestablished.
SSL protocols

Select the algorithms that may be used.

Note: Some MQTT brokers reject connections if outdated protocols are used.

Client IDEnter a unique client ID.
Create new client IDCreates a new unique client ID, which is displayed in the Client ID field.
UsernameUsername for logging in to the server.
PasswordPassword for logging in to the server.
Client CertificateSelect a client certificate from the drop-down list, which the OPC Router sends along with the request.
Trusted CertificatesSelect which certificates should be accepted. For example, all certificates, only Windows certificates, or only router certificates.
MQTT VersionSelect the MQTT protocol version from the drop-down menu.
Quality of Service Type

Select the default quality of service:

  • 0 = At most once
  • 1 = At least once
  • 2 = Exactly once
warning

The client ID must be unique and independent. There can only be one client ID per server, otherwise errors may occur in the plug-in.

Tab: First Will

PropertyDescription
Activate First WillActivate the checkbox to activate "First Will." Activity when establishing a connection.
TopicSpecify which topic First Will should write to.
PayloadSpecify which user data should be transmitted during communication.
Service quality

Select the service quality:

  • 0 = At most once
  • 1 = At least once
  • 2 = Exactly once
Retain First WillActivate if the broker should retain the data. The data will be sent again after the connection is terminated.

Tab: Last Will

PropertyDescription
Activate Last WillActivate the checkbox to activate "Last Will." Sent when the connection is established, executed only when the connection is terminated.
TopicSpecify the topic to which Last Will should write.
PayloadSpecify which user data should be transmitted during communication.
Service Quality

Select the service quality:

  • 0 = At most once
  • 1 = At least once
  • 2 = Exactly once
Retain Last WillActivate if the broker is to retain the data. The data is sent again after the connection is terminated.
Send Last Will when connection is terminatedActivate if the Last Will is also to be sent when the connection is closed.