Sort of. I have been working on issue #97 
<https://github.com/weewx/weewx/issues/97> for some time.  In a recent 
burst of activity I managed to get wee_import committed to master on 
github. After some discussion over the last couple of days we have decided 
to restructure the utility for a number of reasons. This is still a work in 
progress but I hope to push a first cut of this code later today. Probably 
will be a few days at least before I would consider it as robust as the 
current wee_import.

The wee_import that is there now works and I believe is robust. It works 
with any db used by weewx - it just uses the db and binding details from 
weewx.conf. I guess it is your decision as to what you do, your WU data is 
not going anywhere and the restructured version will still perform the same 
tasks (nearly all the backend code is the same) it is mainly how the user 
iterracts with it that is different. So if you use it today it will 
probably appear quite different in the future (albeit performing the same 
function).

wee_import does do things to your database, albeit only adding records, but 
if you get it wrong it can mess up the integrity of your data. So make a 
backup first, probably a little more involved using MySQL (particularly if 
you have to wind it back) than for SQLite.

If you decide to use the existing wee_import:

   - grab wee_import and wee_import.conf from master on github
   - save wee_import to weewx/bin (along with the other utilities) and 
   wee_import.conf to the same folder as weewx.conf
   - check the [Wunderground] settings in wee_import.conf, there are a good 
   deal of comments in there plus there is more info in the PR mentioned below.
   - run wee_import using the --help option by using wee_import --help

That will probably be enough to get you going. I have a PR (PR #142 
<https://github.com/weewx/weewx/pull/142>) that contains the first cut 
documentation for (the existing) wee_import. It won't display nicely in 
HTML but should be readable-ish if you need anything further than what 
--help provides.


A few points to note from my experience during development:

   - wee_import is additive in nature ie if an observation already exists 
   for a datetime that is imported then the imported record is dicarded. So it 
   won't overwrite and existing records.
   - when doing an import do a dry run the first time, it will import the 
   data and do all the processing except saving it to db. You will get a 
   summary of what it did (would have done), give that a sanity check before 
   proceeding.
   - wee_import updates the daily summaries so no reason to drop/rebuild, 
   well you can I guess its your CPU time :)
   - WU is just as flaky pulling in history data as it is posting obs. 
   Sometimes I will get a perfect 288 records in a day, often 287, sometimes 
   less again. Usually its in the high 280s though. Solution - do the import 
   again (refer point 1).
   - the way in which the weewx interval field is derived is quite critical 
   for the intergrity of your data (well the stats really). This is set in 
wee_import.conf 
   under [Wunderground], interval. As WU is so flaky using 'interval=derive' 
   is risky so best to use 'interval=conf' if the interval between your WU 
   obs is the same as your achive interval or failing that a fixed number. If 
   your WU obs are every 5 minutes then I would tend to use 5. Read the 
   wee_import.conf notes and if any issues post back here.
   - The results using wee_import are only as good as the source data, I 
   would consider WU well down the scale in this regard. I guess the situation 
   must be desperate.
   
Gary

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

Reply via email to