Skip to main content
Version: 2.6

MQTT Client Configuration

The MQTT plugin can handle multiple client instances (publisher and subscriber). Each of them has its own context and runs as an independent task.

The client is configured in the settings.json located in the Config/HumanOS.PeSeL.MQTTClient/ folder

Configuration model for MQTT clients

This configuration is very similar to the other DataLogger configurations. As a result, the documentation is divided into two parts.

  • Common DataLogger Configuration: documents the general DataLogger configuration.
  • This document only documents the specific properties of the MQTTClient plugin.

Payload Scripting

The Payload definition is done by C# Script. The plugin will not work without the script. For further information on scripting see the Operation Manual.

The MQTT Payload is a byte array (byte[]). Therefore, each script processes byte-arrays only.

Note on Certificates

A client certificate is only necessary for the authentication with certificates. For a secure connection, only an installed certificate on the server is required. The property TransportLayerSecurity in the connection configuration must be set.

Filetypes of the client certificates must be exactly the same as specified (.pfx / .cer). Almost each suitable certificate can be converted in this file format. For this, use the open source tool OpenSSL.

https://www.openssl.org/

Examples to convert:

openssl pkcs12 -export -in certificate.crt -inkey privatekey.key -out certificate.pfx
openssl pkcs12 -in certificate.pfx -nokey -out certificate.crt