redownload data from station

53 views
Skip to first unread message

Juan Antonio Mosquera

unread,
Oct 11, 2018, 2:40:16 PM10/11/18
to weewx-user
Hi, I suspect that the correct data from the station have not been saved in weewx.sdb. How can I force the download of the data again?

gjr80

unread,
Oct 11, 2018, 9:45:16 PM10/11/18
to weewx-user
Hi,

The answer depends. If and only if your driver supports backfilling from the station then on startup WeeWX will try to backfill any records timestamped after the latest record in the WeeWX archive. So if the last record in your archive is time stamped 9:20am 11 October 2018, WeeWX would try to download any records from your station that at time stamped after 9:20am 11 October 2018. If WeeWX cannot get any records after this timestamp nothing is changed, if WeeWX can only get some records after 9:20am 11 October 2018 then only those records that were downloaded are saved to archive.

So if you want to re-download records from your station for a given time onwards you should delete all records from your archive from that given time onwards and then restart WeeWX. You can monitor what WeeWX does (did) by monitoring the log during startup.

There are some caveats. If you want to re-download records from too far in the past there is the possibility that your station may not have all those records in memory and you may end up with a gap in your data. Also note that the backfill occurs from the last timestamp in the WeeWX archive, so if you want to re-download a specific period you must delete delete all records from the start of that period onwards, not just those in the period concerned.

As you will be performing some destructive actions on your data I would make sure you backup your database first so you can revert to your old data if things go wrong.

Gary

Juan Antonio Mosquera

unread,
Oct 12, 2018, 3:06:49 AM10/12/18
to weewx...@googlegroups.com
I understand, thanks!

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/-LQKMxYvnzs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cameron D

unread,
Oct 12, 2018, 9:04:30 PM10/12/18
to weewx-user
Juan,
I presume you are referring to the WMR300 and missing wind speed.
If you have a 5-minute archive period then the console storage will increase by close to 1% per day.

If you use the default history clear at 20% then you have up to 20 days, however it is not possible to partially clear the history, so depending when the buffer was cleared, you might or might not have much data.

I tend to set it at 6% and I am not certain which setting you are using.  To be more sure of saving archive/history you could set the parameter:
history_limit = 90

My rule would be - if the live data is working well then use a low percentage for:
  1. to leave an empty buffer in case the computer goes down for a long time
  2. each clear is shorter and less interruption to live data flow
but use a high percentage if:
  1. your live data is unreliable and you need to go back over some days worth of data.

Cameron D

unread,
Oct 12, 2018, 11:17:21 PM10/12/18
to weewx-user
There is a slightly more complicated, but safer process...examine the history first by running the driver standalone

stop weewx

cd to the folder above where weewx is installed - e.g. mine is /usr/share/weewx, so
 cd /usr/share
 PYTHONPATH
=weewx python weewx/user/wmr300-v19rc6+f3.py --get-history  > ~/weewx-history.txt

You might need to adjust the names of the folder and the driver if they are different.

This uses just the driver to extract the history, and you can then check whether the wind data look good.
You also know the earliest date-time retained in the WMR300 console history.

You can then decide to either delete the data and reload it, or edit the text to generate SQL code to just update the wind speed and gust.

Juan Antonio Mosquera

unread,
Oct 13, 2018, 3:30:17 AM10/13/18
to weewx-user
Hi, Cameron. Thanks, but it's not the reason you think. Now weewx wind data correctly downloads the WMR300, with your new driver (wmr300-v19rc6 + f3.py).
But I have another problem, one day this month there has been no rainfall data and it has rained a lot.
I have backed up the database, I deleted all the data for this month and it was reinserted when we started weewx.
Still I have data loss so I have to check the rain gauge.

Greetings and thanks.
Reply all
Reply to author
Forward
0 new messages