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 4021) - 04 May 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 4021) - 04 May 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
Solar Gauge "Wedge" Issue
Moderator: mcrossley
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Solar Gauge "Wedge" Issue
I originally posted this in the Cumulus MX forum as I wasn't sure if it was a program bug or something to do with the gauges. I didn't get any replies and after some experimenting I discovered it is to do with the gauges so I will post here.
The shaded background "wedge" for the current theoretical maximum reading usually begins at the current maximum and extends upward by 100 W/m2.
I have noticed that it will not extend beyond 1000 W/m2. The wedge shrinks when the max is between 900 and 1000 and disappears when it exceeds 1000 and returns once again when it falls back below 1000. This happens in the GUI and on uploaded web pages.
My experiment: I changed "solarGaugeScaleMax : 1000, " in gauges.js to "solarGaugeScaleMax : 1400, "
The "wedge" works properly this way, but the range starts out at 1400 instead of 1000 and increasing when needed.
Is there a setting to make the "wedge" work without having the range set so high?
Thanks
The shaded background "wedge" for the current theoretical maximum reading usually begins at the current maximum and extends upward by 100 W/m2.
I have noticed that it will not extend beyond 1000 W/m2. The wedge shrinks when the max is between 900 and 1000 and disappears when it exceeds 1000 and returns once again when it falls back below 1000. This happens in the GUI and on uploaded web pages.
My experiment: I changed "solarGaugeScaleMax : 1000, " in gauges.js to "solarGaugeScaleMax : 1400, "
The "wedge" works properly this way, but the range starts out at 1400 instead of 1000 and increasing when needed.
Is there a setting to make the "wedge" work without having the range set so high?
Thanks
- mcrossley
- Posts: 12812
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Solar Gauge "Wedge" Issue
Missed this one!
I took a look at my web page and wasn't able to reproduce this - then I looked at the released code! My personal copy is quite a bit different in this area as it show multiple 'segments' for the sunshine threshold etc. I must get these changes released some day!
Anyway, the quick fix is (version 2.6.1 of the script):
Change the code starting at line 2493 from...
to...
I took a look at my web page and wasn't able to reproduce this - then I looked at the released code! My personal copy is quite a bit different in this area as it show multiple 'segments' for the sunshine threshold etc. I must get these changes released some day!
Anyway, the quick fix is (version 2.6.1 of the script):
Change the code starting at line 2493 from...
Code: Select all
// Set a section (100 units wide) to show current theoretical max value
if (data.CurrentSolarMax !== 'N/A') {
ssGauge.setArea([steelseries.Section(cache.currMaxValue, Math.min(cache.currMaxValue + 100,
gaugeGlobals.solarGaugeScaleMax), 'rgba(220,0,0,0.5)')]);
}
// Need to rescale the gauge?
cache.maxValue = Math.max(cache.value, cache.currMaxValue, cache.maxToday, gaugeGlobals.solarGaugeScaleMax);
cache.maxValue = nextHighest(cache.maxValue, 100);
if (cache.maxValue !== ssGauge.getMaxValue()) {
ssGauge.setMaxValue(cache.maxValue);
}
Code: Select all
// Need to rescale the gauge?
cache.maxValue = Math.max(cache.value, cache.currMaxValue, cache.maxToday, gaugeGlobals.solarGaugeScaleMax);
cache.maxValue = nextHighest(cache.maxValue, 100);
if (cache.maxValue !== ssGauge.getMaxValue()) {
ssGauge.setMaxValue(cache.maxValue);
cache.maxValue = ssGauge.getMaxValue();
}
// Set a section (100 units wide) to show current theoretical max value
if (data.CurrentSolarMax !== 'N/A') {
ssGauge.setArea([steelseries.Section(cache.currMaxValue, Math.min(cache.currMaxValue + 100,
cache.maxValue), 'rgba(220,0,0,0.5)')]);
}
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Re: Solar Gauge "Wedge" Issue
Thanks - working well now.
I had never upgraded from the 2.5.5 script that is included in the CMX download and this doesn't work with that version.
This forced me to finally get around to figuring out how to upgrade the gauges and deciphering my notes on the modifications I had made to gauges.js
I had never upgraded from the 2.5.5 script that is included in the CMX download and this doesn't work with that version.
This forced me to finally get around to figuring out how to upgrade the gauges and deciphering my notes on the modifications I had made to gauges.js
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Re: Solar Gauge "Wedge" Issue
Jumped the gun a bit on my report - I had already had a W/m2 reading above 1000 when I got things sorted yesterday.
Today, the wedge still slowly disappeared as the theoretical approached 1000. When the clouds cleared and the actual reading exceeded 1000 redrawing the range, the wedge reappeared correctly.
I guess that means that only the actual reading can cause the range to redraw and things would have to be changed so that the upper end of the wedge would cause a redraw for it to work completely correct.
I have no idea if that is even possible but did want to update my comments.
Thanks again for your work on this!
Today, the wedge still slowly disappeared as the theoretical approached 1000. When the clouds cleared and the actual reading exceeded 1000 redrawing the range, the wedge reappeared correctly.
I guess that means that only the actual reading can cause the range to redraw and things would have to be changed so that the upper end of the wedge would cause a redraw for it to work completely correct.
I have no idea if that is even possible but did want to update my comments.
Thanks again for your work on this!
-
- Posts: 1256
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Solar Gauge "Wedge" Issue
Seem to have the same/similar issue with the pressure gauge.
The "fix" has not change the solar gauge behavior (yet).
Have also had occasional errors showing in the server logs with reference to a 404 document not found for the file .../lib/steelseries/scripts/language.min.js.map
As this file seems not to exist anywhere and I can find no direct reference to it in any of the scripts I have checked, am at a loss to determine where this may come from.
The "fix" has not change the solar gauge behavior (yet).
Have also had occasional errors showing in the server logs with reference to a 404 document not found for the file .../lib/steelseries/scripts/language.min.js.map
As this file seems not to exist anywhere and I can find no direct reference to it in any of the scripts I have checked, am at a loss to determine where this may come from.
- mcrossley
- Posts: 12812
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Solar Gauge "Wedge" Issue
Dah! Knew I should have tested it but didn't have time. I'm on holiday at the moment, I'll take another look when I can...Herbaldew wrote:Jumped the gun a bit on my report - I had already had a W/m2 reading above 1000 when I got things sorted yesterday.
Today, the wedge still slowly disappeared as the theoretical approached 1000. When the clouds cleared and the actual reading exceeded 1000 redrawing the range, the wedge reappeared correctly.
I guess that means that only the actual reading can cause the range to redraw and things would have to be changed so that the upper end of the wedge would cause a redraw for it to work completely correct.
I have no idea if that is even possible but did want to update my comments.
Thanks again for your work on this!
- mcrossley
- Posts: 12812
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Solar Gauge "Wedge" Issue
The map files are loaded (or should I looked for and loaded if present) by your browser when it is in "developer" mode - they translate minimised files back to the original source file variable names to ease debugging. The browser will not attempt to load them when loading the page outside "dev mode".BCJKiwi wrote:Seem to have the same/similar issue with the pressure gauge.
The "fix" has not change the solar gauge behavior (yet).
Have also had occasional errors showing in the server logs with reference to a 404 document not found for the file .../lib/steelseries/scripts/language.min.js.map
As this file seems not to exist anywhere and I can find no direct reference to it in any of the scripts I have checked, am at a loss to determine where this may come from.
- mcrossley
- Posts: 12812
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Solar Gauge "Wedge" Issue
OK, I've re-read this more carefully and played with the supplied code. The code is behaving as I expected, and as you describe. You are mainly correct, the actual reading going above 1000 will cause a rescale (as will todays max reading and/or the theoretical value exceeding 1000), the upper end of the wedge going above 1000 will not.Herbaldew wrote:Jumped the gun a bit on my report - I had already had a W/m2 reading above 1000 when I got things sorted yesterday.
Today, the wedge still slowly disappeared as the theoretical approached 1000. When the clouds cleared and the actual reading exceeded 1000 redrawing the range, the wedge reappeared correctly.
I guess that means that only the actual reading can cause the range to redraw and things would have to be changed so that the upper end of the wedge would cause a redraw for it to work completely correct.
I have no idea if that is even possible but did want to update my comments.
Thanks again for your work on this!
If your readings are regularly pushing up to the magic 1000 (without any spikes to cause a rescale), then I suggest you change the max gauge scale to 1100 to give a bit more headroom? Set via gaugeGlobals.solarGaugeScaleMax...
Code: Select all
solarGaugeScaleMax : 1000, // Max value to be shown on the solar gauge - theoretical max without atmosphere ~ 1374 W/m²
// - but Davis stations can read up to 1800, use 1000 for Northern Europe?
If you want to go off-piste, and rescale to show the full "over theoretical" segment regardless of values chosen for scales etc, then change:
Code: Select all
cache.maxValue = Math.max(cache.value, cache.currMaxValue, cache.maxToday, gaugeGlobals.solarGaugeScaleMax);
Code: Select all
cache.maxValue = Math.max(cache.value, cache.currMaxValue + 100, cache.maxToday, gaugeGlobals.solarGaugeScaleMax);
- mcrossley
- Posts: 12812
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Solar Gauge "Wedge" Issue
The pressure gauge works differently from the solar in that the sectors are no fixed size. They just display from your all-time min/max pressures to the start/end of the gauge scale. So the sector widths will vary according to how close those records are to the scale limits. There is a minimum 'buffer' value between the records and the scale limits of 2 hPa (0.1 inHg), which forces a gauge rescale if the sector size would be smaller than those values.BCJKiwi wrote:Seem to have the same/similar issue with the pressure gauge.
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Re: Solar Gauge "Wedge" Issue
Working perfectly as far as I can see now. The little voice in the back of my mind was telling that a "+ 100" somewhere would make it do what I wanted
Thanks again.
Thanks again.
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Re: Solar Gauge "Wedge" Issue
Playing with this gauge again and am stuck as usual
I am trying to get the "wedge" to not display when the current theoretical max = zero.
I have been trying to manipulate this section of code:
Everything I try breaks the display. Am I even barking up the right tree?
Here is the code from the theoretical solar section of my current gauges.js (altered to show wedge -50 to + 50 instead of the default +100):
Thanks - Herb
I am trying to get the "wedge" to not display when the current theoretical max = zero.
I have been trying to manipulate this section of code:
Code: Select all
if (data.CurrentSolarMax !== 'N/A')
Here is the code from the theoretical solar section of my current gauges.js (altered to show wedge -50 to + 50 instead of the default +100):
Code: Select all
// Set a section (100 units wide) to show current theoretical max value
if (data.CurrentSolarMax !== 'N/A') {
ssGauge.setArea([steelseries.Section(cache.currMaxValue - 50, Math.min(cache.currMaxValue + 50,
cache.maxValue), 'rgba(255,0,0,0.5)')]);
}
Thanks - Herb
- mcrossley
- Posts: 12812
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Solar Gauge "Wedge" Issue
You could change
to
Since that is intended for software that does not provide the data.
But you will also need an 'else' to remove the section once it reaches zero, otherwise the last section will always be displayed.
Code: Select all
if (data.CurrentSolarMax !== 'N/A')
Code: Select all
if (cache.currMaxValue > 0)
But you will also need an 'else' to remove the section once it reaches zero, otherwise the last section will always be displayed.
Code: Select all
} else {
ssGauge.setArea([]);
}
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Re: Solar Gauge "Wedge" Issue
When I do this the page breaks like it does with everything I have tried. That is...no gauges show up, just the radio buttons below the ones that have them.
mcrossley wrote:You could changetoCode: Select all
if (data.CurrentSolarMax !== 'N/A')
Code: Select all
if (cache.currMaxValue > 0')
- mcrossley
- Posts: 12812
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Solar Gauge "Wedge" Issue
Just to check, you are changing the "data." to "cache." ?
Opps! - and you didn't copy the extraneous single quote!
Opps! - and you didn't copy the extraneous single quote!
-
- Posts: 113
- Joined: Sun 12 Mar 2017 8:33 pm
- Weather Station: VP2+
- Operating System: Raspberry Pi OS (64-bit)
- Location: US Mid-Atlantic
Re: Solar Gauge "Wedge" Issue
Of course I did lolmcrossley wrote: Opps! - and you didn't copy the extraneous single quote!
That unbroke the page - now I can move on to figuring out where to add the "else" statement