Graph files being generated with different sizes

145 views
Skip to first unread message

Doug England

unread,
Dec 31, 2023, 10:37:53 AM12/31/23
to weewx-user
I have had this issue since initial setup in July 2023 of WeeWX 4.10.2 using Seasons 4.10.2 skin when  I switched from WeatherDisplay to WeeWX.

The following images:

*barometer.png
*tempdew.png
*wind.png
*winddir.png

*rain.png
*radiation.png

all get created as 310 x 200 instead of 500 x 180.

Where * = day, month, week, and year.

These files get scaled to 500 x 322.6 when rendered on my webpage: 

(This also happens with *humidity.png, *tempchill.png, *uv.png which are not displayed.)

I have not altered any image size from the base install.  I did add the [WeewxSaratoga] extension. but I don't see any interplay there.

I have not been able to find a smoking gun.  Any thoughts of where I should look?

Thanks.

Tom Keffer

unread,
Dec 31, 2023, 10:43:43 AM12/31/23
to weewx...@googlegroups.com
Without seeing your weewx.conf, and assuming you have not modified skin.conf, I would assume that the image size is getting overridden somehow in weewx.conf. Inspect the [StandardReport] stanza carefully.

If you have modified Seasons/skin.conf, then the same issue could apply there. 

-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/82ff856b-efa7-45d4-8c34-9230b9da74e4n%40googlegroups.com.

Doug England

unread,
Dec 31, 2023, 11:21:39 AM12/31/23
to weewx-user
Thansk for the prompt reply.  Yes, I did not think I was being very helpful without posting those, sorry.  I am getting an error message when I try to attach a file....  (goggle groups is pretty new to me but I assume it is lack of posts). 

Here are what I think the relevant parts are:

weewx.config:

##############################################################################

#   This section specifies what reports, using which skins, to generate.

[StdReport]
   
    # Where the skins reside, relative to WEEWX_ROOT
    SKIN_ROOT = /etc/weewx/skins
   
    # Where the generated reports should go, relative to WEEWX_ROOT
    HTML_ROOT = /var/www/html/weewx
   
    # Uncomment and change to override logging for reports
    # log_success = True
    # log_failure = True
   
    # The database binding indicates which data should be used in reports.
    data_binding = wx_binding
   
    # Each of the following subsections defines a report that will be run.
    # See the customizing guide to change the units, plot types and line
    # colors, modify the fonts, display additional sensor data, and other
    # customizations. Many of those changes can be made here by overriding
    # parameters, or by modifying templates within the skin itself.
   
    [[SeasonsReport]]
        # The SeasonsReport uses the 'Seasons' skin, which contains the
        # images, templates and plots for the report.
        skin = Seasons
        enable = true
   
    [[SmartphoneReport]]
        # The SmartphoneReport uses the 'Smartphone' skin, and the images and
        # files are placed in a dedicated subdirectory.
        skin = Smartphone
        enable = false
        HTML_ROOT = /var/www/html/weewx/smartphone
   
    [[MobileReport]]
        # The MobileReport uses the 'Mobile' skin, and the images and files
        # are placed in a dedicated subdirectory.
        skin = Mobile
        enable = false
        HTML_ROOT = /var/www/html/weewx/mobile
   
    [[StandardReport]]
        # This is the old "Standard" skin. By default, it is not enabled.
        skin = Standard
        enable = false
    [[WEEWXtagsReport]]
        skin = WEEWXtags
        enable = True
        [[[Units]]]
            [[[[StringFormats]]]]
                NONE = --
            [[[[TimeFormats]]]]
                date_f = %m/%d/%Y
                date_time_f = %m/%d/%Y %H:%M
    [[ClientrawReport]]
        skin = Clientraw
        enable = True
        [[[Units]]]
            [[[[StringFormats]]]]
                degree_C = %.1f
                degree_compass = %.0f
                foot = %.0f
                hPa = %.1f
                km = %.1f
                knot = %.1f
                mm = %.1f
                percent = %.0f
                uv_index = %.1f
                watt_per_meter_squared = %.0f
                NONE = --
   
    [[FTP]]
        # FTP'ing the results to a webserver is treated as just another report,
        # albeit one with an unusual report generator!
        skin = Ftp
       
        # If you wish to use FTP, set "enable" to "true", then
        # fill out the next four lines.
        # Use quotes around passwords to guard against parsing errors.
        enable = true
        user =
        password =
        server =     # The ftp server name, e.g, www.myserver.org
        path =     # The destination directory, e.g., /weather
       
        # Set to True for an FTP over TLS (FTPS) connection. Not all servers
        # support this.
        secure_ftp = False
       
        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        #HTML_ROOT = /var/www/html/weewx
       
        # Most FTP servers use port 21
        port = 21
       
        # Set to 1 to use passive mode, zero for active mode
        passive = 1
   
    [[RSYNC]]
        # rsync'ing to a webserver is treated as just another report
        skin = Rsync
       
        # If you wish to use rsync, you must configure passwordless ssh using
        # public/private key authentication from the user account that weewx
        # runs to the user account on the remote machine where the files
        # will be copied.
        #
        # If you wish to use rsync, set "enable" to "true", then
        # fill out server, user, and path.
        # The server should appear in your .ssh/config file.
        # The user is the username used in the identity file.
        # The path is the destination directory, such as /var/www/html/weather.
        # Be sure that the user has write permissions on the destination!
        enable = false
        server = replace_me
        user = replace_me
        path = replace_me
       
        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        #HTML_ROOT = /var/www/html/weewx
       
        # Rsync can be configured to remove files from the remote server if
        # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
        # make a mistake in the remote path, you could could unintentionally
        # cause unrelated files to be deleted. Set to 1 to enable remote file
        # deletion, zero to allow files to accumulate remotely.
        delete = 0
   
    # Options in the [[Defaults]] section below will apply to all reports.
    # What follows are a few of the more popular options you may want to
    # uncomment, then change.
    [[Defaults]]
       
        # Which language to use for all reports. Not all skins support all languages.
        # You can override this for individual reports.
        lang = en
       
        # Which unit system to use for all reports. Choices are 'us', 'metric', or 'metricwx'.
        # You can override this for individual reports.
        unit_system = us
       
        [[[Units]]]
           
            # Option "unit_system" above sets the general unit system, but overriding specific unit
            # groups is possible. These are popular choices. Uncomment and set as appropriate.
            # NB: The unit is always in the singular. I.e., 'mile_per_hour',
            # NOT 'miles_per_hour'
            [[[[Groups]]]]
                # group_altitude     = meter              # Options are 'foot' or 'meter'
                # group_pressure     = mbar               # Options are 'inHg', 'mmHg', 'mbar', or 'hPa'
                # group_rain         = mm                 # Options are 'inch', 'cm', or 'mm'
                # group_rainrate     = mm_per_hour        # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
                # group_temperature  = degree_C           # Options are 'degree_C', 'degree_F', or 'degree_K'
                # The following line is used to keep the above lines indented properly.
                # It can be ignored.
                unused = unused
           
            # Uncommenting the following section frequently results in more
            # attractive formatting of times and dates, but may not work in
            # your locale.
            [[[[TimeFormats]]]]
                # day        = %H:%M
                # week       = %H:%M on %A
                # month      = %d-%b-%Y %H:%M
                # year       = %d-%b-%Y %H:%M
                # rainyear   = %d-%b-%Y %H:%M
                # current    = %d-%b-%Y %H:%M
                # ephem_day  = %H:%M
                # ephem_year = %d-%b-%Y %H:%M
                # The following line is used to keep the above lines indented properly.
                # It can be ignored.
                unused = unused
       
        [[[Labels]]]
            # Users frequently change the labels for these observation types
            [[[[Generic]]]]
                # inHumidity     = Inside Humidity
                # inTemp         = Inside Temperature
                # outHumidity    = Outside Humidity
                # outTemp        = Outside Temperature
                # extraTemp1     = Temperature1
                # extraTemp2     = Temperature2
                # extraTemp3     = Temperature3
                # The following line is used to keep the above lines indented properly.
                # It can be ignored.
                unused = unused


