Appearance
MongoDB 数据转发
Store device data directly in your MongoDB database. MongoDB forwarding is perfect for building custom analytics, dashboards, and applications with flexible document storage.
Overview
Device data is automatically stored as documents in your specified MongoDB collection, ready for querying and analysis.
【配图占位:设备数据写入 MongoDB 的数据流图】
Quick Start
Step 1: Prepare Your MongoDB
- Create a MongoDB database (MongoDB Atlas recommended)
- Create a collection for device data
- Get your connection string
Step 2: Create a Forwarding Profile
- Go to Org → Data Forwarding
- Click + New Profile
- Select MongoDB as the type
- Enter your MongoDB URI and collection name
- Click Save
【配图占位:MongoDB 转发配置弹窗截图】
Configuration Options
| Option | Required | Description |
|---|---|---|
| MongoDB URI | Yes | Your database connection string |
| Collection | Yes | Target collection name |
| Name | No | A friendly name for this profile |
| Priority | No | Execution order (higher = earlier) |
Data Format
Each device reading is stored as a document:
json
{
"project_id": "proj-xyz",
"timestamp": 1709856000,
"points": [
{
"point_id": "POINT_ID_FROM_PLATFORM",
"value": 25.5,
"unit": "°C"
}
]
}Security Tips
- Use a dedicated database user with write-only permissions
- Enable SSL/TLS encryption
- Add YenGear IoT Cloud IPs to your whitelist if using IP restrictions
Troubleshooting
| Problem | Solution |
|---|---|
| Connection failed | Verify your connection string is correct |
| Authentication error | Check username and password |
| Write failed | Ensure the user has write permissions |
| Timeout | Check firewall settings and IP whitelist |
Use Cases
- Historical Analysis: Query past device readings
- Custom Dashboards: Build visualizations with MongoDB aggregations
- Application Integration: Use data in your MongoDB-based apps
Need Help?
Contact us at hi@yengear.com for technical support.
