Cost & Consumption for Single Device
Returns cost and consumption information about a single device in a user's Home Area Network (HAN).
Given the id of a HAN device that can measure consumption data, such as the Tendril Load Control Switch (30 AMP relay), the ThinkEco Modlet SE, or the Jetlun Panel Meter and Jetlun Current Transducer devices, this call returns the cost and consumption data captured by the user's device. Returns a 404 response code if the user has no HAN devices. Note: In the Try It section, select a sample user who has HAN devices: andrew.wood@tendril.com, kim.deal@tendril.com, or nash.kato@tendril.com.
Given the id of a HAN device that can measure consumption data, such as the Tendril Load Control Switch (30 AMP relay), the ThinkEco Modlet SE, or the Jetlun Panel Meter and Jetlun Current Transducer devices, this call returns the cost and consumption data captured by the user's device.
→ Request
→ Request
← Response200 OK
{
"@toDate": "2011-12-31T00:00:00.000+00:00",
"@fromDate": "2011-11-01T00:00:00.000+00:00",
"@deviceId": "804f58aaaaaa0010",
"cost": "7.36",
"consumption": 81.82654,
"componentList": {
"component": [
{
"@actualReadingsCount": 24,
"@toDate": "2011-11-01T06:00:00.000+00:00",
"@fromDate": "2011-11-01T00:00:00.000+00:00",
"cost": "0.05",
"consumption": 0.57609,
"componentList": {
"component": [
{
"@peak": false,
"@rateKey": "A",
"cost": "0.03",
"consumption": 0.40823
},
{
"@peak": true,
"@rateKey": "B",
"cost": "0.02",
"consumption": 0.16786
}
]
}
},
{
"@actualReadingsCount": 2717,
"@toDate": "2011-12-01T07:00:00.000+00:00",
"@fromDate": "2011-11-01T06:00:00.000+00:00",
"cost": "4.07",
"consumption": 44.73632,
"componentList": {
"component": [
{
"@peak": false,
"@rateKey": "A",
"cost": "2.66",
"consumption": 33.36507
},
{
"@peak": true,
"@rateKey": "B",
"cost": "0.74",
"consumption": 6.65634
},
{
"@peak": true,
"@rateKey": "C",
"cost": "0.67",
"consumption": 4.71491
}
]
}
},
{
"@actualReadingsCount": 2841,
"@toDate": "2011-12-31T00:00:00.000+00:00",
"@fromDate": "2011-12-01T07:00:00.000+00:00",
"cost": "3.24",
"consumption": 36.51413,
"componentList": {
"component": [
{
"@peak": false,
"@rateKey": "A",
"cost": "2.22",
"consumption": 27.8952
},
{
"@peak": true,
"@rateKey": "B",
"cost": "0.54",
"consumption": 5.17171
},
{
"@peak": true,
"@rateKey": "C",
"cost": "0.48",
"consumption": 3.44721
}
]
}
}
]
}
}<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deviceCostAndConsumption xmlns="http://platform.tendrilinc.com/tnop/extension/ems"
xmlns:ns2="http://iec.ch/TC57/2009/MeterReadings#"
xmlns:ns3="http://platform.tendrilinc.com/tnop/extension/ems/logicalgroup"
xmlns:ns4="http://platform.tendrilinc.com/tnop/extension/ems/buildingmodel"
toDate="2011-12-31T00:00:00.000+00:00" fromDate="2011-11-01T00:00:00.000+00:00" deviceId="804f58aaaaaa0010">
<cost>7.36</cost>
<consumption>81.82654</consumption>
<component actualReadingsCount="24" toDate="2011-11-01T06:00:00.000+00:00" fromDate="2011-11-01T00:00:00.000+00:00">
<cost>0.05</cost>
<consumption>0.57609</consumption>
<component peak="false" rateKey="A">
<cost>0.03</cost>
<consumption>0.40823</consumption>
</component>
<component peak="true" rateKey="B">
<cost>0.02</cost>
<consumption>0.16786</consumption>
</component>
</component>
<component actualReadingsCount="2717" toDate="2011-12-01T07:00:00.000+00:00" fromDate="2011-11-01T06:00:00.000+00:00">
<cost>4.07</cost>
<consumption>44.73632</consumption>
<component peak="false" rateKey="A">
<cost>2.66</cost>
<consumption>33.36507</consumption>
</component>
<component peak="true" rateKey="B">
<cost>0.74</cost>
<consumption>6.65634</consumption>
</component>
<component peak="true" rateKey="C">
<cost>0.67</cost>
<consumption>4.71491</consumption>
</component>
</component>
<component actualReadingsCount="2841" toDate="2011-12-31T00:00:00.000+00:00" fromDate="2011-12-01T07:00:00.000+00:00">
<cost>3.24</cost>
<consumption>36.51413</consumption>
<component peak="false" rateKey="A">
<cost>2.22</cost>
<consumption>27.89520</consumption>
</component>
<component peak="true" rateKey="B">
<cost>0.54</cost>
<consumption>5.17171</consumption>
</component>
<component peak="true" rateKey="C">
<cost>0.48</cost>
<consumption>3.44721</consumption>
</component>
</component>
</deviceCostAndConsumption>| Param | Summary | Values | Default |
|---|---|---|---|
| user-id Type: string Style: template Required | The user's ID, which was generated by Tendril Connect when the user record was added to the database. | A valid value is | |
| account-id Type: string Style: template Required | The user's account ID. Intended for future use when each consumer may have more than one account. | A valid value is | |
| location-id Type: string Style: template Required | The user's location ID. Intended for future use when each consumer may have more than one location. | A valid value is | |
| device-id Type: string Style: template Required | The unique, 16-character EUI-64 identifier assigned to the device for which you want to retrieve its consumption data. If you do not know whether a user has HAN devices and the | For andrew.wood, 804f58aaaaaa0358 | |
| resolution Type: string Style: template Required | The resolution of the consumption data to return. |
| No default value. |
| from Type: datetime Style: matrix | The start date and time for the returned data. | Date and time in this format: | The first available record. |
| to Type: datetime Style: matrix | The end date and time for the returned data. | Date and time in this format: | The last available record. |
| limit-to-latest Type: string Style: matrix | The total number of records to be returned. | Integers greater than zero. | All records in the date range, up to the system limit. |
| include-submetering-devices Type: boolean Style: matrix | Whether to include the data for each submetering device found in the HAN, such as a ThinkEco Modlet SE smart outlet, or a Tendril Load Control Switch. |
| false |
| deviceCostAndConsumption | root element |
Top level element. Attributes include the date range and the | |
| cost float | child of deviceCostAndConsumption |
Total cost for the entire range. | |
| consumption float | child of deviceCostAndConsumption |
Total consumption for the entire range in kWh. | |
| component | child of deviceCostAndConsumption |
Cost and consumption data point. | |
| cost float | child of component |
Cost for this range. | |
| consumption float | child of component |
Consumption for this range in kWh. | |
| component float | child of component |
Cost and consumption broken down by rates. | |
| cost float | child of component |
Cost for this rate. | |
| consumption float | child of component |
Consumption for this rate. | |
| subMeteringDetails | child of deviceCostAndConsumption |
Information about submetering devices, if requested. | |
| deviceCostAndConsumption | child of subMeteringDetails |
Device cost and consumption data. | |
| cost float | child of deviceCostAndConsumption |
Total cost for this device and range. | |
| consumption float | child of deviceCostAndConsumption |
Total consumption for this device and range. | |
| component | child of deviceCostAndConsumption |
Cost and consumption data point. | |
| cost float | child of component |
Cost for this device and rate. | |
| consumption float | child of component |
Consumption for device and rate. | |
Returns a 404 response code if the user has no HAN devices. On the Try It form, select a sample user who has HAN devices, and use one of the following device IDs:
andrew.wood@tendril.com: 804f58aaaaaa0358
kim.deal@tendril.com: 804f58aaaaaa0370
nash.kato@tendril.com: 804f58aaaaaa0360