Page 1 of 1

V 2.7.3 Upgrade Issues

Posted: Fri 18 Oct 2019 8:52 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Fri 18 Oct 2019 9:18 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Fri 18 Oct 2019 9:19 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Fri 18 Oct 2019 9:37 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Fri 18 Oct 2019 9:56 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Fri 18 Oct 2019 10:03 pm
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

Re: V 2.7.3 Upgrade Issues

Posted: Fri 18 Oct 2019 10:09 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Fri 18 Oct 2019 11:41 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Sat 19 Oct 2019 12:03 am
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) {

Re: V 2.7.3 Upgrade Issues

Posted: Sat 19 Oct 2019 12:13 am
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 ????

Re: V 2.7.3 Upgrade Issues

Posted: Sat 19 Oct 2019 6:34 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Sat 19 Oct 2019 10:17 pm
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)

Re: V 2.7.3 Upgrade Issues

Posted: Sun 20 Oct 2019 1:24 pm
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.

Re: V 2.7.3 Upgrade Issues

Posted: Thu 24 Oct 2019 1:49 am
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.

Re: V 2.7.3 Upgrade Issues

Posted: Thu 24 Oct 2019 8:29 am
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);
    }