Skip to content

MQTT driver

This driver allows the communication between Simumatik and an MQTT broker to subscribe and modify the different variables.


Aside from the common parameters described in the communication_driver docs, this driver includes:

  • ip: IP address of the MQTT broker. Default = ''
  • port: Port number used by the MQTT broker. Default = 1883
  • retain: Retain published topics by the driver in the MQTT Broker. Default = True
  • username: The username to authenticate with. Need have no relationship to the client id. Must be unicode [MQTT-3.1.3-11]. Set to None to reset client back to not using username/password for broker authentication. Default: None
  • password: The password to authenticate with. Optional, set to None if not required. If it is unicode, then it will be encoded as UTF-8. Default: None
  • enable_ssl_tls: Enables SSL/TLS support. Default: False

Setup data

The setup data will give values to the parameters required and will specify the I/O variables info.

    "parameters": {
        "ip": "",
        "port": 1883,
        "retain": true,
        "username": "example_name",
        "password": "secure_password",
        "enable_ssl_tls": false
    "variables": {
        "workspace/light_sensor": {
            "datatype": "str", 
            "size": 1,
            "operation": "write"
        "workspace/lamp": {
            "datatype": "str", 
            "size": 1, 
            "operation": "read"


The setup_params in the generic PLC components for mqtt_client will need the following format:

{"ip": "", "port": 1883, "retain": true, "username": "example_name", "password": "secure_password", "enable_ssl_tls": false}