Correct data in weewx.sdb

113 views
Skip to first unread message

bgra...@umw.edu

unread,
Sep 18, 2023, 3:37:41 PM9/18/23
to weewx-user
Hello all,
A squirrel has placed a few items in my VP2 rain bucket and caused me to lose .44 inches of rain today.
What is the easiest way to modify the incorrect rain count and have all reports show this modified amount? The answer is probably easy but I can’t seem to figure this out. I need to add .44 inch to today’s total. I’m using weewx 4.10.1, ubuntu, and SQLight.
Thanks in advance.
Bob

Greg Troxel

unread,
Sep 18, 2023, 3:40:50 PM9/18/23
to bgra...@umw.edu, weewx-user
You need to figure out which 5min bins that rain belongs in, and then
hand-type sql to modify the database. Make 3 backups first, with one
of them off site. But seriously, hand-typing sql is dangerous.

then, you will need to regenerate summary records.

if you aren't used to sql, read a book on that and sqlite3 before you start.

weewx-user

unread,
Sep 19, 2023, 7:41:20 AM9/19/23
to weewx-user
Thanks, Greg. I have modified weewx.sdb and added my extra rain but am not sure how to regenerate lists and graphs to incorporate the new data. Is there a list somewhere of things to delete to be rebuilt? I removed the NOAA* files and *.html but no change. I also need to recheck to be certain that the added data is actually there. Much appreciated for the help.
Bob  

Rainer Lang

unread,
Sep 19, 2023, 8:01:06 AM9/19/23
to weewx-user

sent my reply only privately by mistake - here for the group to benefit to the group too

-------- Forwarded Message --------
Subject: Re: [weewx-user] Correct data in weewx.sdb
Date: Tue, 19 Sep 2023 13:58:30 +0200
From: Rainer Lang <lang....@googlemail.com>
To: bgra...@umw.edu <bgra...@umw.edu>


the easiest way imo is to use sqlitebrowser.

sudo apt-get install sqlitebrowser
then
sudo sqlitebrowser /var/lib/weewx/weewx.sdb   
or wherever your weewx.sdb is located
(when you start sqlitebrowser without indicating the database name and load the database from within sqlitebrowser, it will be in read-only mode)
go to Browse Data, go to the end of file (bottom left >| )
locate your time stamp (EPOCH notation, first colum), go to the rain colum (slider)
change the value in the respective field (you will have to move the cursor off that filed into another one, otherwise the change will not be recognized)
go to "File" -> "Write changes..." - make sure you don't write the changes at the same time when weewx archives data (usually every full 5 minutes) - otherwise the database will get locked foer weewx
i.e. do it between minute archive +1 and archive +4 minutes 😎
then rebuild the daily summaries with wee_database

On 18.09.2023 21:37, bgra...@umw.edu wrote:
Hello all,
A squirrel has placed a few items in my VP2 rain bucket and caused me to lose .44 inches of rain today.
What is the easiest way to modify the incorrect rain count and have all reports show this modified amount? The answer is probably easy but I can’t seem to figure this out. I need to add .44 inch to today’s total. I’m using weewx 4.10.1, ubuntu, and SQLight.
Thanks in advance.
Bob
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c53078bb-fb5f-4052-96c7-8f5a3acb1364n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages