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:
Twilio SMS/MMS Notification,OPC UA Writer Sink,Qwen 3.6 API,SIFT Comparison,Llama 3.2 Vision,PLC Writer,JSON Parser,Distance Measurement,Roboflow Visual Search Classifier,CogVLM,MQTT Writer,Google Gemini,OCR Model,GLM-OCR,Twilio SMS Notification,Instance Segmentation Model,Google Gemma API,PTZ Tracking (ONVIF),VLM As Detector,Florence-2 Model,LMM,OpenAI,Florence-2 Model,Line Counter,LMM For Classification,Event Writer,OpenAI,Keypoint Detection Model,Google Gemma,Slack Notification,Email Notification,Perspective Correction,Camera Focus,Detections Consensus,Line Counter,Multi-Label Classification Model,OpenAI-Compatible LLM,Object Detection Model,VLM As Classifier,Google Gemini,Roboflow Vision Events,Local File Sink,Stitch OCR Detections,PP-OCR,EasyOCR,Anthropic Claude,CSV Formatter,Dynamic Zone,Motion Detection,Stitch OCR Detections,Single-Label Classification Model,Qwen 3.5 API,Current Time,PLC Reader,Camera Focus,Google Gemini,Image Stack,Qwen-VL,MoonshotAI Kimi,Microsoft SQL Server Sink,Gaze Detection,Google Vision OCR,Webhook Sink,OpenAI,VLM As Detector,Identify Outliers,Cosine Similarity,S3 Sink,MoonshotAI Kimi,Anthropic Claude,Roboflow Dataset Upload,Detection Event Log,Template Matching,VLM As Classifier,Image Contours,Anthropic Claude,Roboflow Custom Metadata,Roboflow Asset Library Attributes,Model Monitoring Inference Aggregator,Clip Comparison,Roboflow Visual Search,OpenRouter,Llama 3.2 Vision,Qwen3.5-VL,Identify Changes,Email Notification,OpenAI,Roboflow Dataset Upload,Pixel Color Count,SIFT Comparison - outputs:
Keypoint Visualization,Twilio SMS/MMS Notification,Keypoint Detection Model,OPC UA Writer Sink,Perception Encoder Embedding Model,Qwen 3.6 API,Object Detection Model,SAM 3,PLC Writer,Llama 3.2 Vision,Distance Measurement,Roboflow Visual Search Classifier,Image Threshold,Polygon Zone Visualization,CogVLM,BoT-SORT Tracker,MQTT Writer,Contrast Equalization,Google Gemini,GLM-OCR,Reference Path Visualization,Twilio SMS Notification,Instance Segmentation Model,Google Gemma API,PTZ Tracking (ONVIF),Detections Classes Replacement,Florence-2 Model,Halo Visualization,SAM 3 Interactive,Dynamic Crop,Image Blur,LMM,Seg Preview,SAM 3,Ellipse Visualization,OpenAI,Florence-2 Model,Line Counter,LMM For Classification,Time in Zone,Cache Set,Instance Segmentation Model,Event Writer,Semantic Segmentation Model,OpenAI,Path Deviation,Time in Zone,Single-Label Classification Model,Keypoint Detection Model,Google Gemma,Slack Notification,Heatmap Visualization,Email Notification,Circle Visualization,Perspective Correction,Detections Consensus,Crop Visualization,Polygon Visualization,Keypoint Detection Model,Line Counter,Multi-Label Classification Model,Stability AI Inpainting,OpenAI-Compatible LLM,SAM 3,Object Detection Model,Google Gemini,Roboflow Vision Events,Multi-Label Classification Model,Size Measurement,Local File Sink,Object Detection Model,SAM3 Video Tracker,Dot Visualization,Line Counter Visualization,Time in Zone,Instance Segmentation Model,Depth Estimation,Stitch OCR Detections,Blur Visualization,Anthropic Claude,Segment Anything 2 Model,Color Visualization,Dynamic Zone,Motion Detection,Stitch OCR Detections,Single-Label Classification Model,Qwen 3.5 API,Trace Visualization,Icon Visualization,Current Time,Cache Get,Model Comparison Visualization,QR Code Generator,Google Gemini,Detections Stitch,Image Stack,Instance Segmentation Model,Qwen-VL,Mask Visualization,MoonshotAI Kimi,Microsoft SQL Server Sink,Text Display,Gaze Detection,Stability AI Image Generation,Google Vision OCR,Webhook Sink,OpenAI,Pixelate Visualization,S3 Sink,Classification Label Visualization,MoonshotAI Kimi,Polygon Visualization,Anthropic Claude,Roboflow Dataset Upload,Morphological Transformation,Bounding Box Visualization,Template Matching,Stability AI Outpainting,Anthropic Claude,Roboflow Custom Metadata,Multi-Label Classification Model,Roboflow Asset Library Attributes,Camera Calibration,Morphological Transformation,Path Deviation,Background Color Visualization,Model Monitoring Inference Aggregator,Clip Comparison,Corner Visualization,Moondream2,Roboflow Visual Search,OpenRouter,Qwen3.5-VL,Llama 3.2 Vision,Email Notification,Single-Label Classification Model,CLIP Embedding Model,Triangle Visualization,OpenAI,Roboflow Dataset Upload,Pixel Color Count,Image Preprocessing,SIFT Comparison,YOLO-World Model,Halo Visualization,Label Visualization
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"
}