Last Updated on : 2023-06-15 05:53:09
Query energy statistics data of devices in a space within a specified time range, including the usage, generation, or dump statistics regarding water, electricity, and natural gas.
GET: /v1.0/iot-03/energy/{energy_type}/devices/statistics-trend
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
energy_type | String | uri | true | The energy type. Set the value to electricity . |
energy_action | String | query | true | The energy behavior. Set the value to consume , representing energy consumption. |
statistics_type | String | query | true | The statistical type. Valid values:
|
start_time | String | query | true | The start time. |
end_time | String | query | true | The end time. |
device_id | String | query | true | The device ID. |
Parameter name | Type | Description |
---|---|---|
result | List |
Description of result
Parameter name | Type | Description |
---|---|---|
time | String | The time. |
value | Float | The energy data. |
GET: /v1.0/iot-03/energy/electricity/devices/statistics-trend?energy_action=consume&statisticsType=hour&startTime=2021092316&endTime=2021092318&deviceId=xxx
{
"result": [
{
"time": "2021092316",
"value": 0
},
{
"time": "2021092317",
"value": 0
},
{
"time": "2021092318",
"value": 0
}
],
"t": 1632465751328,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback