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 4019) - 03 April 2024
Legacy Cumulus 1 release 1.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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.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
Default Gauge Scale
Moderator: mcrossley
-
- Posts: 884
- Joined: Sat 16 Jul 2016 11:59 pm
- Weather Station: Davis VP2+ & GW1000 (Standalone)
- Operating System: Win10 Pro / rPi Buster
- Location: Australia
Default Gauge Scale
Hi all,
I've looked at the code a few times, but not sure where to start.
Would like my gauges to default to a range of 0-40°C instead of -10 as the starting point.
We do see -5 t0 -10 in Winter, so would need to auto rescale then, but can anyone give me a rough idea of which lines will let me set 0°C as the default gauge minimum.
Thanks
Phil.
I've looked at the code a few times, but not sure where to start.
Would like my gauges to default to a range of 0-40°C instead of -10 as the starting point.
We do see -5 t0 -10 in Winter, so would need to auto rescale then, but can anyone give me a rough idea of which lines will let me set 0°C as the default gauge minimum.
Thanks
Phil.
:Now: :Today/Yesterday:
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:
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:
- mcrossley
- Posts: 12763
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Default Gauge Scale
Phil, is this on the MX interface, or the web page?
- mcrossley
- Posts: 12763
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Default Gauge Scale
For MX, ..../CumlusMX/interface/lib/steelseries/scripts/gauges.js
Line 106+
Line 106+
-
- 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: Default Gauge Scale
Thanks Mark,mcrossley wrote:Phil, is this on the MX interface, or the web page?
Primarily the web page, and that's around where I looked.
Code: Select all
// default gauge ranges - before auto-scaling/ranging
tempScaleDefMinC : -20,
tempScaleDefMaxC : 40,
Interesting though that both web & interface code contains -20 as default,
yet the web page gauge is starting at -10 & the interface at -20.
If I've explained it so it makes sense.
Or maybe I'm confused cause I may have previously edited the file.
Phil
:Now: :Today/Yesterday:
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:
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:
- mcrossley
- Posts: 12763
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Default Gauge Scale
I can't check as I'm not at home at the moment, but I suspect it may be a "niceScale" thing that is altering the scale to a range of 50. The gauges on my web page go from -20 to 40 though.
A link to your page?...
A link to your page?...
-
- 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: Default Gauge Scale
Thanks Mark,
I have managed to get it to scale from 0 to 40 by changing "tempScaleDefMaxC" on line 107 of gauges.js
Noticed later though that the gauge had rescaled it's self to 0-50.
Presume that was done by what's down around line 829.
Not at all a Java programmer, but am assuming that the rescaling is based on the maximum temp & it may have happened once we hit 30 today.
Presume also that it stays scaled that way for the rest of the day.
Changed the value here from 10 to 5, but think it's still observing todays maximum & rescaling the 40 up to 45.
My site is in my signature.
Cheers
Phil.
I have managed to get it to scale from 0 to 40 by changing "tempScaleDefMaxC" on line 107 of gauges.js
Noticed later though that the gauge had rescaled it's self to 0-50.
Presume that was done by what's down around line 829.
Code: Select all
//auto scale the ranges
scaleStep = data.tempunit[1] === 'C' ? 5 : 20;
while (cache.lowScale < cache.minValue) {
cache.minValue -= scaleStep;
if (cache.highScale <= cache.maxValue - scaleStep) {
cache.maxValue -= scaleStep;
}
}
while (cache.highScale > cache.maxValue) {
cache.maxValue += scaleStep;
if (cache.minValue >= cache.minValue + scaleStep) {
cache.minValue += scaleStep;
}
}
if (cache.minValue !== ssGauge.getMinValue() || cache.maxValue !== ssGauge.getMaxValue()) {
ssGauge.setMinValue(cache.minValue);
ssGauge.setMaxValue(cache.maxValue);
ssGauge.setValue(cache.minValue);
}
if (cache.selected === 'out') {
cache.areas = [steelseries.Section(+cache.low, +cache.high, gaugeGlobals.minMaxArea)];
} else {
cache.areas = [];
}
Presume also that it stays scaled that way for the rest of the day.
Changed the value here from 10 to 5, but think it's still observing todays maximum & rescaling the 40 up to 45.
Code: Select all
scaleStep = data.tempunit[1] === 'C' ? 5 : 20;
Cheers
Phil.
:Now: :Today/Yesterday:
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:
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:
- mcrossley
- Posts: 12763
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Default Gauge Scale
It should only re-scale when the current value exceeds the current scale limits, so hitting 30 shouldn't have done that.
I'd need to examine what the code on your site is doing - maybe I'll have time this evening. Meantime - are you running the latest version of the gauges script?
I'd need to examine what the code on your site is doing - maybe I'll have time this evening. Meantime - are you running the latest version of the gauges script?
-
- 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: Default Gauge Scale
Still on Cumulus 3041 & "Scripts by Mark Crossley - version 2.5.5"
Got a little lost on how exactly to upgrade the steel script stuff.
I did download it from Github a while back but was not sure how to proceed from there.
Phil.
Got a little lost on how exactly to upgrade the steel script stuff.
I did download it from Github a while back but was not sure how to proceed from there.
Phil.
:Now: :Today/Yesterday:
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:
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:
-
- 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: Default Gauge Scale
Noticed the gauge returned to the 0-40 scale this morning, presuming at the 9:00am rollover.mcrossley wrote:It should only re-scale when the current value exceeds the current scale limits, so hitting 30 shouldn't have done that.
Have since noticed it's rescaled to 0-45°C.
I did change the scaleStep to 5 yesterday.
Code: Select all
//auto scale the ranges
scaleStep = data.tempunit[1] === 'C' ? 5 : 20;
Edit:-
Now it's scaled back to 0-40°C.
Bit lost on what's triggering it.
:Now: :Today/Yesterday:
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:
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:
-
- 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: Default Gauge Scale
Also read this post,
https://cumulus.hosiene.co.uk/viewtopic.php?t=14863
Don't think it's relevant. Not sure, as I'm seeing 0-45.
https://cumulus.hosiene.co.uk/viewtopic.php?t=14863
Don't think it's relevant. Not sure, as I'm seeing 0-45.
:Now: :Today/Yesterday:
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:
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:
- mcrossley
- Posts: 12763
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Default Gauge Scale
OK, the scales of the "temperature" and "dew/apparent/.." gauges are linked, so they show the same range. If the Apparent temp goes over 40 then both gauges will rescale. During thr day your apparent temperature is quite a bit higher than your actual temperature I suspect?