MQTT Publish
Publish messages to MQTT broker on specified topic
Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.
Libraries:
Simulink Support Package for Raspberry Pi Hardware /
Internet Of Things
Description
The MQTT Publish block publishes messages from your hardware (publisher) to the Message Queuing Telemetry Transport (MQTT) broker on the specified topic.
The block has a Message input port and a Status output port. The Message port accepts the message to be published to the broker. The Status port outputs the status of the publish request. The string topic/level on the block icon is specified by the Topic parameter.
For more information on MQTT, see Publish MQTT Messages and Subscribe to Message Topics.
Note
The MQTT Publish block supports MQTT only over TCP/IP sockets.
Examples
Ports
Input
Output
Parameters
Version History
Introduced in R2018b
See Also
MQTT Subscribe | MQTT Basics (ThingSpeak)