Help with image generation

90 views
Skip to first unread message

cric...@pobox.com

unread,
Mar 15, 2025, 5:03:48 PM3/15/25
to weewx-user
So... this is one of my non-standard uses of weewx I need some help with.  I'm plotting several parameters from a 2x2 array of lithium ion batteries using bluetooth data from them.  The issue is I'm plotting 4 batteries (and in one  case the average of them) in each plot, so the data is a bit dense.  I'm trying make the plots bigger by futzing with:
    image_width  = 600
    image_height = 360

and when I change those, it really seems to screw up the plots (the fonts go tiny and the line widths revert to one (have them set to 2 at the moment).  One iteration had these settings, but made things significantly worse (when enabled):
        #image_width = 1800
        #image_height = 800

        #top_label_font_size    = 16
        #unit_label_font_size   = 16
        #axis_label_font_size   = 16
        #bottom_label_font_size = 16
        #bottom_label_offset    = 5

I seem to be missing some magic with how images are generated.  Anyhow, this should show the results (updates 2x/hr): https://www.csrhome.online/redodo/index.html

Any suggestions are welcome.  FWIW, this is using weewx 4.10.2, Seasons skin.
Nothing fancy other than the data source (using mqtt subscribe from Rich).

Thx, Chris

Chuck Rhode

unread,
Mar 15, 2025, 6:32:18 PM3/15/25
to weewx...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 15 Mar 2025 14:03:47 -0700 (PDT)
"cric...@pobox.com" <cric...@pobox.com> wrote:

> Any suggestions are welcome.

Did you say, "ANY suggestions?" This is a long shot: How about the
replacement image generator that comes with the Phenology extension?

+ http://lacusveris.com/Phenology

It's ... different. It aims to reproduce "Seasons" skin images
exactly, so it probably suffers from the same magnification issues, but
maybe not. Save this for a last-ditch effort, though.

- --
.. Be Seeing You,
.. Chuck Rhode, Sheboygan, WI, USA
.. Weather: https://LacusVeris.com/Wx
.. 50° — Wind SW at 23 mph. Sky overcast; light rain.
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQT+MY/5I/LMPSswTbVg2/xipKOWUgUCZ9X/zAAKCRBg2/xipKOW
UsQNAJsGEpOVAbdAWTYcxYnaCmANAA2cJwCffoBx7RE8nSquYsZY1fcS+BWbPPk=
=ZESb
-----END PGP SIGNATURE-----

jterr...@gmail.com

unread,
Mar 16, 2025, 4:21:12 AM3/16/25
to weewx-user
This is due to the fact that by design the Seasons skin is displaying all charts with a witdth of 500px.  
WIth your current skin, the real size of your charts is  600 x 360  ( see https://www.csrhome.online/redodo/dayBattCap.png?v=1742080493), but the image is reduced to a width of 500px  within the skin home page .

You can ajust  this by changing  the 500px to any other desired value in the seasons.css  file  : 

#history_widget img {
bordernone;
margin-bottom10px;
width500px/* should match the image width in skin.conf */
}

#history_widget.widget_title {
min-width500px;
}

cric...@pobox.com

unread,
Mar 17, 2025, 8:13:50 AM3/17/25
to weewx-user

So… after a day of screwing around I think I have this “working.”  So using (in seasons.css):

#history_widget img {

    width: 900px; /* should match the image width in skin.conf */

*AND*

@media (max-width:900px) {

    #plot_group { overflow: visible; float: left; }

}

@media (min-width:901px) {

    #plot_group { overflow: hidden; float: none; }

 Not sure the @media changes were needed, but the values matched so it seemed like a good idea.

 Along with this in skin.conf:

[ImageGenerator]

    image_width  = 900

    image_height = 400

 and some font enlargements for axis labels, the graphs are much easier to read.

 What isn’t resolved is the aggressive Brave browser caching.  Using Inspect in the regular and

Incognito mode tabs of the rendered pages showed some unexpected behaviors.  I’m looking up

how to make sure a page reload actually reloads everything.  It seems like the .css file is rather sticky,

but there are options to avoid that I'll try today.  Clearing all cached data to restore everything so

I avoid it when I can.

Chuck, I'm guessing switching image generators wouldn't have solved the problem.

Thx a bunch for the pointers, Chris

Reply all
Reply to author
Forward
0 new messages