Appearance
MQTT 数据转发
Publish device data to your MQTT broker in real-time. MQTT forwarding enables seamless integration with IoT platforms, home automation systems, and industrial applications.
Overview
Device data is automatically published to your MQTT broker, allowing subscribers to receive updates instantly.
【配图占位:设备数据发布到 MQTT Broker 并被订阅端接收的数据流图】
Quick Start
Step 1: Prepare Your MQTT Broker
- Set up an MQTT broker (or use a cloud service like HiveMQ, EMQX)
- Create credentials for YenGear IoT Cloud
- Note your broker host, port, and topic
Step 2: Create a Forwarding Profile
- Go to Org → Data Forwarding
- Click + New Profile
- Select MQTT as the type
- Enter your broker details
- Click Save
【配图占位:MQTT 转发配置弹窗截图】
Configuration Options
| Option | Required | Description |
|---|---|---|
| Host | Yes | MQTT broker hostname |
| Port | Yes | Broker port (1883 or 8883 for TLS) |
| Topic | Yes | Topic to publish messages |
| Username | No | Authentication username |
| Password | No | Authentication password |
Message Format
Messages are published as JSON:
json
{
"project_id": "proj-xyz",
"timestamp": 1709856000,
"points": [
{
"point_id": "POINT_ID_FROM_PLATFORM",
"value": 25.5,
"unit": "°C"
}
]
}Security Tips
- Use port 8883 with TLS encryption
- Create a dedicated user with publish-only permissions
- Use strong passwords
Troubleshooting
| Problem | Solution |
|---|---|
| Connection refused | Verify broker host and port |
| Authentication failed | Check username and password |
| Messages not received | Verify topic subscription pattern |
| TLS errors | Ensure TLS is properly configured |
Use Cases
- Real-time Monitoring: Subscribe to device updates instantly
- Home Automation: Integrate with Home Assistant, OpenHAB
- Industrial IoT: Connect to SCADA systems
- Cloud Platforms: Stream to AWS IoT, Azure IoT Hub
Need Help?
Contact us at hi@yengear.com for technical support.
