Device Interactions

Get Device Analytics

Changed on

Total usage figures. Fans report energy used and running time. Water purifiers report water saved and UV lamp running time.

Smart locks have no analytics. With device_id=all, locks are left out. Asking for a lock by its device_id returns a 400.

If a device has never reported these counters, the fields are null, not zero. This way you can tell "no data yet" apart from a real zero.

Fan figures

FieldUnitMeaning
power_consumptionkWhTotal energy used
runtimehoursTotal running time

Water purifier figures

FieldUnitMeaning
water_saved_literslitresWater a comparable 25% recovery unit would have sent to drain (the RO you replaced with Intellon most likely had 25% recovery)
uv_runtime_hourshoursTotal UV lamp running time. Useful for planning lamp replacement

water_saved_liters is calculated as RO litres x 1.5 + UF litres x 3.

The response key is device_state, not device_analytics. The name is kept so existing integrations keep working.

Request

WhereNameRequiredValue
Headerx-api-keyYesYour developer API key.
HeaderAuthorizationYesBearer <access_token>
Querydevice_idYesOne device_id, or all for every supported device.

No request body. There is no date range. The figures are lifetime totals reported by the device.

Response

{
  "status": "Success",
  "message": {
    "device_state": [
      { "device_id": "6867258b9d78", "power_consumption": 41.2, "runtime": 613.5 },
      { "device_id": "a0764ee4210c", "water_saved_liters": 1284.5, "uv_runtime_hours": 219.0 }
    ]
  }
}

Only fans and water purifiers have analytics. With device_id=all, devices without analytics are left out.

get/get_device_analytics

Request

  • Base URL
    https://api.developer.atomberg-iot.com/v2
  • Auth
    API key in header x-api-key and HTTP bearer

Query parameters

device_idstring required

One device_id, or all for every supported device.

Response

OK

statusstring

Success on a 2xx, Error otherwise.

Example response

{
  "status": "Success"
}

Changes