Get one PitCanary's history
get_device_historyReturns measurements over time for a single sensor rather than a room. Takes the same window and metric filter as the room history, and is the one to use when a device changed rooms during the period. Requires a PitCanary account.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"device_id": "<device_id>",
"from": "<from>",
"to": "<to>",
"metrics": "<metrics>"
},
"name": "get_device_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Last day, YYYY-MM-DD. At most 31 days after from. | |
| from | Yes | First day, YYYY-MM-DD. | |
| metrics | Yes | One to four of: temp (°C), hum (% relative humidity), co2 (ppm), voc (VOC index, 100 is the room's own baseline), nox (NOx index), dba (sound, dBA), lux (light), uv (raw sensor output, not a UV index), daylight (share of the light that is daylight, %), cct (colour temperature, K), blue_light (blue share of the spectrum, %), flicker (%), occ (how busy the room was, %, never a headcount), pressure (hPa), vibration (mg), comfort (room score). The names are the keys each bucket carries. | |
| device_id | Yes | The PitCanary id, as returned by list_devices, or active_device_id in list_rooms. |