Explain
Explain
GET /v1/devices/{id}/explain and POST /v1/explain { device, from?, to? } (POST /v1/explain) answer the same: everything that may explain what a device did between from and to (epoch milliseconds; the last 24 hours by default):
- activity log entries for the device, each with its cause (a person, an automation, a schedule, an integration);
- automations and gateway schedules that target it;
- the unit's own (cached) schedules, its auto or eco mode and touch settings;
- sensors in the same room that triggered;
- integrations (the API, Google, Alexa, Matter, HomeKit, Home Assistant) that sent it commands.
Every item says whether it is live (the gateway's own log and objects) or cached (what the unit last confirmed). Only exposed items appear. Word cached items as "based on the last available data".
Examples
Why did the kitchen light turn on last night?
POST /v1/explain
{
"device": "8F3K2M9Q4T7W:5b0e6c1a-2f4d-4c3b-9a8e-7d6f5e4c3b2a:u-kitchen-light",
"from": 1760738400000,
"to": 1760767200000
}
Answer 200:
{
"house": "Cohen Home",
"device": "8F3K2M9Q4T7W:5b0e6c1a-2f4d-4c3b-9a8e-7d6f5e4c3b2a:u-kitchen-light",
"from": 1760738400000,
"to": 1760767200000,
"items": [
{
"kind": "activity",
"source": "live",
"entry": {
"at": 1760745600000,
"device": "8F3K2M9Q4T7W:5b0e6c1a-2f4d-4c3b-9a8e-7d6f5e4c3b2a:u-kitchen-light",
"what": "on",
"cause": {
"source": "automation",
"name": "Arrive home"
}
}
},
{
"kind": "automation",
"source": "live",
"id": "a-arrive",
"name": "Arrive home",
"enabled": true
},
{
"kind": "unit_setting",
"source": "cache",
"intent": "off_after_no_motion",
"value": 10,
"asOf": 1760781000000
}
],
"note": "Live items come from the gateway's log and objects; cached ones are what the unit last confirmed (it may have changed at the unit since)."
}
IGH home API 1.1.0. Generated from the doc source; do not edit.