query
Retrieve IoTaWatt time-series data from on-device logs by selecting channels, time range, and aggregation; run discover first for valid channel names.
Instructions
Flexible IoTaWatt time-series query against the on-device log. Use discover first to know valid channel names. Results come back one row per line. The device stops sampling while it answers, so prefer a few well-scoped queries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End time: s=now, d+1d=end of today | s |
| begin | No | Start time: d=today midnight, d-7d=7 days ago, s-3600s=1hr ago, 2026-02-17T06:00 (no seconds: firmware bug) | d |
| group | No | Aggregation interval: seconds in multiples of 5 (5s, 10s, 30s), then 1m, 5m, 15m, 1h, 1d, 1w, 1M, 1y, "auto", or "all" for a single row. 5 second data is kept for about a year, 1 minute data for longer. | 1h |
| limit | No | Maximum rows. The device default is 1000. A result cut short at the limit is flagged with a note. | |
| format | No | csv is more compact for long results. | json |
| select | Yes | Series to return. Put "time.local.iso" first for timestamps. A bare channel name returns its default unit (Watts for power channels, Volts for voltage). Append a unit to change it: .watts .wh .amps .va .var .varh .pf for power channels, .volts .hz for voltage. Append .d2 (or another digit) to set decimal places, e.g. Mains.pf.d3. | |
| missing | No | null |