Page 1 of 1

Short log: allow 14/30 days (opt-in) and keep a database-set value in the settings page

Posted: Tuesday 06 October 2026 18:04
by kimhav
Short Log Sensors is limited to 1–7 days in Setup. This was discussed in #920 (2016) and PR #2191 (2018), and the advice was to set 5MinuteHistoryDays directly in the database at your own risk.

Two things have changed since then:
  1. *Many installations now run on SSD/NVMe (for example a Pi 5). On my system with 187 short-log devices, the short log grows about 2.8 MB/day, so 30 days is about 85 MB in total. That is small for current hardware.
  2. The database workaround is fragile. If 5MinuteHistoryDays is set to 30, the Settings page shows an empty Short Log field. Saving any setting can then overwrite it and silently delete the history.
Proposal:
  • The Settings page shows and keeps any stored value (bug fix, no behaviour change for others).
  • Add opt-in 14 and 30 days, with a note about database size.
  • For a range longer than 7 days, the server returns downsampled points (for example 30 min or 1 h), and full 5-minute detail when zooming in. This keeps graph traffic at today's level, which was the main concern in #2191.
Happy to help test or contribute a PR.