Skip to content

Support for weewx xaggs

David Baetge edited this page Jun 3, 2023 · 1 revision

The skin includes support for creating configurable tiles to show historical data, provided by weewx-xaggs (Please see the readme of the priject for installation instructions).

To enable the tiles, you need to use the [[stat_tiles_xaggs]] section (within [DisplayOptions]) in your skin.conf file:

[[stat_tiles_xaggs]]
    [[[outTemp]]]
        aggregate_types = historical_max, historical_min, historical_avg, avg_ge
        avg_ge = 5.0, 'degree_C', 'group_temperature'
        show_extra_row = False
        avg_context = year, alltime

Use the observation you want to show (here outTemp) as the section name.

aggregate_types is a comma separated list of the aggregate types you want to show. The following types are supported (from https://github.com/tkeffer/weewx-xaggs#using):

Name Description
historical_min The lowest temperature seen on this day.
historical_min_avg The average lowest temperature seen on this day.
historical_max The highest temperature seen on this day.
historical_max_avg The average highest temperature seen on this day.
historical_avg The average temperature seen on this day.
avg_ge(val) The number of days with average >= val.
avg_gt(val) The number of days with average > val.
avg_le(val) The number of days with average <= val.
avg_lt(val) The number of days with average < val.

The historical_min, historical_max, historical_avg, historical_min_avg, historical_max_avg aggregations will be shown on the front page. The avg_ge(val), avg_gt(val), avg_le(val), avg_lt(val) aggregations will be shown on pages defined by avg_context.

So this example will produce this tile on the front page:

Example tile

and this tile on the year and alltime (statistics) pages:

Example tile

Note: For each avg_* aggregation you have to define the ValueTuple to use for the aggregation. So for example, if you want to show the number of days with average outTemp greater than 5 °C, you would need to add avg_gt to aggregate_types, and add avg_gt = 5.0, 'degree_C', 'group_temperature' to the section:

[[stat_tiles_xaggs]]
    [[[outTemp]]]
        aggregate_types = avg_gt
        avg_gt = 5.0, 'degree_C', 'group_temperature'
        show_extra_row = False
        avg_context = year, alltime

If you want to show multiple avg_gt aggregations, add a suffix to the name, like:

[[stat_tiles_xaggs]]
    [[[outTemp]]]
        aggregate_types = avg_gt_5, avg_gt_10
        avg_gt_5 = 5.0, 'degree_C', 'group_temperature'
        avg_gt_10 = 10.0, 'degree_C', 'group_temperature'
        show_extra_row = False
        avg_context = year, alltime

show_extra_row Only available for the alternative layout: Will display the resulting tile in a new row below the stat tiles, and not along the stat tiles.

Clone this wiki locally