TR50 MQTT Publish
Receive
The TR50 MQTT Publish Receive event
subscribes to MQTT publishes being sent on the MQTT bus
underlying the TR50 Connection. The MQTT Publish action will allow
custom data publishing to the MQTT Broker within the M2M
Service, and therefore provide access to additional
functions supported by the deviceWISE Cloud. The MQTT Publish
Receive event will listen on a specific topic being
published.
For information on supported functions, see MQTT Interface and its child pages.
Defining a TR50 MQTT Publish Receive event trigger
To define a TR50 MQTT Publish Receive event trigger, follow these steps:
- From the Workbench left pane, expand the node where
you want to define the TR50 MQTT Publish
Receive event trigger.
- Select the Project icon to display
the Projects window, right-click a
specific project tab to display its pop-up menu, and
then select New.
You also can select the New button at the bottom of the Projects window when a specific project tab has already been selected. - The new Trigger window
appears.
Name the trigger. The trigger name can be up to 64 characters and include letters, numbers, and the underscore character. Spaces are allowed. - From the Event tab, select the
Trigger Event Type down-arrow, expand
the TR50 category, and then select
TR50 MQTT Publish Receive.
The Event tab becomes active with parameters that accommodate the TR50 MQTT Publish Receive event.
Parameter | Description |
---|---|
Topic Filter | An expression is used to
specify one or more topic names the
subscription should filter on when
subscribing to publishes from the MQTT
broker.
This expression can include wildcard characters to filter on. This field is required and supports a String up to 65535 bytes. Wildcard characters '+' and '#' are supported as follows:
|
Quality of Service |
Quality of service (QoS) that is used
to send the publish. Default is set to
0.
|
Payload Type | Type of payload to receive, either String or Binary. The default is set to String. |
TR50 MQTT Publish Receive event type trigger event variables
The input event variables available to a TR50 MQTT Publish Receive event trigger are:
Event variable | Data type | Description |
---|---|---|
Topic | STRING | The topic name of the incoming publish. |
Payload | STRING or BINARY | The payload of the incoming publish. The data type depends on the option selected for the Payload Type parameter. |
Payload Length | UINT4 | The length of the Payload for the incoming publish. |