Hello, I have finally decided to give the AJAX weather script thing a try. Now while I know this is for WD question… the script is not updating the data because clientraw.txt is not updating.
I have done the settings right to get clientraw to upload just fine but the data seems about the same.
I refresh the clientraw.txt on my site a couple times and it seems like something is changing (text in the line moves) but when i vew the script no temperature changes or anything.
What im guessing is… WD in general only receives data from the station every 2 minutes or such… yet my station is in wired mode (La Crosse WS2310) which is getting data every 2-3 seconds.
Im wondering… do I have to change some settings on WD to get the data faster so it can send it every 3 seconds on Clientraw?
Sorry… I remembered too late as you had already replied.
I see there’s an option to create + upload the clientraw.txt file on the “Internet File Creation & Uploads” but when I go to the file options… It only gives options for the “Create File” in minutes… I thought it was supposed to update in seconds??
Clientraw.txt is updating as it should.
Even testtags.php so the demo works is uploaded.
All files seem to be ready to work (the demo)
Yet all .php which are taking in the Clientraw.txt is not updating… The text color does turn green once after I refresh… but no data changes.
So im left with the page saying
“Updated: @ 10/21/2008 10:20:51am - updated 132 sec ago”
And that 10:20 update was when I manually force updated and uploaded the clientraw.txt through the File Creation & Upload, yet clientraw.txt alone is updating right now without me doing a thing.
There are two files that update weather info on the dashboard:
testtags.php (which is uploaded by WD from c:\wdisplay\webfiles\testtags.txt ) and
clientraw.txt (which is updated by WD) and used for the AJAX conditions updates.
Since you installed the dashboard in a /beta folder on your website, it makes it just a bit more complicated to do the setup.
Your clientraw.txt appears to be updating at the document root of your website, so your ajaxWDwx.js should have in it
var clientrawFile = '/clientraw.txt'; // location of clientraw.txt relative to this page on website
(which it does), so the AJAX updates are working.
Not all of the weather conditions values on the Dashboard are available in clientraw.txt, so the rest of the values depend on regular uploads of testtags.php … your /beta/testtags.php hasn’t updated since
$time = “10:44 AM”; // current time
$date = “10/21/08”; // current date
(viewable at wncw.net - wncw Lähteet ja tiedot. ), and that’s why the temps appear wrong … they are because the testtags.php is not updating, so it’s showing ‘old’ conditions on the dashboard. Use the WD Control Panel, Internet File Creation, Setup page#2 TAB, file#29 (special custom file convers.) to setup a schedule to update the testtags.php on your site.
BTW… you can see which variables are updated by AJAX on the dashboard by viewing
only the red-underlined data points are updated by AJAX from clientraw.txt … the remaining ones are all from testtags.php
I added ajaxtemp2 to the javascript code (as i read somewhere that i could do that) to add an additional temperature reading on the same page.
The place i added it was
//Temperature
temp = convertTemp(clientraw[4]);
set_ajax_obs(“ajaxtemp”, temp.toFixed(1) + uomTemp); set_ajax_obs(“ajaxtemp2”, temp.toFixed(1) + uomTemp);
set_ajax_obs(“ajaxbigtemp”,temp.toFixed(0) + uomTemp);
in ajaxWDwx.js
Anyway, that actually works just fine in Opera, Firefox… but in IE… when you first load the page… everything loads fine (see screenshots below) but after a second or two… the temperature appears where i set ajaxtemp2 to appear… and the table below it… is gone.
Second screenshot is only a few seconds later when ajaxtemp2 reading appears but the table below is gone. http://i37.tinypic.com/2m61s79.jpg
I’m wondering if there’s a solution or if its just not possible for it to work like this on IE, since Opera and Firefox are fine.
I was hoping to add more things in the future or have double readings… if it worked out… that is why im wondering.