Data model¶
Storage¶
- File:
rainlog.sqlite(constantDEFAULT_DB_FILE_NAMEinrainlog) - Default location:
~/.local/share/rainlog/rainlog.sqlite(constantDEFAULT_DB_DIR) - Override:
rainlog --db-dir <path>puts the file in the given directory. - Engine: SQLite3, table created automatically:
datecolumn: Unix timestamp (seconds) for the end of the 24-hour period, normalised to 09:00:00 local time (i.e. the reading covers the 24 h ending at 09:00 on the stored calendar day).raincolumn: Millimetres (mm).
Semantics¶
- One row per logical day (unique
datebucket). get_rainaggregates raw rows byGraphGrouping(daily,weekly,monthly,yearly,annually) for the TUI chart.get_moisture_indexcomputes an exponentially decaying moving sum used in soil-moisture chart mode.
Time zone¶
Bucket boundaries use the host's local time zone at runtime (LOCAL_TZ in rainlog).