MQTT Writer¶
Class: MQTTWriterSinkBlockV1
Source: inference.enterprise.workflows.enterprise_blocks.sinks.mqtt_writer.v1.MQTTWriterSinkBlockV1
MQTT Writer block for publishing messages to an MQTT broker.
This block is blocking on connect and publish operations.
Outputs: - error_status (bool): Indicates if an error occurred during the MQTT publishing process. True if there was an error, False if successful. - message (str): Status message describing the result of the operation. Contains error details if error_status is True, or success confirmation if error_status is False.
Type identifier¶
Use the following identifier in step "type" field: mqtt_writer_sink@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
host |
str |
Host of the MQTT broker.. | ✅ |
port |
int |
Port of the MQTT broker.. | ✅ |
topic |
str |
MQTT topic to publish the message to.. | ✅ |
message |
str |
Message to be published.. | ✅ |
qos |
int |
Quality of Service level for the message.. | ✅ |
retain |
bool |
Whether the message should be retained by the broker.. | ✅ |
timeout |
float |
Timeout for connecting to the MQTT broker and for sending MQTT messages.. | ✅ |
username |
str |
Username for MQTT broker authentication.. | ✅ |
password |
str |
Password for MQTT broker authentication.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to MQTT Writer in version v1.
- inputs:
VLM As Classifier,Line Counter,MoonshotAI Kimi,Image Stack,Anthropic Claude,SIFT Comparison,LMM For Classification,Perspective Correction,Roboflow Custom Metadata,Dynamic Zone,Qwen-VL,JSON Parser,Email Notification,Google Gemma,Email Notification,Twilio SMS/MMS Notification,Template Matching,Model Monitoring Inference Aggregator,OpenRouter,OpenAI,Florence-2 Model,VLM As Detector,OpenAI,OCR Model,Motion Detection,Instance Segmentation Model,Anthropic Claude,Google Gemini,Clip Comparison,Google Gemini,CSV Formatter,Webhook Sink,Florence-2 Model,Current Time,OpenAI,VLM As Detector,Line Counter,Google Gemini,Slack Notification,Local File Sink,Cosine Similarity,Keypoint Detection Model,Image Contours,VLM As Classifier,Pixel Color Count,GLM-OCR,Roboflow Asset Library Attributes,Google Gemma API,Stitch OCR Detections,Distance Measurement,Detection Event Log,S3 Sink,Microsoft SQL Server Sink,Google Vision OCR,Twilio SMS Notification,Camera Focus,Roboflow Vision Events,PTZ Tracking (ONVIF),Stitch OCR Detections,Event Writer,Qwen3.5-VL,Llama 3.2 Vision,Identify Outliers,SIFT Comparison,OPC UA Writer Sink,Identify Changes,Llama 3.2 Vision,Camera Focus,Gaze Detection,OpenAI-Compatible LLM,MoonshotAI Kimi,Single-Label Classification Model,CogVLM,Qwen 3.6 API,Detections Consensus,Multi-Label Classification Model,LMM,OpenAI,PLC Reader,Roboflow Visual Search,EasyOCR,Roboflow Dataset Upload,Roboflow Dataset Upload,PLC Writer,Qwen 3.5 API,Anthropic Claude,Object Detection Model,MQTT Writer - outputs:
Line Counter,MoonshotAI Kimi,Stability AI Image Generation,Trace Visualization,Path Deviation,Image Stack,Anthropic Claude,Icon Visualization,SIFT Comparison,Morphological Transformation,Color Visualization,LMM For Classification,Single-Label Classification Model,Perspective Correction,Corner Visualization,Roboflow Custom Metadata,Halo Visualization,Dynamic Zone,Keypoint Detection Model,Qwen-VL,Email Notification,Halo Visualization,Object Detection Model,Google Gemma,Background Color Visualization,Ellipse Visualization,Email Notification,Twilio SMS/MMS Notification,Text Display,Polygon Visualization,Crop Visualization,Image Preprocessing,Template Matching,Model Monitoring Inference Aggregator,OpenRouter,OpenAI,Florence-2 Model,Motion Detection,Heatmap Visualization,OpenAI,Perception Encoder Embedding Model,Blur Visualization,Depth Estimation,Instance Segmentation Model,Stability AI Outpainting,Anthropic Claude,YOLO-World Model,Google Gemini,Clip Comparison,Google Gemini,Keypoint Visualization,Webhook Sink,Florence-2 Model,Current Time,Contrast Equalization,OpenAI,Moondream2,Line Counter,Google Gemini,Slack Notification,Triangle Visualization,Time in Zone,CLIP Embedding Model,Multi-Label Classification Model,Local File Sink,Keypoint Detection Model,Pixel Color Count,GLM-OCR,Roboflow Asset Library Attributes,Polygon Zone Visualization,Time in Zone,Google Gemma API,Stitch OCR Detections,Line Counter Visualization,Semantic Segmentation Model,Distance Measurement,Image Threshold,Multi-Label Classification Model,Camera Calibration,QR Code Generator,S3 Sink,Microsoft SQL Server Sink,Twilio SMS Notification,Google Vision OCR,Image Blur,Morphological Transformation,Roboflow Vision Events,Size Measurement,PTZ Tracking (ONVIF),Stability AI Inpainting,Classification Label Visualization,Stitch OCR Detections,Event Writer,Qwen3.5-VL,Mask Visualization,Llama 3.2 Vision,Reference Path Visualization,Label Visualization,OPC UA Writer Sink,Dot Visualization,Cache Set,Dynamic Crop,Detections Stitch,Circle Visualization,Llama 3.2 Vision,BoT-SORT Tracker,Path Deviation,SAM3 Video Tracker,Gaze Detection,Segment Anything 2 Model,OpenAI-Compatible LLM,MoonshotAI Kimi,Single-Label Classification Model,CogVLM,Object Detection Model,SAM 3 Interactive,Qwen 3.6 API,Detections Consensus,Bounding Box Visualization,Multi-Label Classification Model,LMM,OpenAI,SAM 3,Instance Segmentation Model,Roboflow Visual Search,Roboflow Dataset Upload,SAM 3,Cache Get,Instance Segmentation Model,Detections Classes Replacement,Pixelate Visualization,Keypoint Detection Model,Instance Segmentation Model,Roboflow Dataset Upload,PLC Writer,Qwen 3.5 API,Object Detection Model,Anthropic Claude,Time in Zone,MQTT Writer,Polygon Visualization,SAM 3,Model Comparison Visualization,Single-Label Classification Model,Seg Preview
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
MQTT Writer in version v1 has.
Bindings
-
input
host(string): Host of the MQTT broker..port(integer): Port of the MQTT broker..topic(string): MQTT topic to publish the message to..message(string): Message to be published..qos(integer): Quality of Service level for the message..retain(boolean): Whether the message should be retained by the broker..timeout(float): Timeout for connecting to the MQTT broker and for sending MQTT messages..username(string): Username for MQTT broker authentication..password(string): Password for MQTT broker authentication..
-
output
Example JSON definition of step MQTT Writer in version v1
{
"name": "<your_step_name_here>",
"type": "mqtt_writer_sink@v1",
"host": "localhost",
"port": 1883,
"topic": "sensors/temperature",
"message": "Hello, MQTT!",
"qos": 0,
"retain": true,
"timeout": 0.5,
"username": "$inputs.mqtt_username",
"password": "$inputs.mqtt_password"
}