I am a bit hesitant to post  700+ lines  of skin.conf.  until I can figure out the attachments,  here are some snippets:

<SNIP>

    # This list determines which plots will be shown, as well as the order in
    # which they will be displayed.  The names refer to the plots defined in
    # the ImageGenerator section, without any time span prefix.  For example,
    # the name 'wind' refers to 'daywind', 'weekwind', 'monthwind', and
    # 'yearwind'.
    plot_groups = barometer, tempdew, tempfeel, hum, wind, winddir, windvec, rain, ET, UV, radiation, lightning, tempin, humin, tempext, humext, tempext2, humext2, templeaf, wetleaf, tempsoil, moistsoil, pm
    telemetry_plot_groups =rx, volt

    # The list of time spans used within the skin
    periods = day, week, month, year

<SNIP>

##############################################################################

# The ImageGenerator creates image plots of data.

[ImageGenerator]

    # This section lists all the images to be generated, what SQL types are to be included in them,
    # along with many plotting options. There is a default for almost everything. Nevertheless,
    # values for most options are included to make it easy to see and understand the options.
    #
    # Nearly all types in the wview-extended schema are included. However, because of the
    # 'skip_if_empty' option, only the plots with non-null data will be actually produced.
    #
    # Fonts can be anything accepted by the Python Imaging Library (PIL), which includes truetype
    # (.ttf), or PIL's own font format (.pil). Note that "font size" is only used with truetype
    # (.ttf) fonts. For others, font size is determined by the bit-mapped size, usually encoded in
    # the file name (e.g., courB010.pil). A relative path for a font is relative to the SKIN_ROOT.
    # If a font cannot be found, then a default font will be used.
    #
    # Colors can be specified any of three ways:
    #   1. Notation 0xBBGGRR;
    #   2. Notation #RRGGBB; or
    #   3. Using an English name, such as 'yellow', or 'blue'.
    # So, 0xff0000, #0000ff, or 'blue' would all specify a pure blue color.
   
    image_width = 500
    image_height = 180
    image_background_color = "#ffffff"
   
    chart_background_color = "#ffffff"
    chart_gridline_color = "#d0d0d0"

    # Setting to 2 or more might give a sharper image with fewer jagged edges
    anti_alias = 1

