WXforum.net
May 24, 2013, 04:25:29 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6620  •  Posts: 178803  •  Topics: 18139
Please welcome moranbahweather, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: WeatherCat weather data not updating  (Read 494 times)
0 Members and 1 Guest are viewing this topic.
HairyMcLeary
Tony
Member
*
Offline Offline

Posts: 21



WWW
« on: March 28, 2012, 07:50:08 PM »

Hi,
Newbie here, I've been using the new PHP/Ajax template for WeatherCat for a few days now and in the that time the WeatherCat weather data has not been update according to the wxstatus.php page.

Should I bee concerned about this? What does it do?  d'oh!

The data on my website www.oamaruweather.net.nz seems all "present and correct"

Cheers,
Tony
Logged

saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3748


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #1 on: March 28, 2012, 08:17:26 PM »

Hi Tony,

In Settings.php, you currently have
Code:
$SITE['WDdateMDY'] = false; // for weather software date format of month/day/year.  =false for day/month/year
meaning your dates are in day/month/year format.

In WCT-defs.php, the $date is set by
Code:
$time = $WX['t12'];
$date = $WX['da'];
while the $WCTtags.php?sce=dump shows
Code:
$WX['t12'] = '12:59 PM'; // Time (12 hour clock)
$WX['da'] = '03/29/12'; // Date in the format of month/day/year
so the 'current' checker is trying to check '03/29/12 12:59 PM' as a date and PHP is balking at the assembled date of '2012-29-03 12:59'.  

I suggest you temporarily change WCT-defs.php to
Code:
$date = $WX['de'];
and that should solve the problem.

I'll work up a fix to select US or Euro format date as the source based on the $SITE['WDdateMDY'] preference .. sorry about that, it was my ommission --  d'oh!  Embarassed

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
HairyMcLeary
Tony
Member
*
Offline Offline

Posts: 21



WWW
« Reply #2 on: March 28, 2012, 08:27:26 PM »

Thanks very much for the quick fix, it works!  Applause

Ummm... yesterdays High and Low temps in the dashboard are still showing 2 decimal places when using metric  Wink

Tony
Logged

saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3748


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #3 on: March 28, 2012, 09:22:07 PM »

That's a WeatherCat thing .. your WCTtags.php?sce=dump shows your temperatures with 2 decimals.  Something for Stu to fix, I think...

