Dataset: Energy Consumption
Dataset name:
ds_energy_consumption
Description
Stores detailed level energy consumption at watts
Fields in this dataset
Name | Field Name | Description | Field Type | Field Example |
---|---|---|---|---|
Created Timestamp |
created_timestamp
|
Timestamp of when record was created in PDS | int | 1641909333 |
Home ID |
field_energy_homeid
|
The HomeID where the device is located | int | 1 |
Reading timestamp |
field_energy_reading_timestamp
|
The data and time for a specific reading | int | 1648633780 |
Reading Value |
field_energy_reading_value
|
The data for a specific reading | int | 1123.25 |
Source ID |
field_energy_source_index_id
|
unique identifier for the source device | text | 1 |
Source Name |
field_energy_source_name
|
A human meaning ful label for the source device | text | Kettle |
Source Type |
field_energy_source_type
|
Source Device | text | CAD |
Updated Timestamp |
updated_timestamp
|
Timestamp of when record was last updated in PDS | int | 1641909333 |
Making an API request for this Dataset
Example Request to the Sandbox Server
http://sbx-api.mydex.org/api/pds/transaction/UID.json ?key=KEY &api_key=API_KEY &con_id=CON_ID &source_type=connection &dataset=ds_energy_consumption &instance=N
Replace the following with your own details: UID
KEY
, API_KEY
, CON_ID
and instance N
.
Replace sbx-api
with api
when making a connection to a real member on the production server (must be authenticated).
To return the data in XML, change UID.json
to UID.xml
.
Example Response
A response to this API request will be structured as follows.
{ "null": { "id": "null", "ds_id": "null", "created_timestamp": "1641909333", "field_energy_homeid": "1", "field_energy_reading_timestamp": "1648633780", "field_energy_reading_value": "1123.25", "field_energy_source_index_id": "1", "field_energy_source_name": "Kettle", "field_energy_source_type": "CAD", "updated_timestamp": "1641909333" } }