Appearance
MongoDB Forwarding
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.
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
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
{
"device_id": "d-1000-abc",
"project_id": "proj-xyz",
"timestamp": 1709856000,
"factors": [
{
"agri_id": "d-1000-abc-1-00",
"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 [email protected] for technical support.
