Welcome to K230 Vision Module repository
9. MQTT Quick Start
MQTT Tutorial
What is MQTT?
MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol designed based on the publish/subscribe pattern. Initially developed by IBM, it has become one of the standard protocols in the Internet of Things (IoT) field.
Main Features
Advantages
Lightweight
- Simple protocol, low resource consumption
- Suitable for bandwidth-constrained networks
- Supports low-power devices
Reliability
- Provides three Quality of Service (QoS) levels
- Supports connection recovery
- Persistent sessions
Flexibility
- Supports multiple communication patterns
- Flexible topic configuration
- Supports one-to-many communication
Disadvantages
Functional Limitations
- Not suitable for large file transfers
- No built-in security mechanisms
- Requires additional Broker server
Dependencies
- Depends on centralized Broker
- Single point of failure risk
Typical Use Cases
1. Smart Home
Example Topics:
- home/livingroom/light/status
- home/livingroom/light/control
2. Industrial Monitoring
3. Connected Vehicles
Vehicle location tracking
Remote diagnostics
Real-time status monitoring
Basic Concepts
Publish-Subscribe Pattern
MQTT Components
MQTT Topics
Topics are organized in a hierarchical structure, with slashes (/) separating each level.
QoS Levels
MQTT provides three quality of service levels:
Retained Messages
Last Will and Testament
Code Examples
For code examples, please refer to the Yabo Smart K230 tutorial MQTT-Publisher and MQTT-Subscriber sections