Meter_V2_Hours

Get hourly data from a single device meter.

You can enter a range of dates to get the data for that period.

/v2/meters/hours/<dev-id>/?start=XXX&end=XXX

Arguments

  • dev_id [*]: Device id number

  • start: (Optional) (yyyy-mm-dd hh:ii:ss) Start date of search interval.

  • end: (Optional) (yyyy-mm-dd hh:ii:ss) End date of search interval.

Response

JSON object with the result. May return the following errors:

  • 404 Not found : No device found or don't have rights to get data
  • 400 Wrong plant or meter id: The id format is incorrect
  • 204 No data found: The data entered have not produced any results

Example

Get all meters data (hourly) in for device_id 5

GET /v2/meters/hours/5 HTTP/1.1
Host: apiexternal.mvscada.com
MV-API-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Content-Type: application/json

Response

{
    "plant": "XXXXXXXX",
    "start": "2017-04-10 00:00:00",
    "end": "",
    "meters": [
        {
            "inst_id": "XXXXXXX_01",
            "reactivaq1": 0,
            "reactivaq2": 1,
            "reactivaq3": 0,
            "reactivaq4": 10,
            "datetime": "2017-04-10 00:00:00",
            "activa_consumida": 0,
            "activa_generada": 100
        },
        {
            "inst_id": "XXXXXXX_01",
            "reactivaq1": 0,
            "reactivaq2": 1,
            "reactivaq3": 10,
            "reactivaq4": 0,
            "datetime": "2017-04-10 01:00:00",
            "activa_consumida": 1,
            "activa_generada": 38
        },
        {...}
    ]
}

Other examples

Get all datas of all meters between requested dates

/v2/meters/hours/<dev-id>/?start=2017-03-30 08:00:00&end=2017-03-31 08:00:00