Meters

Get a list of electric meters in the plant or a particular meter for an installation with the data of the current time.

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

/v1/<plant>/meters/<inst>/?start=XXX&end=XXX

For devices please see: /v1/meters

Arguments

  • plant [*]: Name of the plant.
  • inst: (Optional) Name of the inst/meter.

  • start: (Optional) (yyyy-mm-dd hh:ii:ss) Start date of search interval.
    If you only enter the start date it will show the reading of that moment.

  • end: (Optional) (yyyy-mm-dd hh:ii:ss) End date of search interval.
    Can not be greater than the current date or the difference
    between dates can not be greater than 32 days

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
  • 400 Bad Dates: Dates entered are incorrect
  • 204 No data found: The data entered have not produced any results

Example

Get all inverters data (last quarter) in DonBenito2 plant

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

Response

{
    "plant": "DonBenito2",
    "start": "2017-04-10 17:30:00",
    "end": "",
    "meters": [
        {
            "inst_id": "DonBenito2_01",
            "reactivaq1": 5814,
            "reactivaq2": 1857,
            "reactivaq3": 107887,
            "reactivaq4": 40606,
            "datetime": "2017-04-10 17:30:00",
            "activa_consumida": 7604,
            "activa_generada": 1999475
        },
        {
            "inst_id": "DonBenito2_02",
            "reactivaq1": 0,
            "reactivaq2": 8,
            "reactivaq3": 147890,
            "reactivaq4": 73124,
            "datetime": "2017-04-10 17:30:00",
            "activa_consumida": 2219,
            "activa_generada": 2002659
        },
        {...}
    ]
}

Other examples

Get the last data of all meters in the plant 'DonBenito2'.

/v1/DonBenito2/meters/

Get the last data of a single meter 'Donbenito2_01' in the plant 'DonBenito2'

/v1/DonBenito2/meters/Donbenito2_01/

Get all datas of all meters between requested dates

/v1/DonBenito2/meters/?start=2017-03-30 08:00:00&end=2017-03-31 08:00:00