WeeWX import¶
Purpose¶
rain weewx-import copies daily rain from a WeeWX archive SQLite database into the MyWeather.sqlite schema used by rain.
Source query¶
The importer runs:
sumis assumed to be inches in the WeeWX database and is multiplied by 25.4 to store millimetres inrain_daily.rain.dateTimeis written intorain_daily.dateas provided by WeeWX for each archive day row.
Target¶
Rows are inserted into rain_daily in the database opened via --db-dir / MyWeather.sqlite.
Typical usage¶
# Default paths: ./weewx.sdb → ./MyWeather.sqlite
rain weewx-import
rain weewx-import --weewx-db /var/lib/weewx/weewx.sdb --db-dir ~/weather-data
Caveats¶
- Ensure WeeWX day boundaries align with how you want your 09:00-based buckets to behave; mixing schemas without checking can offset a day.
- Duplicate keys on
datewill cause SQLite errors on re-import; for a clean re-import, use a fresh DB or clear rows first.