Data Access for the MQTT Publisher

Following options are available to define the data that should be published with the MQTT Publisher:

Data Point Groups

  • By default the data point group MQTTPub is used by the MQTT Publisher to define the data, which should be published.
  • Using the config entry [mqttpub] mqttPubGroup a different data point group can be specified.
  • The MQTT Publisher creates a dpConnect() to all the DPEs of this group and publishes them if a DPE is updated.
  • The value format (Transformation) for the published data (string or JSON format) can be configured in the MQTT Publisher Default/Last Will configuration panel.
  • To publish all values during connection establishment to the broker set the option AutoIGQ in the MQTT Publisher advanced configuration panel.
  • The topic used for publishing is derived from the DPE name or the alias, where all '.' and ':' are replaced by the MQTT hierarchy separator '/'.

DPE Name to Topic Name

The DPE System1:mqpub-0.alert.controlFuse is published under the topic System1/mqpub-0/alert/controlFuse

CNS Views

  • If there is at least one CNS Views contained in the DPE _MQTTPublisher.Config.CNSViews the publisher uses CNS Views instead of DP groups.

    Restriction: You can only use either DP group or CNS Views for publisher configuration.
  • The MQTT Publisher creates a dpConnect() to each linked DPE oder DP if the corresponding CNS node is defined as readable via MQTT.
  • The topic is defined by the CNS ID path (See Common Name Service (CNS)). As for Data Point Groups all '.' and ':' are replaced by MQTT hierarchy separator '/'.
  • The value format (Transformation) for the published data (see Define Transformation) can be configured at each node.
    Note: If no definition is done on the CNS node the default value from in the MQTT Publisher panel is used.
  • The access mode and the transformation are stored in the CNS user data (see cnsSetProperty, cnsGetProperty). The key for access mode is OA:MQTT and that for the transformation OA:MQTT:T.
Note: When a View ID is changed, the CNS View assignment must be updated.