Need to zero out rainRate and rain from time range

38 views
Skip to first unread message

Chad Hutchins

unread,
Nov 26, 2019, 2:44:11 PM11/26/19
to weewx-user
Hello!

Using sqlite3 db for a Davis Vantage Vue station on a Raspberry Pi 3. 

I need to zero (0.00) the rain rate and rain between two time ranges. I think the data is between the following unix timestamps (1574765820 1574766845) but that might not be what is exactly in the archive table.

How do I go about finding that data so that I can run the commands listed here for changing the data (except I would set to 0 instead of null) https://github.com/weewx/weewx/wiki/Cleaning-up-old-'bad'-data

Thanks,
Chad 

Andrew Milner

unread,
Nov 26, 2019, 9:34:58 PM11/26/19
to weewx-user
select * from archive where (dateTime >= 1574765820) and (dateTime <= 1574766845);

will tell you what is in the table between those values and if it is the correct range then set rainRate and rain to 0 with
update archive set rainRate = 0, rain = 0  where (dateTime >= 1574765820) and (dateTime <= 1574766845);
Reply all
Reply to author
Forward
0 new messages