Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Description

Returns the breakdown of energy per appliance on a specific service location during a specified range of time. The call supports different aggregation levels to obtain different levels of details.

Resource URL

https://app1pub.smappee.net/dev/v3/servicelocation/[SERVICELOCATIONID]/costanalysis

HTTP method

GET

HTTP header

Authorization: Bearer [ACCESS_TOKEN]

(info) [ACCESS_TOKEN] being the access token received from the Get token or Refresh token authentication calls.

Parameters

ParameterTypeDescription
SERVICELOCATIONIDPath ParameterThe actual id of an accessible service location (see Get Servicelocations)
aggregationQuery Parameter

The level of detail and should be one of:

  • 3 to obtain monthly values
  • 4 to obtain yearly values
fromQuery ParameterThe UTC timestamp in milliseconds indicating the beginning of the requested period
toQuery ParameterThe UTC timestamp in milliseconds indicating the end of the requested period

Example

http://app1pub.smappee.net/dev/v3/servicelocation/123/costanalysis?aggregation=1&from=1388534400000&to=1391212800000

Result

[
  {
    "appliance": {
      "id": "NILM-36",
      "name": "Vacuum cleaner",
      "type": "VACUUM_CLEANER"
    },
    "usage": {
      "value": 0.15,
      "unit": "KILO_WATT_HOUR"
    },
    "cost": {
      "currency": "EUR",
      "value": 0.03
    }
  },
  {
    "appliance": {
      "id": "NILM-23",
      "name": "Washing machine",
      "type": "WASHING_MACHINE"
    },
    "usage": {
      "value": 15.592,
      "unit": "KILO_WATT_HOUR"
    },
    "cost": {
      "currency": "EUR",
      "value": 3.43
    }
  },
  {
    "appliance": {
      "id": "NILM-48",
      "name": "Refrigerator",
      "type": "REFRIGERATOR"
    },
    "usage": {
      "value": 1.952,
      "unit": "KILO_WATT_HOUR"
    },
    "cost": {
      "currency": "EUR",
      "value": 0.43
    }
  }
]


Content

  • No labels