Problems with Average in day graph.

51 views
Skip to first unread message

peter hopwood

unread,
May 29, 2019, 5:56:08 AM5/29/19
to weewx-user
Hi,

My inside temp always look a little jittery, so I want to average it over a period of time.  But for some reason it will not work, I have tried a number of things but I can't make it work.  It displays the label but not the data. 

This is the part of the skin.conf to populate the graph.  I know I am missing something obvious but what am I missing or is the problem else where in the skin.conf.

        [[[daytempdew]]]
            [[[[avginTemp]]]]
data_type = inTemp
                aggregate_type = avg
                aggregate_interval = 1800
label = Lounge
            [[[[inTemp]]]]
            [[[[extraTemp1]]]]
            [[[[extraTemp2]]]]
#            [[[[outTemp]]]]
#            [[[[appTemp]]]]

This is how the graph currently looks.

weewxexample.png



This is the full Day image section.

    [[day_images]]
        x_label_format = %H:%M
        bottom_label_format = %x %X
        time_length = 97200    # == 27 hours

        [[[daybarometer]]]
            [[[[barometer]]]]

        [[[daytempdew]]]
            [[[[avginTemp]]]]
data_type = inTemp
                aggregate_type = avg
                aggregate_interval = 1800
label = Lounge
            [[[[inTemp]]]]
            [[[[extraTemp1]]]]
            [[[[extraTemp2]]]]
#            [[[[outTemp]]]]
#            [[[[appTemp]]]]

        [[[daytempchill]]]
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
            [[[[appTemp]]]]
            

[[[dayhumidity]]]
            [[[[outHumidity]]]]
            [[[[inHumidity]]]]

        [[[dayrain]]]
            # Make sure the y-axis increment is at least 0.02 for the rain plot
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                aggregate_interval = 3600
                label = Rain (hourly total)

        [[[dayrx]]]
            yscale = 0, 100, 10
            [[[[rxCheckPercent]]]]

        [[[daywind]]]
            [[[[windSpeed]]]]
            [[[[windGust]]]]

        [[[dayinside]]]
            [[[[inTemp]]]]

        [[[daywinddir]]]
            # Hardwire in the y-axis scale for wind direction
            yscale = 0.0, 360.0, 45.0
            [[[[windDir]]]]

        [[[daywindvec]]]
            [[[[windvec]]]]
        label = 5 Min Avg Wind
                plot_type = vector
    [[[[windgustvec]]]]
        label = Gust Wind
        plot_type = vector
#         aggregate_type = max
# aggregate_interval = 3600

        [[[dayradiation]]]
            [[[[radiation]]]]
            [[[[radiation_max]]]]
                data_type = radiation
                aggregate_type = max
                aggregate_interval = 3600

        [[[dayuv]]]
            yscale = 0, 10, 1
            [[[[UV]]]]
#            [[[[UV_max]]]]
#                data_type = UV
#                aggregate_type = max
#                aggregate_interval = 3600

gjr80

unread,
May 29, 2019, 6:14:26 AM5/29/19
to weewx-user
Hi,

Your config looks ok. What happens if you remove [[[[inTemp]]]] ? The WeeWX image generator plots each observation sequentially and it's possible for a later observation to mask and earlier observation if they are identical. Appreciate they should be different but we need to find out where the issue lies.

Could you also post the startup portion of the log, say from WeeWX startup through until a couple archive records have been processed. It's important to capture all of the WeeWX startup preamble.

Gary

peter hopwood

unread,
May 29, 2019, 7:22:55 AM5/29/19
to weewx-user
Gary,

I have tested this with no other observations in the graph template, so just the avginTemp and the results are the same, I get the label but not the data.  I can see nothing in the skin.conf or the weewx.conf that suggest there is another control for this.

Attached is the output for the log for 10 minutes, nothing jumps out at me.


All the best.

Peter

logOutPut.txt

p q

unread,
May 29, 2019, 9:34:52 AM5/29/19
to weewx...@googlegroups.com
I believe your inside temp is showing you accurate information. I think it's showing your heater coming on and cutting out. I get the same effect when I run the heat.

FYI

--
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/4a00cf6a-6abf-4f76-81f2-c1b75720d1d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Peter Quinn
(415)794-2264

gjr80

unread,
May 29, 2019, 9:49:41 AM5/29/19
to weewx-user
Peter,

No did not expect errors in the log but the startup gives a good picture of your setup.

What I think you will find is happening here is that (for a day plot) using an aggregate with an aggregate_interval results in points being plotted every aggregate_interval seconds as opposed to every archive interval seconds for those plots that do not use and aggregate_interval. In your case your inTemp plot consists of points every 300 seconds but your average inTemp plots consists of points every 1800 seconds. The WeeWX plot engine interprets a gap in time of over 1% of the overall plot period to be a gap in the data and it will leave a corresponding gap in the plot line. Your 1800 second 'gap' is about 1.8% of a 27 hour day plot so I think you will find your average is being plotted but it is a series of fine dots that are ,asked by the inTemp plot. The solution is to use the line_gap_fraction to increase the period before a data gap is identified. Try something like:

        [[[daytempdew]]]
           
[[[[avginTemp]]]]
                data_type
= inTemp
                aggregate_type
= avg
                aggregate_interval
= 1800
                label
= Lounge

                line_gap_fraction
= 0.02
           
[[[[inTemp]]]]
           
[[[[extraTemp1]]]]
           
[[[[extraTemp2]]]]

Gary

Peter

unread,
May 29, 2019, 12:11:43 PM5/29/19
to weewx-user
Gary,

Many thanks.

I think you are right, I was hoping for a rolling average to smooth out the graph a little.  I will have a play with the config and see if I can make it a little closer to my requirements.or move the device and see if I can get it to settle down.

Peter,

The graph is not caused by my heating as at the moment the heating is off, something else is causing it, I might move the device and see if it settles down a bit.

All the best.

Peter


Peter

unread,
May 29, 2019, 1:47:07 PM5/29/19
to weewx-user
Gary,

You were spot on and with a bit of adjustment I got an graph more or less the way I imagined the graph to look like.  So thanks you very much for your input and help on this issue.

This is how the graph looks at the moment, I will remove the inTemp once I am 100% happy it is working as expected.  If this does not show properly you can visit my site and take a closer look.

weewxexample2.png

All the best,

Peter
Reply all
Reply to author
Forward
0 new messages