TR50 MQTT Publish

The TR50 MQTT Publish action sends raw MQTT publishes on the MQTT bus underlying the TR50 Connection. The MQTT Publish action will allow custom data publishing to the M2M Service, and therefore provide access to additional functions supported by the deviceWISE Cloud.  
For information on supported functions, see MQTT Interface and its child pages.


Parameter description

Parameter Description
Topic Name
Name of the MQTT topic the action should publish on. This is a required field of string type.
  1. The topic name can be a M2M Service related topic (api, reply or thing). For information on supported functions, see MQTT Interface and its child pages.
  2. The topic name can be a user defined topic not related to any deviceWISE Cloud topic.

The command can use the substitution string feature indicated by using $(string). The substitution variables entered in this parameter are then defined in the corresponding parameters in the Input tab.

Quality of Service (QoS) Quality of service that is used to send the publish. Default is set to 0.
  1. QoS 0: The defined behavior for QoS 0 is that an acknowledge for the publish is not required for a successful action.
  2. QoS 1: The defined behavior for QoS 1 is that an acknowledge for the publish is returned from the server for the action to be successful. In the case of a failure, the TR50 connection will be disconnected.
Payload Type Type of payload to send, either String or Binary. The default is set to String.
Payload The payload or content of the publish to be sent. This field is only enabled when the Payload Type is set to String. This field is required when the payload Type is set to String and defaults to $(payload).

This field can use the substitution string feature indicated by using $(payload). The substitution variables entered in this parameter are then defined in the corresponding parameters in the Inputtab. If the substitution string feature is not used, this field is simply treated as a String field and the substitution parameter in the input tab is disabled.

Input tab

Input Description
Topic The value for the substitution variables entered for the Topic Name parameter. You can define them to reference any started device, constant, trigger macro, trigger local variable, trigger static variable, or event variable available from the pull down list displayed for the Value cell for that row.
Payload When the Payload Type is set to String, this field can be used to set the value for the substitution variables entered for the Payload parameter. You can define them to reference any started device, constant, trigger macro, trigger local variable, trigger static variable, or event variable available from the pull down list displayed for the Valuecell for that row. When the substitution string feature is not used in the Payload parameter, this field is disabled.

When the Payload Type is set to Binary, this field is a required field to set the binary content of the payload to be sent.

Connection Name The TR50 connection name of the connection to perform this action on.

 (Optional) If not specified, the name of the connection used is Default.


Related topics

IoT Portal API Reference Guide

TR50 MQTT Publish Receive