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

Temperature problem after upgrade - F vs. C

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

Post Reply
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Temperature problem after upgrade - F vs. C

Post by JimDantin »

I've been running Steel Series on my website for quite a while. I decided to upgrade to 1.6.6 and ran into some problems. I'm using gauges-ssT.htm unmodified at this point.

I'm in the US, so I need Fahrenheit rather than Celsius. For some reason the gauge page is displaying the actual temperature VALUE correctly (such as 57.7) but the first two gauges show C and the temperature range is 30-70. The other gauges appear to be in the proper units. I'll accept responsibility for bollixing something up, but I can't even find where I could have done it!

I can't seem to figure out where the units are getting passed to the various java routines.

Another question -- do the gauges auto-scale? what happens if the wind gets above 20mph, or the rain gets above 1"? If they don't autoscale, do I have to change more than just the min/max lines in gauges.js? For example I can change g_rain.maxValue = 1.0;, but do I have to edit anything else?

FYI, my configuration currently uses the SS gauges as distributed:
Local file name: C:\Cumulus\web\gauges-ssT.htm
Remote file name: gauges1.htm

Web page for the gauges is: http://dantinconsulting.com/gauges1.htm

Thanks for a really nice package. I have received compliments on the gauges from a number of users.

Jim
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
User avatar
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: Temperature problem after upgrade - F vs. C

Post by mcrossley »

OK, the "tempunit" in your realtime file is coming across as just: "tempunit: "°" so no units (C/F), the script then defaults to °C. That is the problem with the temperature gauges.

Yes the gauges do auto-scale. I've tried to set the default values to sensible limits so they show small amounts of rain, low wind speeds reasonably "visually", but the gauges will re-range once the default maximum (and minimum pressure) values are exceeded.
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Temperature problem after upgrade - F vs. C

Post by JimDantin »

mcrossley wrote:OK, the "tempunit" in your realtime file is coming across as just: "tempunit: "°" so no units (C/F), the script then defaults to °C. That is the problem with the temperature gauges.

Yes the gauges do auto-scale. I've tried to set the default values to sensible limits so they show small amounts of rain, low wind speeds reasonably "visually", but the gauges will re-range once the default maximum (and minimum pressure) values are exceeded.
Great news on the autoscaling. Thanks

How do I fix (or what did I do to break) the "tempunit" issue? Was I supposed to manually edit something in the templates?
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
User avatar
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: Temperature problem after upgrade - F vs. C

Post by mcrossley »

In your realtimegaugesT.txt file, it should be set to: "tempunit":"<#tempunitnodeg>",
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Temperature problem after upgrade - F vs. C

Post by JimDantin »

mcrossley wrote:In your realtimegaugesT.txt file, it should be set to: "tempunit":"<#tempunitnodeg>",

It is!
"tempunit":"<#tempunitnodeg>"

I'm running Cumulus 1.9.2 build 1003 -- should I be running something newer?

I'm comfortable just hardcoding "<#tempunitnodeg>" to whatever it should be seeing from Cumulus, if that would help as a temporary hack.
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Temperature problem after upgrade - F vs. C

Post by JimDantin »

FYI, the Cumulus 'realtime.txt' file DOES show 'F':

06/06/12 10:49:31 64.8 50 45.7 1.6 3.1 60 0.00 0.00 29.97 ENE 1 mph F in in 2.4 0.00 0.95 22.87 0.00 73.9 47 64.8 +2.9 64.8 10:42 53.4 05:48 3.5 10:25 6.3 10:18 30.00 09:28 29.91 00:00 1.9.2 1003 4.0 64.8 65.2 0 0 0 62 0.00 3 1 0 ENE 4336 ft 62.9 0.0 767 0
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Temperature problem after upgrade - F vs. C

Post by JimDantin »

I replaced the tag with "F" and it is formatting correctly -- so the issue is that the tag isn't getting processed correctly for some reason.
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Temperature problem after upgrade - F vs. C

Post by steve »

JimDantin wrote:I'm running Cumulus 1.9.2 build 1003 -- should I be running something newer?
That's a very old, beta build of 1.9.2. It doesn't have the <#tempunitnodeg> web tag.
Steve
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Temperature problem after upgrade - F vs. C

Post by JimDantin »

steve wrote:
JimDantin wrote:I'm running Cumulus 1.9.2 build 1003 -- should I be running something newer?
That's a very old, beta build of 1.9.2. It doesn't have the <#tempunitnodeg> web tag.
That explains it -- I'll upgrade Cumulus.

Thanks so much for the help.
Jim
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Temperature problem after upgrade - F vs. C

Post by JimDantin »

Cumulus upgraded - gauge is now working properly.

Next question -- I would like to change the second gauge to default to Dew Point rather than Apparent -- is that something that I can do?

Thanks
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
User avatar
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: Temperature problem after upgrade - F vs. C

Post by mcrossley »

Edit the HTML page and delete the word 'checked' from the following line:

Code: Select all

          <input id="rad_dew2" type="radio" name="rad_dew" value="app" checked onclick="doDew(this);">
Then add 'checked' to the following line:

Code: Select all

from
          <input id="rad_dew1" type="radio" name="rad_dew" value="dew" onclick="doDew(this);">
to
          <input id="rad_dew1" type="radio" name="rad_dew" value="dew" checked onclick="doDew(this);">
Edit gauges.js and around line 181 change:

Code: Select all

    g_dew.selected = 'app';
to
    g_dew.selected = 'dew';
and also change:

Code: Select all

    g_dew.title = LANG.apptemp_title;
to
    g_dew.title = LANG.dew_title;
Done.
JimDantin
Posts: 108
Joined: Fri 10 Jun 2011 12:40 pm
Weather Station: WMR-968
Operating System: Windows XP SP3
Location: Prospect, KY, USA

Re: Temperature problem after upgrade - F vs. C

Post by JimDantin »

Thank you for the help - all is working properly now.

You sure make it easy for inexperienced users like me to deploy a great looking site.

Jim
Thanks
Jim - The Timber Ridge Weather Station, Prospect, KY
http://dantinconsulting.com/
Post Reply