How do I remove all the existing data and start again?

3,650 views
Skip to first unread message

Dave Jeffries

unread,
Jul 12, 2015, 4:28:32 PM7/12/15
to weewx...@googlegroups.com
Have searched but not found an easy solution to resetting the database.
I have been running weewx version 3.1 using the simulator  and then connected my real ws23xx weather station.
How do I get rid of all the simulator data and start again?
Cheers
Dave

Thomas Keffer

unread,
Jul 12, 2015, 4:44:54 PM7/12/15
to weewx-user
You did not say what installation method you used. In any case, uninstall instructions are included in the appropriate document that covers installation. See the User's Guide, section Installation methods for a list of these documents.

-tk

--
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.
For more options, visit https://groups.google.com/d/optout.

Dave Jeffries

unread,
Jul 12, 2015, 5:16:55 PM7/12/15
to weewx...@googlegroups.com
I used the setup.py method, just thought there may be a simple command  to remove all the existing data.
I guess the weewx.conf and skin.conf will be overwritten so will have to take a copy first?

mwall

unread,
Jul 12, 2015, 5:28:49 PM7/12/15
to weewx...@googlegroups.com, dave.jef...@gmail.com
On Sunday, July 12, 2015 at 5:16:55 PM UTC-4, Dave Jeffries wrote:
I used the setup.py method, just thought there may be a simple command  to remove all the existing data.
I guess the weewx.conf and skin.conf will be overwritten so will have to take a copy first?

if you do not care about any of the data in the database, then just stop weewx, delete the database file (/home/weewx/archive/weewx.sdb), then start weewx.

if you want to surgically remove data from the database, do something like this:

sqlite3 /home/weewx/archive/weewx.sdb
sqlite> delete from archive where dateTime < X;

where X is the timestamp (unix epoch) after which you started collecting data from the real weather station.

m

Dave Jeffries

unread,
Jul 13, 2015, 1:26:46 PM7/13/15
to weewx...@googlegroups.com, dave.jef...@gmail.com
Excellent thank you, thats exactly what I was looking for!

George Alexander

unread,
Nov 21, 2015, 6:52:16 PM11/21/15
to weewx-user, dave.jef...@gmail.com

After trying the "Delete weewx.sdb" method for a refresh, when I restarted weewx, the syslog showed it happily re-populating the database with all my old data - where on earth did it get that from and how do I stop it doing it again?

Thomas Keffer

unread,
Nov 21, 2015, 7:15:32 PM11/21/15
to weewx-user, Dave Jeffries
Magic. :-)

Your hardware must have an onboard logger. If you truly want a fresh start, you'll have to clear it. Specific instructions depends on the make of your hardware.

-tk

--

George Alexander

unread,
Nov 22, 2015, 2:13:23 AM11/22/15
to weewx-user, dave.jef...@gmail.com
Haha magic indeed!

I completely overlooked the internal logger in the station itself - thanks very much for that.

S R

unread,
Jan 25, 2021, 3:40:48 PM1/25/21
to weewx-user
I've got the same problem. finished testing with the simulator, deleted the db and created again. 
cleared the browser cache on both chrome and firefox, but i goto the page and it shows 28.01 even though today is 25.01 and the data from when the simulator run

gjr80

unread,
Jan 25, 2021, 4:10:47 PM1/25/21
to weewx-user
Did you delete any previously generated reports on both your WeeWX machine and web server?

Gary

S R

unread,
Jan 25, 2021, 4:16:33 PM1/25/21
to weewx-user
I just deleted the .sdb and then run wee_database --create.

i don't see any cache data for nginx on either the ubuntu or freebsd versions i setup for testing, but they both show the same problem

p q

unread,
Jan 25, 2021, 5:20:26 PM1/25/21
to weewx...@googlegroups.com
There are .html pages on the web server public directory that your seeing

S R

unread,
Jan 26, 2021, 12:51:11 AM1/26/21
to weewx-user
deleted the entire html directory and run wee_reports and it is back with the simulator data... even though a db we deleted and created again

gjr80

unread,
Jan 26, 2021, 1:10:48 AM1/26/21
to weewx-user
Delete the html directory again (definitely on the WeeWX machine and also delete the html/png files on your web server if applicable), delete the database and restart WeeWX. Monitor the log, confirm a new database is created (it will be logged) and which driver is being used. Confirm report generation. If you still get old simulator data in a browser it’s a browser cache issue or you have more than one WeeWX instance running or remnants from another WeeWX instance. You can also take the browser out of the equation and view the report output in an editor or cat it to your console.

Gary

S R

unread,
Jan 26, 2021, 3:24:56 AM1/26/21
to weewx-user
done that mulitple times already....and more weirdness.....

index web page is good - shows correct todays date (sessions template out of box)
day is good - shows todays date

week/month/year - shows date of 31.01 with simulator data.

gjr80

unread,
Jan 26, 2021, 3:39:48 AM1/26/21
to weewx-user
What skin are we talking about Seasons? Standard or something else. ‘Index page has correct date’ what about observations? Plots? ‘week/month/year - shows date of 31.01 with simulator data’ so date is wrong but is data correct. What do the plots show? What is the timestamp under the x axis of the plots? Seeing a startup log after deleting everything would help. What about time stamps on generated files? Is there a link to your site?

You are looking at your pages we are not, so you need to give us a detailed picture.

Gary

S R

unread,
Jan 26, 2021, 4:26:36 AM1/26/21
to weewx-user
yes. i did fresh install (Standard Seasons skin) with the simulator to make get it working. Then i added the interceptor driver.
Simulator in generator mode created data up to 31.01.21. I have the ecowitt unit inside, so only inside temperature, humidity and pressure is being sent at the moment.
index.html page time/date is showing correct. inside temp/hum is correct and all other values are NA/0
day graphs are showing correctly for the collection time the system has been up. as in today 26.01
week/month/year graphs are still showing plots for 26 -> 31.01.21

gjr80

unread,
Jan 26, 2021, 4:31:10 AM1/26/21
to weewx-user
Sounds like all is fine except for week/month/year plots? By default week plots are generated once per hour, month every three hours and year every 24 hours. Did you delete all of the generated plot image files (xxx.png)? This forces WeeWX to regenerate them all on the next report cycle.

Gary

S R

unread,
Jan 26, 2021, 7:34:49 AM1/26/21
to weewx-user
all is good now.... only there is no pressure. i think this is because the skin is using barometer, but the ecowitt is directing baromabsin to pressure
Reply all
Reply to author
Forward
0 new messages