Archive record report?

164 views
Skip to first unread message

TheChoctlab

unread,
Sep 3, 2017, 7:53:13 PM9/3/17
to weewx-user
I have searched the Group but, must not have used the correct search terms as I could not find what I am after.

My interest is producing a report similar to the "Monthly Summary" but, that displays daily data from each archive record (every ten minutes).  Wview does this but, I much prefer weewx.

Any guidance will be greatly appreciated.

Andrew Milner

unread,
Sep 3, 2017, 10:22:33 PM9/3/17
to weewx-user
What exactly do you mean by 'similar' to the monthly Summary?? - how do you want it to differ from what is produced by the standard daily/weekly/monthly/yearly stats and graph pages?

Thomas Keffer

unread,
Sep 3, 2017, 11:44:30 PM9/3/17
to weewx-user
See the Customizing Guide, section Iteration. Specifically, you want suffix .records.

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

TheChoctlab

unread,
Sep 4, 2017, 12:26:00 AM9/4/17
to weewx-user
'Similar' in appearance (layout, format).  The difference being that the data being displayed is from individual archive records and not daily maximums/minimums.

TheChoctlab

unread,
Sep 4, 2017, 12:36:36 AM9/4/17
to weewx-user
On your suggestion, I reviewed the information regarding Iteration.  I think that will get me where I want to go.

I am more of a hardware guy rather than a software guy.  So, please forgive my feeble attempt at the following:

Min, max temperatures by record
#for $record in $record.days
$record.dateTime.format("%B"): Min, max temperatures: $record.outTemp.min $record.outTemp.max
#end for

Am I, sort of, on the right track?


On Sunday, September 3, 2017 at 8:44:30 PM UTC-7, Tom Keffer wrote:
See the Customizing Guide, section Iteration. Specifically, you want suffix .records.

-tk
On Sun, Sep 3, 2017 at 4:53 PM, TheChoctlab <choc...@gmail.com> wrote:
I have searched the Group but, must not have used the correct search terms as I could not find what I am after.

My interest is producing a report similar to the "Monthly Summary" but, that displays daily data from each archive record (every ten minutes).  Wview does this but, I much prefer weewx.

Any guidance will be greatly appreciated.

--
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.

Thomas Keffer

unread,
Sep 4, 2017, 9:00:17 AM9/4/17
to weewx-user
Almost. You need to iterate over a time period. Also, because the results of the iteration will be individual records, there will not be a minimum and maximum temperature. Just temperature. Something like (NOT TESTED):

#for $record in $day.records
$record.dateTime.format("%B"): $record.outTemp
#end for

-tk

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscribe@googlegroups.com.

TheChoctlab

unread,
Sep 4, 2017, 9:53:17 PM9/4/17
to weewx-user
Eureka!  Thank you Tom.

Now then, how would I query for a specific date?

Thomas Keffer

unread,
Sep 4, 2017, 10:31:27 PM9/4/17
to weewx-user
Querying for specific times is not available. Perhaps it should be. What is your application that you need to do this?

-tk

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscribe@googlegroups.com.

Thomas Keffer

unread,
Sep 4, 2017, 10:39:09 PM9/4/17
to weewx-user
I should add that you can query for a specific record, just not a specific date.

For example

$current(timestamp=1504578900).outTemp

would give the temperature for 2017-09-17 19:35:00 (PDT)

You can also query for so many "days ago." See the Customizing Guide. Just not specific unix epoch times.

-tk
Message has been deleted

Andrew Milner

unread,
Sep 4, 2017, 10:41:55 PM9/4/17
to weewx-user
If you just want the detailed reports for a specific date you could run wee_reports using a reduced conf and skin with, for example, only the daily reports in it and specify the required 'date' in the command line.  Depends what exactly you are trying to achieve!!

TheChoctlab

unread,
Sep 4, 2017, 10:43:40 PM9/4/17
to weewx-user
Nuts.

What I was after was to see the temperature drop as the solar eclipse took place.

Looking at my WU data I know that it dropped at least six (6) degrees Fahrenheit.  However, WU is missing data for three ten minute records right at the maximum period of occlusion.

I guess I should have thought about this prior to the eclipse.

Thomas Keffer

unread,
Sep 4, 2017, 10:44:18 PM9/4/17
to weewx-user
For a report at a static time, Andrew's suggestion is the way to go. Weewx's report generation is intended for more dynamic situations. After all, why would you want to generate the same day's plots over and over again?

-tk

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscribe@googlegroups.com.
Message has been deleted

Andrew Milner

unread,
Sep 4, 2017, 10:52:44 PM9/4/17
to weewx-user
alternatively have you tried running wunderfixer to add in the missing values to WU??  I run wunderfixer twice a day using a cron task and now it never misses any data!!



On Tuesday, 5 September 2017 05:48:07 UTC+3, Andrew Milner wrote:
If you are just wanting to see the drop out of curiosity then why not just directly access the database using sqlite3 eg
SELECT datetime, outTemp FROM archive WHERE datetime > xxxxxxxxxxxxx and datetime  < yyyyyyyyyyyyyy;



On 5 September 2017 at 05:41, TheChoctlab <choc...@gmail.com> wrote:
Nuts.

What I was after was to see the temperature drop as the solar eclipse took place.

Looking at my WU data I know that it dropped at least six (6) degrees Fahrenheit.  However, WU is missing data for three ten minute records right at the maximum period of occlusion.

I guess I should have thought about this prior t the eclipse.

--
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/NcjHMUgGsYs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.

Andrew Milner

unread,
Sep 4, 2017, 11:45:09 PM9/4/17
to weewx-user
or even 
If you are just wanting to see the drop out of curiosity then why not just directly access the database using sqlite3 eg
SELECT dateTime, outTemp FROM archive WHERE dateTime > xxxxxxxxxxxxx and dateTime  < yyyyyyyyyyyyyy;

TheChoctlab

unread,
Sep 5, 2017, 7:34:49 PM9/5/17
to weewx-user
Andrew, I did not do that because I do not know how to do it.

I have played around with the example you provided without success.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

TheChoctlab

unread,
Sep 5, 2017, 7:39:11 PM9/5/17
to weewx-user
As for a cron job, I think I have that figured out. 

I am doing it like this:

# Run wunderfixer at 1258pm daily
58 12 * * * /home/weewx/bin/wunderfixer --log weewx > /dev/null 2>&1
# Run wunderfixer at 1158pm daily
58 23 * * * /home/weewx/bin/wunderfixer --log weewx > /dev/null 2>&1
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

gjr80

unread,
Sep 5, 2017, 8:09:09 PM9/5/17
to weewx-user
Hi,

That will certainly take care of WU from the date you implement these cron entries onwards but by itself it won't fix anything historical. You will need to do historical updates manually from the command line using the --date option. Something like:

$ /home/weewx/bin/wunderfixer --date=2017-08-21

should do the trick. Of course you can add the --test command line option to make sure you have it right before you actually send data to WU. Remember with WU once you upload data you cannot change it other than a one time 'delete'. Wunderfixer details are in the Utilities Guide, but if you have the cron entries set as you do I expect you have already found that.

Gary

TheChoctlab

unread,
Sep 5, 2017, 8:26:08 PM9/5/17
to weewx-user
Hi Gary,

Thank you.  I have done as you suggested and now have the, "curiosity factor" data that I was looking for.

Now, I am eagerly awaiting Andrew's response as to how to query the database directly.

gjr80

unread,
Sep 5, 2017, 8:31:11 PM9/5/17
to weewx-user
Where was the SQL issue? Did you get into SQLite by running

$ sqlite3 /home/weewx/archive/weewx.sdb

Did you substitute the relevant timestamps for xxxxxxxxxxx and yyyyyyyyyyyy? The latter can be the trick/catch, you need to find the timestamp for the start and end date-time you are interested in. Using an epoch calculator such as https://www.epochconverter.com/ can be helpful.

Gary

TheChoctlab

unread,
Sep 5, 2017, 9:11:29 PM9/5/17
to weewx-user
I have now.  I needed to install sqlite3.

All is right with the world!

A huge thank you to everyone who helped me!
Reply all
Reply to author
Forward
0 new messages