This endpoint returns data as a CSV file from one or multiple sensors, or sums of sensors for different
granularities and time frames.
Using the parameters, the different granularities, time frames, selected fields and sensor IDs can be specified.
Additionally, instead of a simple sensor ID, an operation object can be specified to perform calculations with power values.
Operation objects can be used to compute sums of power values over multiple sensors. Sums are only calculated over active power (only field "p").
Each sensor in an operation object requires a sign ("POS" / "NEG") allowing for subtraction of individual sensor's power values.
An example operation object looks as follows:
{
"operation": "SUM",
"label": "my label",
"sensor_ids": [
{
"sign": "POS",
"sensor_id": "_id1_"
},
{
"sign": "NEG",
"sensor_id": "_id2_"
}
]
}
Note that for ten-second values (i.e. granularity="t"), only the fields p, q, and pf are available.
Example Requests:
/download/csv?sensor_ids=["_id1_","_id2_"]&granularity=d&start_time=2023-01-01T00:00:00Z&end_time=2023-01-02T00:00:00Z&fields=["p","i"]
/download/csv?sensor_ids=["_id1_","_id2_",{"operation": "SUM", "label": "my label", "sensor_ids": [{"sign": "POS", "sensor_id": "_id1_"}, {"sign": "NEG", "sensor_id": "_id2_"}]}]&granularity=d&start_time=2021-11-20 00:00:00&end_time=2021-11-21 00:00:00&fields=["u","i","p"]
Limit
The result size is limited depending on the granularity.
Note that the limit values apply to the total number of returned lines, not per sensor.
Granularity | Limit |
---|
d | 3'650 (10 y) |
h | 4'320 (6 mo) |
q | 2'880 (1 mo) |
m | 2'880 (2 d) |
ts | 4'320 (12 h) |