Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

V 2.7.3 Upgrade Issues

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

Post Reply
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

V 2.7.3 Upgrade Issues

Post by Phil23 »

Just upgraded to 2.7.3.

First on a test site:- http://inverellit.com/weather2/gauges.htm

And after confirming all looked fine upgraded my live site:-

http://weather.inverellit.com/gauges.htm

What I'm seeing on the main site is that the temp graphs are stuck at a -30 to 40°C Scale,
While on the test site it is scaling as per my changes to gauges.js.

Code: Select all

            // default gauge ranges - before auto-scaling/ranging
            tempScaleDefMinC      : 0,
            tempScaleDefMaxC      : 35,
            tempScaleDefMinF      : 0,
            tempScaleDefMaxF      : 100,
            baroScaleDefMinhPa    : 990,

Interesting that if you toggle between inside & outside temp on the live site it scales as expected for the inside temp.


Thanks

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: V 2.7.3 Upgrade Issues

Post by Mapantz »

Are you talking about the scale on the dials? Or the graphs that appear when you hover? If it's the latter, both show the scale to be -20 to 40 for me.
Image
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

Further detail;

Settting

Code: Select all

            // default gauge ranges - before auto-scaling/ranging
            tempScaleDefMinC      : -5,
            tempScaleDefMaxC      : 35,
Gives me scales of -15 to 35 for Outside & -5 to 35 for inside.

Settting

Code: Select all

            // default gauge ranges - before auto-scaling/ranging
            tempScaleDefMinC      : -10,
            tempScaleDefMaxC      : 40,
Gives me scales of -20 to 30 for Outside & -10 to 40 for inside.

Dew Point & all other values on the 2nd gauge behave the same as outside temp; It's only inside temp that seems to be working correctly on the live site.

Can't quite understand it as I created the test site by downloading the entire content of weather.inverellit.com, (public_html/weather, configured as a subdomain)
and uploaded it to public_html/weather2.

Did overwrite existing content, so the may have been something left behind.

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

On my Better Half's advice, I just place a copy of the gauges.js from /weather2 in /weather.....
To prove my point...

No change what so ever, so it's behaviour is being dictated by something outside gauges.js.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

Further anomalies,
Behaving differently between my Win10 Laptop & an i7 Win7 PC

When I first display the page the scale is currently,
-20 to 30.

Changing to Inside it scales to,
0 to 40. (As set).

On changing back to Outside, it first scales to,
-20 to 30.

Then the gauge resets scaling to,
-15 to 30.

Actual Outside Temp is showing at 16.4°C during this testing.

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: V 2.7.3 Upgrade Issues

Post by Mapantz »

This link:
http://weather.inverellit.com/gauges.htm

Shows 0 - 40 on both outside and inside

This link:

http://inverellit.com/weather2/gauges.htm

Shows 0 - 35 on both outside and inside
Image
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

No it's magically working as expected on my Win10.

Something cached possibly?
And now it's maybe timed out?

Tried all the usual suspects like hard refresh & deleting temp files; none of which worked,
But now it's Ok...

Would still be interested to have a little light shed on the matter.

Cheers

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

Spoke too soon.

Scaling is now not as expected now the temp has reached 22°C.

Currently showing -10 to 30.

Inside has stayed scaled at my 0 to 40, with it currently being 19°C.

On thing I didn't mention about the test site /Weather2 is that it is not receiving realtime updates, so it's static at 24.8°C & is scaling 0 to 35 as currently set.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

I had a feeling I'd been down this road before....

viewtopic.php?f=28&t=15988&p=122593&hil ... le#p122593

Re reading those posts & others trying to make more sense of it & how the scaling works.

Understand now it needs to scale to accommodate Dewpoint which is currently -3.6°C while Temp is on 23.6.

Still haven't found a clear expalination to how nicescale works & a bit unsure of the purpose of the second value here...

Code: Select all

                    // auto scale the ranges
                    scaleStep = data.tempunit[1] === 'C' ? 10 : 20;
                    while (cache.lowScale < cache.minValue) {
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: V 2.7.3 Upgrade Issues

Post by beteljuice »

Before you tweak ...

There is something wrong ! - your graphs are showing days worth of info instead the day.

If the gauges are 'reserving' for the same extremes ????
Image
......................Imagine, what you will KNOW tomorrow !
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

beteljuice wrote: Sat 19 Oct 2019 12:13 am There is something wrong ! - your graphs are showing days worth of info instead the day.
Graphs are fine it's just that I've got them set to upload 7 days data.

The regular charts are zoomed back to 48 hours, but the server side popups can't be scaled back, so just display the full JSON range.

Not much related code between the gauges & popups.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

At a total loss as to what's going on here.

Still only the inside gauge is as expected.
Uploaded original gauges.js, & it follows defaults.

Change ONLY Line 114,
Absolutely nothing else; nicescale still set to true etc

Code: Select all

            tempScaleDefMinC      : -10,
And all temp gauges except inside stay at -20 but the scale step changes to 5°C.

Un-edited original Gauges.js from Dist.
Gauge1.JPG

After Changing Scale Min to -10...
Gauge2.JPG
Gauge3.JPG


Edit:-
And on completing this post & going back to the page they are now scaled as expected except of the Scale Step still stepping at 5.
Gauge4.JPG
Two additional changes since the above tests but they are just:-

Code: Select all

            realtimeInterval   : 5,                     // *** Download data interval, set to your realtime data update interval in seconds
            graphUpdateTime    : 5,                     // period of pop-up data graph refresh, in minutes (default 15)
You do not have the required permissions to view the files attached to this post.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
mcrossley
Posts: 12686
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: V 2.7.3 Upgrade Issues

Post by mcrossley »

I don't see any issues with the scaling, at the moment the temperature scale is -5 to 35 which is what you have defined as the min max in the script.

Your dew point is frequently going below -5 or even -10. When that happens the gauge has to re-scale below your defined min of -5. Then the "nice scale" will kick in and pick new min max for you that create a "nice scale" with 10 points between the max and min that are increments of 5 or 10 and encompass the range of values to be displayed.
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: V 2.7.3 Upgrade Issues

Post by Phil23 »

Still not understanding why I'm getting a major units every 5C even when I enable nicescale & set max & min to multiples of 10.

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
mcrossley
Posts: 12686
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: V 2.7.3 Upgrade Issues

Post by mcrossley »

Hmm, I'd have to debug the code as you page loads but I don't have time at the moment. In theory if nothing has changed then you should get the same scale steps each time.
Here is how they are worked out...

Code: Select all

    function calcNiceNumber(range, round) {
        var exponent = Math.floor(Math.log10(range)),   // exponent of range
            fraction = range / Math.pow(10, exponent),  // fractional part of range
            niceFraction;                               // nice, rounded fraction

        if (round) {
            if (1.5 > fraction) {
                niceFraction = 1;
            } else if (3 > fraction) {
                niceFraction = 2;
            } else if (7 > fraction) {
                niceFraction = 5;
            } else {
                niceFraction = 10;
            }
        } else {
            if (1 >= fraction) {
                niceFraction = 1;
            } else if (2 >= fraction) {
                niceFraction = 2;
            } else if (5 >= fraction) {
                niceFraction = 5;
            } else {
                niceFraction = 10;
            }
        }
        return niceFraction * Math.pow(10, exponent);
    }
Post Reply