<SNIP>

# Do not generate a plot if it does not have any non-null data:
    skip_if_empty = year

    # What follows is a list of subsections, each specifying a time span, such as a day, week,
    # month, or year. There's nothing special about them or their names: it's just a convenient way
    # to group plots with a time span in common. You could add a time span [[biweek_images]] and
    # add the appropriate time length, aggregation strategy, etc., without changing any code.
    #
    # Within each time span, each sub-subsection is the name of a plot to be generated for that
    # time span. The generated plot will be stored using that name, in whatever directory was
    # specified by option 'HTML_ROOT' in weewx.conf.
    #
    # With one final nesting (four brackets!) is the sql type of each line to be included within
    # that plot.
    #
    # Unless overridden, leaf nodes inherit options from their parent.

    [[day_images]]
        x_label_format = %H:%M
        bottom_label_format = %x %X
        time_length = 97200 # 27 hours
       
        [[[daybarometer]]]
            [[[[barometer]]]]
       
        [[[daytempdew]]]
            [[[[outTemp]]]]
            [[[[dewpoint]]]]
       
        [[[daytempfeel]]]
            [[[[windchill]]]]
            [[[[heatindex]]]]

        [[[dayhum]]]
            [[[[outHumidity]]]]

        [[[daytempin]]]
            [[[[inTemp]]]]

        [[[dayhumin]]]
            [[[[inHumidity]]]]

        # Plot extra temperatures.  You can add more temperature sensors here.
        # However, you might want to make a second plot if your system has more
        # than 3 extra sensors, otherwise the plots can become rather busy.


<SNIP>


Sorry for the inconvenience. 

Tom Keffer

unread,
Dec 31, 2023, 11:53:30 AM12/31/23
to weewx...@googlegroups.com
You are simultaneously running two other reports, WEEWXtagsReport and ClientrawReport, without giving them a separate destination. Most likely, one or the other of them is regenerating the image, using the smaller format, and overwriting the Seasons version.

Doug England

unread,
Dec 31, 2023, 11:58:09 AM12/31/23
to weewx-user
I will dig in that direction.  Thanks.  

Doug England

unread,
Dec 31, 2023, 1:21:02 PM12/31/23
to weewx-user

Doug England

unread,
Dec 31, 2023, 2:24:50 PM12/31/23
to weewx-user
Thanks for the help... The problem was in  WEEWXtagsReport.  It was generating the rogue images at 310x200.

gjr80

unread,
Dec 31, 2023, 10:52:40 PM12/31/23
to weewx-user
I'm a little surprised that this has not come up before, perhaps there are only two users of weewx-saratoga :)

In any case I have changed the weewx-sarataoga installer and realtime clientraw service to save generated content to public_html/saratoga by default. This will appear in the next weewx-saratoga release.

Gary

Doug England

unread,
Jan 1, 2024, 10:06:04 AM1/1/24
to weewx-user
Thanks Gary.  

If I was not ALSO publishing what WeeWx was creating as a page, I don't think I would have ever noticed.  I have not figured out how/where image files (except for daywindrose.png) generated by weewx-saratoga are used.  

Looks like I broke something else yesterday when I fixed the graphs.  WeeWX FTP and WeeWX weather data are no longer getting updated.... they both show a timestamp about the same time as when I edited the skin.conf:   https://dougengland.com/wxstatus.php

gjr80

unread,
Jan 2, 2024, 9:51:00 PM1/2/24
to weewx-user
On Tuesday 2 January 2024 at 01:06:04 UTC+10 deng...@cfl.rr.com wrote:
If I was not ALSO publishing what WeeWx was creating as a page, I don't think I would have ever noticed.  I have not figured out how/where image files (except for daywindrose.png) generated by weewx-saratoga are used. 

The day, week, month and year plots are used on the Saratoga 'Station Graphs' page which normally sits under 'Almanac' in an out of-the-box Saratoga install. I see on your site you don't have 'Almanac' on the navigation menu and have a different set of plots. No matter, generating the weewx-saratoga plots won't do anything other than taking up processing time and perhaps bandwidth if uploading. If you don't want to generate them you can remove the weewx.imagegenerator.ImageGenerator entry from the [Generators] generator_list setting in the WEEWXtags skin.conf. To prevent old versions from being uploaded just delete the generated files from public_html/saratoga on your WeeWX machine.
 
Looks like I broke something else yesterday when I fixed the graphs.  WeeWX FTP and WeeWX weather data are no longer getting updated.... they both show a timestamp about the same time as when I edited the skin.conf:   https://dougengland.com/wxstatus.php

Sorry it was a couple of days before I replied, but looking at your site and status page just now I'm guessing you got it fixed.

Gary
Reply all
Reply to author
Forward
0 new messages