能否向Cumulocity发送测量值表格而非单条数据?Option Cloudgate批量上传问询
Answers to Your Cumulocity & Option Cloudgate Questions
1. Can I send a table of measurements to Cumulocity instead of individual data points?
Absolutely! Cumulocity fully supports bulk measurement uploads—you don’t have to send each data point one by one.
To pull this off, use a POST request to the endpoint /measurement/measurements, and include an array of measurement objects in the request body. Each object can carry its own timestamp, source device ID, and measurement values. Here’s a simplified example of what the payload might look like:
{ "measurements": [ { "time": "2024-05-20T10:00:00.000Z", "source": {"id": "12345"}, "type": "ConsumptionMeasurement", "Consumption": { "value": 12.5, "unit": "kWh" } }, { "time": "2024-05-20T10:01:00.000Z", "source": {"id": "12345"}, "type": "ConsumptionMeasurement", "Consumption": { "value": 12.7, "unit": "kWh" } } ] }
This method cuts down on unnecessary API calls and is far more efficient than sending single points.
2. Is it feasible to collect consumption data every minute with an Option Cloudgate device, then upload 15 timestamped points every 15 minutes to Cumulocity?
Yes, this setup is totally workable—here’s the breakdown:
- Device configuration: The Option Cloudgate comes with built-in support for data caching and scheduled uploads. You’ll just need to tweak two core settings:
- Set the data collection interval to 1 minute, so the device captures consumption values at that frequency.
- Configure the upload schedule to trigger every 15 minutes, and set the device to package all cached 1-minute data points (with their original timestamps) into one upload request.
- Cumulocity compatibility: Cumulocity handles bulk uploads with distinct timestamps seamlessly. Each measurement in the batch will be stored with its original capture time, so you’ll keep the full granularity of your 1-minute data in the platform.
- Quick checks: Ensure your device has enough storage to cache 15 data points between uploads (this is trivial for modern gateways). Also, confirm your network connection is stable enough for periodic uploads—if there’s a disconnect, the Cloudgate should queue the data and send it once connectivity is restored.
内容的提问来源于stack exchange,提问作者danmwendo
相关产品推荐
相关产品推荐

