Re: [weewx-user] Removing erroneous rain readings from the database

2019-12-22 Thread Graham Eddy
from sqlite3 use datetime function to display dateTime field in more meaningful 
way
(names ‘datetime’ function in sqlite3 and ‘dateTime’ field in weewx database 
being so similar is coincidence..)

example showing the rain for the last entry (i.e. maximum dateTime) in weewx 
database
  $ sqlite3 weewx.sdb
  sqlite> select datetime(max(dateTime), "unixepoch”, "localtime"), rain from 
archive;

Graham Eddy

> On 23 Dec 2019, at 8:51 am, Dana Roode  wrote:
> 
> Hello,
> 
> I've had some issues with the rain collector on my Vantage Pro2 this year, I 
> replaced it a few weeks back.  There were some spurious high readings, plus 
> my testing generated false readings.  The data indicates over 60 inches of 
> rain in my desert location this year.  I'd like to find the bad values and 
> zero them out, and I see how to do this with sqlite3 on the database if I 
> understood the data fields.  "rain" is the field in the archive tables, but I 
> don't know what time period thats for.  The dateTime field has numbers like 
> 1539650100 and I don't know how to convert to something meanful.
> 
> Is there documentation on the database schema and fields somewhere?  I 
> haven't found it in the wiki information.  
> 
> Any pointers would be appreciated.
> 
>   Dana Roode
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/f853d32c-80ce-4114-80a3-7313eb32234a%40googlegroups.com
>  
> .

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8746F9EC-D121-4B5C-9393-1809642088B4%40gmail.com.


Re: [weewx-user] Removing erroneous rain readings from the database

2019-12-22 Thread Thomas Keffer
The database schema is described in the section *The database
* in the
Customizing Guide. It also describes the field dateTime.

The field rain is the amount of rain that fell in that archive record. For
an archive interval of, say, 5 minutes, this would be the amount of rain
that fell during that 5 minutes.

Also, see the Wiki article *Cleaning up old 'bad' data
*. It may
help.

-tk



On Sun, Dec 22, 2019 at 2:51 PM Dana Roode  wrote:

> Hello,
>
> I've had some issues with the rain collector on my Vantage Pro2 this year,
> I replaced it a few weeks back.  There were some spurious high readings,
> plus my testing generated false readings.  The data indicates over 60
> inches of rain in my desert location this year.  I'd like to find the bad
> values and zero them out, and I see how to do this with sqlite3 on the
> database if I understood the data fields.  "rain" is the field in the
> archive tables, but I don't know what time period thats for.  The dateTime
> field has numbers like 1539650100 and I don't know how to convert to
> something meanful.
>
> Is there documentation on the database schema and fields somewhere?  I
> haven't found it in the wiki information.
>
> Any pointers would be appreciated.
>
>   Dana Roode
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/f853d32c-80ce-4114-80a3-7313eb32234a%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zECy%2Bmd6GPZOCcoMpLx3CKTPE2TZ7oLvgF6UaHp_%2B8%3D4-w%40mail.gmail.com.


Re: [weewx-user] Removing erroneous rain readings from the database

2019-12-22 Thread Dana Roode
Thanks Greg!  I am running on Unix, so this is very helpful.   Dana

On Sunday, December 22, 2019 at 1:55:16 PM UTC-8, Greg Troxel wrote:
>
> Dana Roode > writes: 
>
> > Hello, 
> > 
> > I've had some issues with the rain collector on my Vantage Pro2 this 
> year, 
> > I replaced it a few weeks back.  There were some spurious high readings, 
> > plus my testing generated false readings.  The data indicates over 60 
> > inches of rain in my desert location this year.  I'd like to find the 
> bad 
> > values and zero them out, and I see how to do this with sqlite3 on the 
> > database if I understood the data fields.  "rain" is the field in the 
> > archive tables, but I don't know what time period thats for.  The 
> dateTime 
> > field has numbers like 1539650100 and I don't know how to convert to 
> > something meanful. 
>
> I would guess that rain is either the rain that arrived in that archive 
> interval, or some sort of cumulative value. 
>
> The dateTime is in seconds since the Unix epoch, which was 
> 1970-01-01T00:00:00Z (Jan 1, 1970, midnight UTC). 
>
> On Unix, date -r will take that and convert it to human time.  This is 
> just what is does normally, except it uses the provided value vs 
> gettimeofday(). 
>
>   $ date -r 1539650100 
>   Mon Oct 15 20:35:00 EDT 2018 
>
> which isn't a few weeks ago. 
>
> On windows, you could install Unix and then run date -r.  Probably 
> there's an easier way... 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/6212715b-9662-4bcc-bf02-4a657d909a1f%40googlegroups.com.


Re: [weewx-user] Removing erroneous rain readings from the database

2019-12-22 Thread Greg Troxel
Dana Roode  writes:

> Hello,
>
> I've had some issues with the rain collector on my Vantage Pro2 this year, 
> I replaced it a few weeks back.  There were some spurious high readings, 
> plus my testing generated false readings.  The data indicates over 60 
> inches of rain in my desert location this year.  I'd like to find the bad 
> values and zero them out, and I see how to do this with sqlite3 on the 
> database if I understood the data fields.  "rain" is the field in the 
> archive tables, but I don't know what time period thats for.  The dateTime 
> field has numbers like 1539650100 and I don't know how to convert to 
> something meanful.

I would guess that rain is either the rain that arrived in that archive
interval, or some sort of cumulative value.

The dateTime is in seconds since the Unix epoch, which was
1970-01-01T00:00:00Z (Jan 1, 1970, midnight UTC).

On Unix, date -r will take that and convert it to human time.  This is
just what is does normally, except it uses the provided value vs
gettimeofday().

  $ date -r 1539650100
  Mon Oct 15 20:35:00 EDT 2018

which isn't a few weeks ago.

On windows, you could install Unix and then run date -r.  Probably
there's an easier way...

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/rmid0cgc9fk.fsf%40s1.lexort.com.


[weewx-user] Removing erroneous rain readings from the database

2019-12-22 Thread Dana Roode
Hello,

I've had some issues with the rain collector on my Vantage Pro2 this year, 
I replaced it a few weeks back.  There were some spurious high readings, 
plus my testing generated false readings.  The data indicates over 60 
inches of rain in my desert location this year.  I'd like to find the bad 
values and zero them out, and I see how to do this with sqlite3 on the 
database if I understood the data fields.  "rain" is the field in the 
archive tables, but I don't know what time period thats for.  The dateTime 
field has numbers like 1539650100 and I don't know how to convert to 
something meanful.

Is there documentation on the database schema and fields somewhere?  I 
haven't found it in the wiki information.  

Any pointers would be appreciated.

  Dana Roode

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f853d32c-80ce-4114-80a3-7313eb32234a%40googlegroups.com.