get_historical_readings
Retrieve historical temperature, humidity, VPD, and port readings from AC Infinity controllers over a date range with customizable sampling intervals.
Instructions
Query AC Infinity environment data across a date range with configurable sampling.
Args: device_id: The AC Infinity device code (from discover_devices) start_date: Start date in YYYY-MM-DD format end_date: End date in YYYY-MM-DD format sample_interval: Bucket size for averaging readings. Use "raw" for all records unmodified, or a duration string like "1m", "5m", "15m", "30m", "1h", "2h", "6h", "12h", "1d". "daily" is accepted as an alias for "1d". Default: "1h" (one averaged reading per hour). time_start: Optional UTC time filter in HH:MM format (e.g., "16:00"). If provided, only readings at or after this time are returned. Invalid HH:MM strings return a structured error. Note: time_start/time_end filters are in UTC. Use discover_devices to get the device's timezone for conversion. time_end: Optional UTC time filter in HH:MM format (e.g., "16:15"). If provided, only readings at or before this time are returned. Invalid HH:MM strings return a structured error.
When both bounds are set and time_start > time_end (e.g. "22:00"–"06:00"),
the window crosses midnight: the OR of [time_start, 24:00) and
[00:00, time_end] is returned.Returns:
JSON with "readings" list and "statistics" summary. Each reading contains
timestamp, temperature_c/f, humidity, vpd, and ports list. Statistics include
min/avg/max per metric across the returned window. If any readings were dropped
because their timestamps could not be parsed, the response also includes
"dropped_readings" (count) and "drop_reason". See docs/API.md for full
shape.
On failure returns ``{"error": "...", "detail": "..."}``.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | ||
| start_date | Yes | ||
| end_date | Yes | ||
| sample_interval | No | 1h | |
| time_start | No | ||
| time_end | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |