"yesterday.outTemp" compared to "current.outTemp", et seq, for Yesterday page

165 views
Skip to first unread message

Messy Potamia

unread,
Apr 17, 2020, 10:01:25 AM4/17/20
to weewx-user
The high/low table is working, showing but I'd like to get the upper table in yesterday.html.tmpl  to show the data from 86400 seconds ago, or one day ago, $day($days_ago=1), or $yesterday.  This doesn't seem to be working.
In otherwords, on my Yesterday page, (weewx 3.9.2 Standard skins) I'd like it to show the same data as if you looked at it exactly 24 hrs ago.
When I replace the $current.outTemp with $yesterday.outTemp,  it generates an error.
Any ideas?   Thanks--

Thomas Keffer

unread,
Apr 17, 2020, 10:18:33 AM4/17/20
to weewx-user
The two tags serve different purposes. The tag $yesterday represents an aggregation over the day. The tag $current represents a single record. There is an undocumented feature in v3.9.2 (documented in V4.0) that gets you what you want:

<p>The temperature 24 hours ago was $current(timestamp=$current.dateTime.raw-86400).outTemp</p>

-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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/571e351c-cbbc-446a-8cc5-e7e96fa95a42%40googlegroups.com.

Messy Potamia

unread,
Apr 17, 2020, 10:20:51 AM4/17/20
to weewx-user
Correction: it doesn't generate an error, but it doesn't return any data. The tabular data fields are blank for the ones which have $yesterday.[parameter].
What do you think I'm doing wrong?

Messy Potamia

unread,
Apr 17, 2020, 10:23:24 AM4/17/20
to weewx-user
Thanks, trying that now...


On Friday, April 17, 2020 at 4:18:33 PM UTC+2, Thomas Keffer wrote:
The two tags serve different purposes. The tag $yesterday represents an aggregation over the day. The tag $current represents a single record. There is an undocumented feature in v3.9.2 (documented in V4.0) that gets you what you want:

<p>The temperature 24 hours ago was $current(timestamp=$current.dateTime.raw-86400).outTemp</p>

-tk

On Fri, Apr 17, 2020 at 7:01 AM Messy Potamia <messyp...@gmail.com> wrote:
The high/low table is working, showing but I'd like to get the upper table in yesterday.html.tmpl  to show the data from 86400 seconds ago, or one day ago, $day($days_ago=1), or $yesterday.  This doesn't seem to be working.
In otherwords, on my Yesterday page, (weewx 3.9.2 Standard skins) I'd like it to show the same data as if you looked at it exactly 24 hrs ago.
When I replace the $current.outTemp with $yesterday.outTemp,  it generates an error.
Any ideas?   Thanks--

--
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...@googlegroups.com.

Messy Potamia

unread,
Apr 17, 2020, 11:11:50 AM4/17/20
to weewx-user
Thanks, the tables are great.
- - -
Reading through the .tmpls & skin.conf, and http://www.weewx.com/docs/customizing.htm, I cannot glean how to tell the plot generator to generate a plot that is from the same time period 24 hours ago. Is there a way to get those?
Thanks,
Phil

Thomas Keffer

unread,
Apr 17, 2020, 7:25:53 PM4/17/20
to weewx-user
Unfortunately, no. The ImageGenerator can only make plots that end with the current time.

-tk

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/207b4e40-894c-42d2-88bc-9e1b4a31d7eb%40googlegroups.com.

Messy Potamia

unread,
Apr 17, 2020, 11:51:03 PM4/17/20
to weewx-user
Then is it possible to generate plots that cover the current 48 hours? They would end with the current time but would span 2 days.
Thanks
Phil

Andrew Milner

unread,
Apr 18, 2020, 3:44:43 AM4/18/20
to weewx-user
set time_length to the required value (86400*2 for 48 hours) for the required plot(s)

Messy Potamia

unread,
Apr 18, 2020, 8:52:27 AM4/18/20
to weewx-user
Thanks will try that now.

Messy Potamia

unread,
Apr 18, 2020, 9:51:11 AM4/18/20
to weewx-user
in skin.conf:
   
[[yesterday_images]]
#       x_label_format = %H:%M
#        bottom_label_format = %x %H:%M
#        time_length = 97200    # == 27 hours
#        axis_label_font_size = 8

        x_label_format
= %d
        bottom_label_format
= %m/%d/%y %H:%M
        time_length
= 172800    # == 2 days
       
#aggregate_type = avg
        aggregate_interval
= 10800    # == 3 hours
        show_daynight
= true
       
       
[[[yesterdaybarometer]]]
        time_length
= 172800    # == 2 days
           
[[[[barometer]]]]
       
       
[[[yesterdaytempdew]]]
        time_length
= 172800    # == 2 days
           
[[[[outTemp]]]]
           
[[[[dewpoint]]]]
       
       
[[[yesterdayrain]]]
           
# Make sure the y-axis increment is at least 0.02 for the rain plot
        time_length
= 172800    # == 2 days
            yscale
= None, None, 0.02
            plot_type
= bar
           
[[[[rain]]]]
                aggregate_type
= sum
                aggregate_interval
= 3600
                label
= Rain (hourly total)
     
       
[[[yesterdaypond]]]
        time_length
= 172800    # == 2 days
            yscale
= None, None, 0.5
           
[[[[extraTemp1]]]]

       
[[[yesterdayDnldSpd]]]
        time_length
= 172800    # == 2 days
            yscale
= 5, 50, 5
           
[[[[leafTemp1]]]]
            label
= Vega-Net MB/sec
   
       
[[[yesterdaywind]]]
        time_length
= 172800    # == 2 days
           
[[[[windSpeed]]]]
           
[[[[windGust]]]]
       
       
[[[yesterdayinside]]]
        time_length
= 172800    # == 2 days
           
[[[[inTemp]]]]
            label
= Fish Pond Temp
       
       
[[[yesterdaywinddir]]]
        time_length
= 172800    # == 2 days
           
# Hardwire in the y-axis scale for wind direction
            yscale
= 0.0, 360.0, 45.0
           
[[[[windDir]]]]

and yesterday.html.tmpl:
<!-- 48-hr plots -->
       
<div class="header">
       
<h3>(48-hr Plots)</h3>
       
</div>
       
<div id="plots">
         
<img src="yesterdaytempdew.png" alt="temperatures" />
         
<img src="yesterdayrain.png" alt="rain" />
         
<img src="yesterdaywind.png" alt="wind" />
         
<img src="yesterdaybarometer.png" alt="barometer"/>
         
<img src="yesterdaywinddir.png" alt="Hi Wind" />
         
<img src="yesterdayinside.png" alt="Inside" />
         
<img src="yesterdayDnldSpd.png" alt="Download" />
          #if $week.extraTemp1.has_data
         
<img src="weekpond.png" alt="Pond Temperatures" />
          #end if
       
</div>
<!-- end 48-hr plots -->

But it seems to still be generating only 24-hr length plots:

yesterdaytempdew(only24hrs).png

I'm probably doing something wrong but after reading the cited docs I don't see what, maybe you do?
Thx/Phil


On Saturday, April 18, 2020 at 9:44:43 AM UTC+2, Andrew Milner wrote:

Thomas Keffer

unread,
Apr 18, 2020, 11:28:16 AM4/18/20
to weewx-user
Worked for me. Because you are using a 3 hour aggregation period, the pictures will not be regenerated for 3 hours. Delete all your "yesterday" plots to have them regenerated at the next reporting cycle.

image.png

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/09a5af02-10d7-4c23-a44a-397e491cbc13%40googlegroups.com.

Messy Potamia

unread,
Apr 18, 2020, 1:49:40 PM4/18/20
to weewx...@googlegroups.com
Yes so it did (checking 5 hrs later). Thank you. I'll tinker now with
tweeking the details.
Thanks -- Phil


On Sat, Apr 18, 2020 at 5:28 PM Thomas Keffer <tke...@gmail.com> wrote:
>
> Worked for me. Because you are using a 3 hour aggregation period, the pictures will not be regenerated for 3 hours. Delete all your "yesterday" plots to have them regenerated at the next reporting cycle.
>
>
>
> 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/DVkEgxR5WCg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zECA%3DziRYNJi5CU8UrZy70SkFqnkquW_hxA1axdC6KrOPw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages