Author Topic: FIXED : Weird Steel Gauges problem (I'm stupid)  (Read 25728 times)

jf-i2r

  • Strong Breeze
  • ***
  • Posts: 150
  • Station Details: vantage pro2 wireless with solar sensor ; weatherlink-ip ;mac mini 1,6ghz 2go ram El Capitan
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #15 on: June 24, 2013, 09:14:52 AM »
hi

i think saratoga template is not the problem
same problem with direct link

http://carlsbadwx.com/gauges-ss-basic.htm

strange that:



can you try my gauges.js


cheers
jean frederic

Tailspin45

  • Gentle Breeze
  • **
  • Posts: 45
    • EW0995
    • KCACARLS17
    • Carlsbad Science and Technology Observatory
  • Station Details: Davis 6250, 6520 USB logger, iMac, Evocam
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #16 on: June 24, 2013, 01:22:39 PM »
Yours work fine, Jean, temp displays in C but converts to F with radio button. Also the popup graph is in C, as it should be.

Mine display in C, convert to F for one cycle, then revert to C. Graph is in Fahrenheit, even though default gauge, set to F, displays C.
Tailspin Tommy
http://carlsbadwx.com


wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #17 on: June 25, 2013, 10:52:22 AM »
In line 449, 450, 451 it reads in your gauges.js as follows:
Code: [Select]
                // temperature
                setRadioCheck('rad_unitsTemp', _displayUnits.temp);
                data.tempunit = '°' + _displayUnits.temp;

whereas it looks in my gauges.js :
Code: [Select]
                // temperature
                setRadioCheck('rad_unitsTemp', _displayUnits.temp);
                data.tempunit = '?' + _displayUnits.temp;

So for what reason ever you have built in this strange "?" into your code, just delete it and you should go fine. *Maybe* this one helps. ;-)

Cheers,
Reinhard
Reinhard


Tailspin45

  • Gentle Breeze
  • **
  • Posts: 45
    • EW0995
    • KCACARLS17
    • Carlsbad Science and Technology Observatory
  • Station Details: Davis 6250, 6520 USB logger, iMac, Evocam
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #18 on: June 25, 2013, 01:42:30 PM »
I wish I could removed the ?, Reinhart, But this is what the file looks like when I try to edit it with BBEDit:

Code: [Select]
// temperature
                setRadioCheck('rad_unitsTemp', _displayUnits.temp);
                data.tempunit = '?' + _displayUnits.temp;

I think you're seeing the ? because the page isn't being displayed as UTF-8, so the ? is translated to ?.

Why it isn't using UTF-8 seems to be the crux of the matter.

But thank you anyway for the help! [cheers1]
Tailspin Tommy
http://carlsbadwx.com


jf-i2r

  • Strong Breeze
  • ***
  • Posts: 150
  • Station Details: vantage pro2 wireless with solar sensor ; weatherlink-ip ;mac mini 1,6ghz 2go ram El Capitan
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #19 on: June 25, 2013, 02:48:59 PM »
hi

if using http://carlsbadwx.com/gauges-ss-basic.htm  you can't see the Ã…



if using http://carlsbadwx.com/wxgauges.php i see the Ã…



perhaps a code problem in wxgauges.php

cheers  [cheers1]
jean frederic

wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #20 on: June 25, 2013, 05:35:37 PM »
Very strange, indeed. At this very time (it shows 18:30 CEST) I can see your pages correct (screenshot attached). Even the source code of your gauges.js is correct now:
Code: [Select]
                // temperature
                setRadioCheck('rad_unitsTemp', _displayUnits.temp);
                data.tempunit = '?' + _displayUnits.temp;

Cheers,
Reinhard
Reinhard


Tailspin45

  • Gentle Breeze
  • **
  • Posts: 45
    • EW0995
    • KCACARLS17
    • Carlsbad Science and Technology Observatory
  • Station Details: Davis 6250, 6520 USB logger, iMac, Evocam
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #21 on: June 25, 2013, 05:40:28 PM »
Very strange! I didn't change a thing!

I had a similar situation where I thought the problem was magically solved, but then it came back.

And now, when I look at the site, it's broken.

Perhaps the page itself is okay, but somehow the update breaks it?I

'll investigate that angle (as if I knew how).
Tailspin Tommy
http://carlsbadwx.com


ELO

  • Gentle Breeze
  • **
  • Posts: 75
    • KCOBRECK14
    • Weather in the Highlands
  • Station Details: Old Davis WMII, Heated Rain Collector, Mac Mini
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #22 on: June 25, 2013, 09:15:48 PM »
Obviously, we are all fumbling around in the dark on this; nevertheless, I likewise see the problem when looking at your http://carlsbadwx.com/wxgauges.php page, but not when I look at your http://carlsbadwx.com/gauges-ss-basic.htm page. It appears these two pages are using the identical gauges.js and other script files. I pulled down a copy of your gauges.js file and ran a comparison to mine using TextWrangler with no non preference differences found.

So if you also see the temp gauges working on your gauges-ss-basic.htm page and not on the wxgauges.php page, and it's repeatable, it would seem the issue has to be somewhere in the wxgauges.php file - how it is ordered, or something I can't see or don't understand.

Note also on the misbehaving page, not only are the temp gauges displaying ?C, but the two gauges are showing different scales. The raw temp gauge is showing 0-100, which is correct for ?F, while the other them gauge is using 0-40, which is the default ?C scale.

BTW, I do see the ?A in the gauges.js file when I look at it in Chrome, but not when I download and look at it in TextWrangler. I presume you do have the gauges.js file uploaded permanently to your site and the "realtimegaugesWC.txt" is the only file being processed and uploaded by WeatherCat.

Again, just shooting in the dark, you might consider paring down the files in your /steel directory to just those needed for the WeatherCat configuration just to be sure something there isn't causing the issue. [banghead]

Rick

Tailspin45

  • Gentle Breeze
  • **
  • Posts: 45
    • EW0995
    • KCACARLS17
    • Carlsbad Science and Technology Observatory
  • Station Details: Davis 6250, 6520 USB logger, iMac, Evocam
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #23 on: June 26, 2013, 01:51:09 AM »
So if you also see the temp gauges working on your gauges-ss-basic.htm page and not on the wxgauges.php page, and it's repeatable, it would seem the issue has to be somewhere in the wxgauges.php file - how it is ordered, or something I can't see or don't understand.

The html page works...sometimes. I just visited it and it seemed to work, so I slowly switched back and forth from C to F a number of times and at one point I had C selected with the radio button but F was displayed. I let it go through several update cycles and it remained with C selected and F showing. But never saw the problem I have whewrre the update reverts an F select to C display.

Note also on the misbehaving page, not only are the temp gauges displaying ?C, but the two gauges are showing different scales. The raw temp gauge is showing 0-100, which is correct for ?F, while the other them gauge is using 0-40, which is the default ?C scale.

Yes, I see that on wxgauges.php too, but hadn't noticed it before although it probably was like that and I just didn't notice.

BTW, I do see the ?A in the gauges.js file when I look at it in Chrome, but not when I download and look at it in TextWrangler. I presume you do have the gauges.js file uploaded permanently to your site and the "realtimegaugesWC.txt" is the only file being processed and uploaded by WeatherCat.

Yes, gauges.js is on the site. realtimeguagesWC.txt and WCT_realtime.txt are being uploaded by WeatherCat

Again, just shooting in the dark, you might consider paring down the files in your /steel directory to just those needed for the WeatherCat configuration just to be sure something there isn't causing the issue.

Excellent idea. The only things in my /steel folder now are the css, images and scripts folder (with the included src folder). No joy, it behaves the same.

Here's my wxgauges.php file if anyone has the time and inclination to eyeball it. I sure hope it something stupid like an extra space or misplaced semicolon! ::)

Code: [Select]
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Canada/World-ML template set)
############################################################################
#
#   Project:    Sample Included Website Design
#   Module:     sample.php
#   Purpose:    Sample Page
#   Authors:    Kevin W. Reed <kreed@tnet.com>
#               TNET Services, Inc.
#
Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
############################################################################
# This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once(
"common.php");
############################################################################
$TITLE langtransstr($SITE['organ']) . " - " .langtransstr('Live Gauges');
$showGizmo true;  // set to false to exclude the gizmo
include("top.php");
############################################################################
?>


<link rel="stylesheet" href="/steel/css/gauges-ss.css">


<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>


<script src="/steel/scripts/steelseries_tween.min.js"></script>
<script src="/steel/scripts/language.min.js"></script>
<script src="/steel/scripts/gauges.js"></script>
<script src="/steel/scripts/windrose.js"></script>
<script src="/steel/scripts/RGraph.common.core.min.js"></script>
<script src="/steel/scripts/RGraph.rose.min.js"></script>


</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>


<div id="main-copy">

<div align="center">
<noscript>
<h2 style="color:red; text-align:center">
&gt;&gt;This pages requires JavaScript enabling in your browser.&lt;&lt;
<br>
&gt;&gt;Please enable scripting it to enjoy this site at its best.&lt;&lt;
</h2>
</noscript>
<center>Mouse over gauge to see chart of last 24 hours.</center><Br /> <br />
<div class="row">
<canvas id="canvas_led" width="25" height="25">
</canvas>
&nbsp;&nbsp;&nbsp;
<canvas id="canvas_status" width="350" height="25">
</canvas>
&nbsp;&nbsp;
<canvas id="canvas_timer" width="70" height="25">
</canvas>
</div>
<div class="row">
<div class="gauge">
<div id="tip_0">
<canvas id="canvas_temp" class="gaugeSizeSml">
</canvas>
</div>
<input id="rad_temp1" type="radio" name="rad_temp" value="out" checked onclick="gauges.doTemp(this);">
<label id="lab_temp1" for="rad_temp1">
Outside
</label>
<input id="rad_temp2" type="radio" name="rad_temp" value="in" onclick="gauges.doTemp(this);">
<label id="lab_temp2" for="rad_temp2">
Inside
</label>
</div>
<div class="gauge">
<div id="tip_1">
<canvas id="canvas_dew" class="gaugeSizeSml">
</canvas>
</div>
<input id="rad_dew1" type="radio" name="rad_dew" value="dew" onclick="gauges.doDew(this);">
<label id="lab_dew1" for="rad_dew1">
Dew Point
</label>
<input id="rad_dew2" type="radio" name="rad_dew" value="app" checked onclick="gauges.doDew(this);">
<label id="lab_dew2" for="rad_dew2">
Apparent
</label>
<br>
<input id="rad_dew3" type="radio" name="rad_dew" value="wnd" onclick="gauges.doDew(this);">
<label id="lab_dew3" for="rad_dew3">
Wind Chill
</label>
<input id="rad_dew4" type="radio" name="rad_dew" value="hea" onclick="gauges.doDew(this);">
<label id="lab_dew4" for="rad_dew4">
Heat Index
</label>
<br>
<input id="rad_dew5" type="radio" name="rad_dew" value="hum" onclick="gauges.doDew(this);">
<label id="lab_dew5" for="rad_dew5">
Humidex
</label>
</div>
<div class="gauge">
<div id="tip_4">
<canvas id="canvas_hum" class="gaugeSizeSml">
</canvas>
</div>
<input id="rad_hum1" type="radio" name="rad_hum" value="out" checked onclick="gauges.doHum(this);">
<label id="lab_hum1" for="rad_hum1">
Outside
</label>
<input id="rad_hum2" type="radio" name="rad_hum" value="in" onclick="gauges.doHum(this);">
<label id="lab_hum2" for="rad_hum2">
Inside
</label>
</div>
</div>
<div class="row">
<div id="tip_6" class="gauge">
<canvas id="canvas_wind" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_7" class="gauge">
<canvas id="canvas_dir" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_10" class="gauge">
<canvas id="canvas_rose" class="gaugeSizeSml">
</canvas>
</div>
</div>
<div class="row">
<div id="tip_5" class="gauge">
<canvas id="canvas_baro" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_2" class="gauge">
<canvas id="canvas_rain" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_3" class="gauge">
<canvas id="canvas_rrate" class="gaugeSizeSml">
</canvas>
</div>
</div>
<div class="row">
<div id="tip_8" class="gauge">
<canvas id="canvas_uv" class="gaugeSizeSml">
</canvas>
</div>
<div id="tip_9" class="gauge">
<canvas id="canvas_solar" class="gaugeSizeSml">
</canvas>
</div>
</div>
<div class="unitsTable">
<div style="display:table-row">
<div id="temperature" class="cellRight">
<span id="lang_temperature">
Temperature</span>:
</div>
<div style="display:table-cell">
<input id="rad_unitsTemp1" type="radio" name="rad_unitsTemp" value="C" checked onclick="gauges.setUnits(this);">
<label id="lab_unitsTemp1" for="rad_unitsTemp1">
&deg;C
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsTemp2" type="radio" name="rad_unitsTemp" value="F" onclick="gauges.setUnits(this);">
<label id="lab_unitsTemp2" for="rad_unitsTemp2">
&deg;F
</label>
</div>
</div>
<div style="display:table-row">
<div id="rainfall" class="cellRight">
<span id="lang_rainfall">
Rainfall</span>:
</div>
<div style="display:table-cell">
<input id="rad_unitsRain1" type="radio" name="rad_unitsRain" value="mm" checked onclick="gauges.setUnits(this);">
<label id="lab_unitsRain1" for="rad_unitsRain1">
mm
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsRain2" type="radio" name="rad_unitsRain" value="in" onclick="gauges.setUnits(this);">
<label id="lab_unitsRain2" for="rad_unitsRain2">
Inch
</label>
</div>
</div>
<div style="display:table-row">
<div id="pressure" class="cellRight">
<span id="lang_pressure">
Pressure</span>:
</div>
<div style="display:table-cell">
<input id="rad_unitsPress1" type="radio" name="rad_unitsPress" value="hPa" checked onclick="gauges.setUnits(this);">
<label id="lab_unitsPress1" for="rad_unitsPress1">
hPa
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsPress2" type="radio" name="rad_unitsPress" value="inHg" onclick="gauges.setUnits(this);">
<label id="lab_unitsPress2" for="rad_unitsPress2">
inHg
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsPress3" type="radio" name="rad_unitsPress" value="mb" onclick="gauges.setUnits(this);">
<label id="lab_unitsPress3" for="rad_unitsPress3">
mb
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsPress4" type="radio" name="rad_unitsPress" value="kPa" onclick="gauges.setUnits(this);">
<label id="lab_unitsPress4" for="rad_unitsPress4">
kPa
</label>
</div>
</div>
<div style="display:table-row">
<div id="wind" class="cellRight">
<span id="lang_windSpeed">
Wind Speed</span>:
</div>
<div style="display:table-cell">
<input id="rad_unitsWind4" type="radio" name="rad_unitsWind" value="km/h" checked onclick="gauges.setUnits(this);">
<label id="lab_unitsWind4" for="rad_unitsWind4">
km/h
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsWind3" type="radio" name="rad_unitsWind" value="m/s" onclick="gauges.setUnits(this);">
<label id="lab_unitsWind3" for="rad_unitsWind3">
m/s
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsWind1" type="radio" name="rad_unitsWind" value="mph" onclick="gauges.setUnits(this);">
<label id="lab_unitsWind1" for="rad_unitsWind1">
mph
</label>
</div>
<div style="display:table-cell">
<input id="rad_unitsWind2" type="radio" name="rad_unitsWind" value="kts" onclick="gauges.setUnits(this);">
<label id="lab_unitsWind2" for="rad_unitsWind2">
knots
</label>
</div>
</div>
</div>

# Extensive credits on my wxabout.php page

    </div>
</div><!-- end main-copy -->

<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>
Tailspin Tommy
http://carlsbadwx.com


ELO

  • Gentle Breeze
  • **
  • Posts: 75
    • KCOBRECK14
    • Weather in the Highlands
  • Station Details: Old Davis WMII, Heated Rain Collector, Mac Mini
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #24 on: June 26, 2013, 02:03:16 AM »
I'm not familiar with the WCT_realtime.txt file. It's certainly not one used by the steel gauges scripts. I presume it must be for the Saratoga templates or something else you are running. I can't see why that would cause any conflict though..

The mystery continues I guess... Obviously, there has to be an explanation. It's just a matter of finding someone smart enough to spot it.

Rick

Tailspin45

  • Gentle Breeze
  • **
  • Posts: 45
    • EW0995
    • KCACARLS17
    • Carlsbad Science and Technology Observatory
  • Station Details: Davis 6250, 6520 USB logger, iMac, Evocam
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #25 on: June 26, 2013, 01:29:36 PM »
Yes, WCT_realtime.txt is used to update AJAX in the Saratoga scripts.

I tried not FTPing it, for no logical reason, but it didn't fix the problem.
Tailspin Tommy
http://carlsbadwx.com


jf-i2r

  • Strong Breeze
  • ***
  • Posts: 150
  • Station Details: vantage pro2 wireless with solar sensor ; weatherlink-ip ;mac mini 1,6ghz 2go ram El Capitan
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #26 on: June 26, 2013, 01:38:42 PM »
hi

for me , weathercat and saratogata need some patches

http://athena.trixology.com/index.php?topic=158.30


Quote
hi Ken and Weathercat team

with a friend we have made some patches in ajaxWCTwx.js  ; now your template is ok (comma,date, update, gust etc.. ) when using weathercat fr , kts  : http://www.jf-i2r.com

we use Dreamweaver => cmd+f  BugsDenis

Quote
      //   BugsDenis patches here
        var value = new String(inValue);
        if(decimalComma) value = value.replace(/(\d)\.(\d)/,"$1,$2");
Quote
              // convert input wind to knots if need be
   if(rawwind == '-') {rawwind = 0.0;}   //   Patch BugsDenis
Quote
             //   BugsDenis patches here
   if (useKnots) { return new Number((rawwind * 1.0).toFixed(dpWind)); } //force usage of knots for speed
Quote
         //   BugsDenis patches here in order to see received datas

//Wind gust
      //   BugsDenis patches here (on JF directives)
      // var gust    = convertWind(realtime[40]);
      var gust    = convertWind(realtime[6]);

Quote
//   BugsDenis patches here in order to identify errors
      console.log(e);
   console.log(rttext);

cheers
jean frederic

mcrossley

  • Gale
  • ****
  • Posts: 273
  • Sorry, I'm not a WeatherCat user!
    • ICHESHIR25
    • Wilmslow Astro Weather
  • Station Details: Davis VP2 + home brew
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #27 on: June 26, 2013, 05:58:04 PM »
I've said it before, the reason for the 'corruption' is because your Saratoga page is loading as XHTM 1.0 Transitional, with a character set of ISO-8859-1.

The SteelSeries gauges require the page the HTML5 and a character set of UTF-8 (the default for HTML5). Until you get your Saratoga template updated to present the correct HTML5 I do not think you will find a solution to this.

The supplied 'basic' page is HTML5/UTF-8 that is why it displays correctly.
Mark

Tailspin45

  • Gentle Breeze
  • **
  • Posts: 45
    • EW0995
    • KCACARLS17
    • Carlsbad Science and Technology Observatory
  • Station Details: Davis 6250, 6520 USB logger, iMac, Evocam
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #28 on: June 26, 2013, 08:26:07 PM »
I know the problem is because the Saratoga page is loading XHTM not UTF-8. My Saratoga templates are updated, but the problem still exists.

I'm running WeatherCat 1.2, SteelGuages 2.4.2. and have downloaded and installed all the latest Saratoga scripts (top.php, header.php, common.php, etc.). I've read and re-read the related posts and followed the 15 page development thread. I've compared, line by line, my wxgauges.php page with the html versions and other php versions and can't find a difference.

 [banghead]




Tailspin Tommy
http://carlsbadwx.com


mcrossley

  • Gale
  • ****
  • Posts: 273
  • Sorry, I'm not a WeatherCat user!
    • ICHESHIR25
    • Wilmslow Astro Weather
  • Station Details: Davis VP2 + home brew
Re: (NOT) FIXED : Weird Steel Gauges glitch
« Reply #29 on: June 27, 2013, 10:20:39 AM »
It's in there somewhere :)

Have you tried pinging Ken to take a look?
Mark