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
RG-11 "Its Raining" Indicator
Moderator: mcrossley
-
- Posts: 13
- Joined: Fri 31 Jan 2014 9:55 pm
- Weather Station: WMR88
- Operating System: WIN7, Linux, Windows server 2013
- Location: Gloucestershire
- Contact:
RG-11 "Its Raining" Indicator
Hi,
Is there a simple way of indicating the RG-11 "It's Raining" function, with in the SS Gauges layout, or in the current conditions web page?
I am sure I saw some where on the forum about conditional web page code, but can't find it. Or was it an .ini edit to display something? Even a Red radio button as on the Cumulus program would (sort of) suffice.
I would like to add some text/image to the current conditions page for when its raining, and also have an indicator on the SS-Gauge page.
I have looked and looked through the forum for hours to find an answer.
Please help
Is there a simple way of indicating the RG-11 "It's Raining" function, with in the SS Gauges layout, or in the current conditions web page?
I am sure I saw some where on the forum about conditional web page code, but can't find it. Or was it an .ini edit to display something? Even a Red radio button as on the Cumulus program would (sort of) suffice.
I would like to add some text/image to the current conditions page for when its raining, and also have an indicator on the SS-Gauge page.
I have looked and looked through the forum for hours to find an answer.
Please help
-
- Posts: 13
- Joined: Fri 31 Jan 2014 9:55 pm
- Weather Station: WMR88
- Operating System: WIN7, Linux, Windows server 2013
- Location: Gloucestershire
- Contact:
Re: RG-11 "Its Raining" Indicator
Thanks sfws...
Next time I will spend hours looking through the Wiki
Should be able to get my RG-11 doing something with that lot.
Next time I will spend hours looking through the Wiki
Should be able to get my RG-11 doing something with that lot.
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: RG-11 "Its Raining" Indicator
You could enable the 'userLed' on the rainfall rate or total rainfall gauge. (Without the RG-11 you could just use a non-zero value of rainfall rate to trigger the threshold LED on the rate gauge).
Anyway, you need to add the RG-11 value to the realtimegauges.txt file, then enable the userLed on the gauge of your choice, set it's colour (default Green) (both in the gauge initialisation), then set it's on/off status in the gauge update code. Some hints...
Enabling the userLed and setting the colour:
Setting the state:
Anyway, you need to add the RG-11 value to the realtimegauges.txt file, then enable the userLed on the gauge of your choice, set it's colour (default Green) (both in the gauge initialisation), then set it's on/off status in the gauge update code. Some hints...
Enabling the userLed and setting the colour:
Code: Select all
drawRain function...
params.userLedVisible = true;
params.userLedColor = steelseries.LedColor.RED_LED;
Code: Select all
doRain function...
_gaugeRain.setUserLedOnOff(<variable_holding_RG11_value>);
optionally you could make the LED blink as well...
_gaugeRain.blinkUserLed(true);
-
- Posts: 13
- Joined: Fri 31 Jan 2014 9:55 pm
- Weather Station: WMR88
- Operating System: WIN7, Linux, Windows server 2013
- Location: Gloucestershire
- Contact:
Re: RG-11 "Its Raining" Indicator
Mark, thanks for that. I have managed to enable the led on the rain gauge, and have an entry (IsRaining) in the realtimeguages.text that changes from a 0 to a 1 when it rains.
I have tried to get the led to turn on and off, in the doRain function, but cannot figure out how. Does it need to be held in an if statement ? I tried it as a separate line, but that messes up the windrose etc.
I even tried to force it on by entering
_gaugeRain.setUserLedOnOff(1)
But let's be honest... I am totally out of my depth here. I have been trying to get it working since you replied earlier to be honest.
Any additional help for a total Java noob would be gratefully appreciated.
I have tried to get the led to turn on and off, in the doRain function, but cannot figure out how. Does it need to be held in an if statement ? I tried it as a separate line, but that messes up the windrose etc.
I even tried to force it on by entering
_gaugeRain.setUserLedOnOff(1)
But let's be honest... I am totally out of my depth here. I have been trying to get it working since you replied earlier to be honest.
Any additional help for a total Java noob would be gratefully appreciated.
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: RG-11 "Its Raining" Indicator
Do you have a link to a test page with code in it?
-
- Posts: 13
- Joined: Fri 31 Jan 2014 9:55 pm
- Weather Station: WMR88
- Operating System: WIN7, Linux, Windows server 2013
- Location: Gloucestershire
- Contact:
Re: RG-11 "Its Raining" Indicator
er... I was actually trying to update my webpages live ... like the amateur that I am
From gauges.js I was trying to enter your "function" somewhere into
doRain = function () {
_rain.value = extractDecimal(data.rfall);
if (data.rainunit === 'mm') { // 10, 20, 30...
_rain.maxValue = Math.max(Math.ceil(_rain.value / 10) * 10, 10);
} else { .......
..... etc
The gauges web page is here http://www.skinell.webspace.virginmedia ... ges-ss.htm
From gauges.js I was trying to enter your "function" somewhere into
doRain = function () {
_rain.value = extractDecimal(data.rfall);
if (data.rainunit === 'mm') { // 10, 20, 30...
_rain.maxValue = Math.max(Math.ceil(_rain.value / 10) * 10, 10);
} else { .......
..... etc
The gauges web page is here http://www.skinell.webspace.virginmedia ... ges-ss.htm
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: RG-11 "Its Raining" Indicator
OK, I tried running _gaugeRain.setUserLedOnOff(true) and that switched on your LED, so the problem is you are supplying a 0 or 1 rather than a true/false value. Try this...
Code: Select all
_gaugeRain.setValueAnimated(_rain.value);
_gaugeRain.setUserLedOnOff(data.IsRaining==1);
-
- Posts: 13
- Joined: Fri 31 Jan 2014 9:55 pm
- Weather Station: WMR88
- Operating System: WIN7, Linux, Windows server 2013
- Location: Gloucestershire
- Contact:
Re: RG-11 "Its Raining" Indicator
Mark thank you so very much.
The RG-11 does indeed return a 0 or 1.
The led now works a treat. I love it.
At the risk or trying your patience, and pushing my luck. Is it easy to add a label to the LED as a hover or on the dial itself?
As it stands, its just great, and I am most pleased.
Thanks
Oh and thanks to sfws - I have an indicator on my index page too now
The RG-11 does indeed return a 0 or 1.
The led now works a treat. I love it.
At the risk or trying your patience, and pushing my luck. Is it easy to add a label to the LED as a hover or on the dial itself?
As it stands, its just great, and I am most pleased.
Thanks
Oh and thanks to sfws - I have an indicator on my index page too now
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: RG-11 "Its Raining" Indicator
Not easily. The gauge library does not support either of those options.