Quote
$WX['STAT:TEMPERATURE:CURRENT'] = '18.20'; // Current Temperature
$WX['STAT:TEMPERATURE:DELTA1'] = '1.30'; // Current Temperature change over 1 hour.
$WX['STAT:TEMPERATURE:DELTA24'] = '3.50'; // Current Temperature change over 24 hours.
$WX['STAT:TEMPERATURE:24HRSAGO'] = '14.70'; // Current Temperature value 24 hours ago.
$WX['STAT:TEMPERATURE:MAX:TODAY'] = '18.20'; // Highest temperature today
$WX['STAT:TEMPERATURE:MAX:TODAY:TIME'] = '14:13:00'; // Time of highest temperature today
$WX['STAT:TEMPERATURE:MAX:YESTERDAY'] = '14.90'; // Highest temperature yesterday
$WX['STAT:TEMPERATURE:MAX:YESTERDAY:TIME'] = '14:04:00'; // Time of highest temperature yesterday
$WX['STAT:TEMPERATURE:MAX:THISWEEK'] = '25.50'; // Highest temperature this week
$WX['STAT:TEMPERATURE:MAX:THISWEEK:TIME'] = '2012-03-27T16:32:00'; // Time of highest temperature this week
$WX['STAT:TEMPERATURE:MAX:LASTWEEK'] = '24.90'; // Highest temperature last week
$WX['STAT:TEMPERATURE:MAX:LASTWEEK:TIME'] = '2012-03-24T15:37:00'; // Time of highest temperature last week
$WX['STAT:TEMPERATURE:MAX:THISMONTH'] = '25.50'; // Highest temperature this month
$WX['STAT:TEMPERATURE:MAX:THISMONTH:TIME'] = '2012-03-27T16:32:00'; // Time of highest temperature this month
$WX['STAT:TEMPERATURE:MAX:LASTMONTH'] = '22.80'; // Highest temperature last month
$WX['STAT:TEMPERATURE:MAX:LASTMONTH:TIME'] = '2012-02-23T16:03:00'; // Time of highest temperature last month
$WX['STAT:TEMPERATURE:MAX:THISYEAR'] = '28.90'; // Highest temperature this year
$WX['STAT:TEMPERATURE:MAX:THISYEAR:TIME'] = '2012-01-28T16:40:00'; // Time of highest temperature this year
$WX['STAT:TEMPERATURE:MAX:LASTYEAR'] = '37.90'; // Highest temperature last year
$WX['STAT:TEMPERATURE:MAX:LASTYEAR:TIME'] = '2011-02-06T14:16:00'; // Time of highest temperature last year
$WX['STAT:TEMPERATURE:MAX:ALLTIME'] = '37.90'; // Highest temperature of all time
$WX['STAT:TEMPERATURE:MIN:TODAY'] = '5.90'; // Lowest temperature today
$WX['STAT:TEMPERATURE:MIN:TODAY:TIME'] = '07:01:00'; // Time of lowest temperature today
$WX['STAT:TEMPERATURE:MIN:YESTERDAY'] = '10.50'; // Lowest temperature yesterday
$WX['STAT:TEMPERATURE:MIN:YESTERDAY:TIME'] = '23:56:00'; // Time of lowest temperature yesterday
$WX['STAT:TEMPERATURE:MIN:THISWEEK'] = '4.60'; // Lowest temperature this week
$WX['STAT:TEMPERATURE:MIN:THISWEEK:TIME'] = '2012-03-26T05:11:00'; // Time of lowest temperature this week
$WX['STAT:TEMPERATURE:MIN:LASTWEEK'] = '6.00'; // Lowest temperature last week
$WX['STAT:TEMPERATURE:MIN:LASTWEEK:TIME'] = '2012-03-20T06:36:00'; // Time of lowest temperature last week
$WX['STAT:TEMPERATURE:MIN:THISMONTH'] = '4.60'; // Lowest temperature this month
$WX['STAT:TEMPERATURE:MIN:THISMONTH:TIME'] = '2012-03-26T05:11:00'; // Time of lowest temperature this month
$WX['STAT:TEMPERATURE:MIN:LASTMONTH'] = '7.20'; // Lowest temperature last month
$WX['STAT:TEMPERATURE:MIN:LASTMONTH:TIME'] = '2012-02-11T07:30:00'; // Time of lowest temperature last month
$WX['STAT:TEMPERATURE:MIN:THISYEAR'] = '4.50'; // Lowest temperature this year
$WX['STAT:TEMPERATURE:MIN:THISYEAR:TIME'] = '2012-01-27T06:00:00'; // Time of lowest temperature this year
$WX['STAT:TEMPERATURE:MIN:LASTYEAR'] = '-2.10'; // Lowest temperature last year
$WX['STAT:TEMPERATURE:MIN:LASTYEAR:TIME'] = '2011-07-26T05:14:00'; // Time of lowest temperature last year
$WX['STAT:TEMPERATURE:MIN:ALLTIME'] = '-2.10'; // Lowest temperature of all time
$WX['STAT:TEMPERATURE:AVERAGE:TODAY'] = '10.26'; // Average temperature today
$WX['STAT:TEMPERATURE:AVERAGE:YESTERDAY'] = '12.65'; // Average temperature yesterday
$WX['STAT:TEMPERATURE:AVERAGE:THISWEEK'] = '12.44'; // Average temperature this week
$WX['STAT:TEMPERATURE:AVERAGE:LASTWEEK'] = '14.02'; // Average temperature last week
$WX['STAT:TEMPERATURE:AVERAGE:THISMONTH'] = '13.09'; // Average temperature this month
$WX['STAT:TEMPERATURE:AVERAGE:LASTMONTH'] = '14.88'; // Average temperature last month
$WX['STAT:TEMPERATURE:AVERAGE:THISYEAR'] = '14.57'; // Average temperature this year
$WX['STAT:TEMPERATURE:AVERAGE:LASTYEAR'] = '11.43'; // Average temperature last year
$WX['STAT:TEMPERATURE:AVERAGE:ALLTIME'] = '11.52'; // Average temperature of all time

and... your Dewpoints show 2 decimals also Smile

The PHP does no formatting of the temperature data.. just presents it.  I'm running the same build as you are (V0.95, Build 235) but with F instead of C for temperatures.  Maybe it's a Metric units thing in WeatherCat.

Best regards,
Ken
« Last Edit: March 28, 2012, 09:24:54 PM by saratogaWX » Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
HairyMcLeary
Tony
Member
*
Offline Offline

Posts: 21



WWW
« Reply #4 on: March 28, 2012, 09:31:00 PM »

Thanks for the explanation
But I still don't understand why today's temps are shown with only 1 decimal point.
The current temp in WCTTags.php show in 2 decimal point, yet show in the dashboard with only one decimal point why can't yesterday's temps do the same? Both appear in the WCTTags with 2, have I missed something?

Cheers,
Tony
Logged

saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3748


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #5 on: March 28, 2012, 09:43:39 PM »

The PHP page is showing two decimals in the Today temperature min and max.  When the ajaxWCTwx.js script cuts in, it updates the Today min/max and times with formats determined by the JavaScript (0ne decimal point for temperatures), and rewrites the HTML of the page in your browser.

So, when page first loads, you see the PHP rendering of the page.  Then a 'green flash' shows the fields updated by the AJAX script, and voila.. one decimal point for today's temperatures.

I find that debugging presentation issues is assisted by temporarily turning off JavaScript so I can see the page as PHP renders it first .. that allows isolation of issues to the PHP code or the JavaScript code.

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
HairyMcLeary
Tony
Member
*
Offline Offline

Posts: 21



WWW
« Reply #6 on: March 29, 2012, 07:57:14 AM »

Now I understand  d'oh!

Thanks for taking the time to explain what is going on.

You can guess what the next question over in the "WeatherCat" forum is; Why 2 decimal places?

Tony
Logged

HairyMcLeary
Tony
Member
*
Offline Offline

Posts: 21



WWW
« Reply #7 on: March 31, 2012, 12:57:02 AM »

I managed a temporary fix by multiplying yesterday's min/max temps by 1.0 in the ajax-dashboard.php file, it works but there shouldn't be a need for it.

Hopefully after the next release of WeatherCat there will be no need for it  Wink

Tony
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.101 seconds with 20 queries.