Low-Resolution tests
This query works, generating 207 minutes of low-resolution (the default) data from 2024-01-01 12:00 to 2024-01-01 15:27:
$ wget -q -O - 'http://IOTAWATT/query?select=[time.local.unix,FurnaceBlower.watts]&begin=2024-01-01T12:00&end=2024-01-01T15:27&group=auto&format=csv' | wc
206 414 3826
(The missing newline on the last output record makes wc count only 206 lines instead of 207.)
If I ask for 206 minutes of low-resolution data – one minute less (to 15:26) – I get nothing:
$ wget -q -O - 'http://IOTAWATT/query?select=[time.local.unix,FurnaceBlower.watts]&begin=2024-01-01T12:00&end=2024-01-01T15:26&group=auto&format=csv'
1704110400, null (also missing newline)
If I ask again for 206 minutes of low-resolution data but shift the start time (12:01) instead of the end time I get nothing:
$ wget -q -O - 'http://IOTAWATT/query?select=[time.local.unix,FurnaceBlower.watts]&begin=2024-01-01T12:01&end=2024-01-01T15:27&group=auto&format=csv'
1704110460, null (also missing newline)
Asking for JSON output gives: [[1704110460,null] (also missing newline and the brackets are not matched)
Asking for 206 minutes of low-resolution data from January 2025 gives the same empty result.
Asking for 206 minutes of low-resolution data from January 2026 gives 412 records (every 30 seconds):
$ wget -q -O - 'http://IOTAWATT/query?select=[time.local.unix,FurnaceBlower.watts]&begin=2026-01-01T12:00&end=2026-01-01T15:26&group=auto&format=csv' | wc
411 824 7526
High-Resolution tests
If I ask for 414 minutes of resolution=high data from 2024, it works:
$ wget -q -O - 'http://IOTAWATT/query?select=[time.local.unix,FurnaceBlower.watts]&begin=2024-01-01T12:00&end=2024-01-01T18:54&group=auto&resolution=high&format=csv' | wc
413 828 7638
If I ask for 413 minutes of resolution=high data from 2024 – one minute less (to 18:53) – I get nothing:
$ wget -q -O - 'http://IOTAWATT/query?select=[time.local.unix,FurnaceBlower.watts]&begin=2024-01-01T12:00&end=2024-01-01T18:53&group=auto&resolution=high&format=csv'
1704110400, null (also missing newline)
Questions
- Why can’t I ask for fewer than 207 minutes of low-resolution data for past years?
- Why can’t I ask for fewer than 414 minutes of high-resolution data for past years?
- Why doesn’t the last record output (both CSV and JSON) have a newline on the end?