I know you know this, but first make a backup of your database :)

Is the problem with the "all time" days without rain, or "this year" days 
without rain? 


   - All time uses this query <http://SELECT dateTime, ROUND( sum, 2 ) FROM 
   archive_day_rain;>: SELECT dateTime, ROUND( sum, 2 ) FROM 
   archive_day_rain; so setting those to NULL would 
   - "This year" days without rain uses this query 
   
<https://github.com/poblabs/weewx-belchertown/blob/master/bin/user/belchertown.py#L340>:
 
   SELECT dateTime, ROUND( sum, 2 ) FROM archive_day_rain WHERE strftime("%%Y", 
   datetime(dateTime, "unixepoch")) = "%s";' % time.strftime( "%Y", 
   time.localtime( time.time() ) )


Both are looking at the same table, and both are looking to see what the 
sum is. If 0 it increments to days without rain, and if it's > 0 it 
increments the days with rain. 

So modifying that single table for the sum column to be 0 should cover it 
I'd think. Is your sum column showing NULL for sum (I don't think it would)?

What happens if you run those queries directly on the db?
  


On Friday, June 14, 2019 at 5:39:16 PM UTC-4, vince wrote:
>
> Pat - back to fiddlin' with Belchertown....
>
> I notice my site is showing 700+ days alltime record for days without 
> rain, which is of course not true (near Seattle).    My recollection is 
> that waaaay back when my old LaCrosse 2315 piece of junk was throwing out 
> bogus rain totals so I cleared all the rain totals for the 2+ years that I 
> had that online with wview/weewx up to the time I got my VP2 in early 
> 2009.  It's very likely that I just set all the values to 0.00 rain for the 
> day, rather than NULL (untested - I'll check tonight).
>
> What's the best way to get belchertown to show truth for this alltime 
> record ?
>
> I'd really like to avoid doing a drop_daily and rebuild since I have 12+ 
> years of data in there.   If I need to do something like change all the 
> rain totals for a day to NULL when the date is earlier than jan-1-2009, 
> then I can certainly do that in sqlite3 for the archive table and whatever 
> table(s) you're using to get the days-since-last-rain from, but I wasn't 
> certain from the source code where you're getting the 
> time-between-rain-events data from.
>
> Suggestions ?
>
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/59509f21-26eb-44ec-901f-d3ae16ff5051%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to