Get Cost analysis

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]

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

Parameters

Parameter

Type

Description

SERVICELOCATIONID

Path Parameter

The actual id of an accessible service location (see Get Servicelocations)

aggregation

Query Parameter

The level of detail and should be one of:

  • 3 to obtain monthly values

  • 4 to obtain yearly values

from

Query Parameter

The UTC timestamp in milliseconds indicating the beginning of the requested period

to

Query Parameter

The 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