testtags with wdconsole


I have been running the console version as my mini itx pc copes with it better and it is chatting away nicely uploading wx.html to my site. I came across the Saratoga templates and have tried implementing them. All is good apart from a the moonphase sunrise and sun set. I have read a number of threads and I believe I need to get a testtags.txt and trends-inc.txt to convert to a .php and .html respectively. The only instructions I can find are for WD with a GUI, what I do not understand is the custom tags for moonphase and sun rise/set work in my wx.html but are not extracted from the clientraw.txt by the template.

Is it just that the information does not appear the clientraw.txt? or is there another way to produce the testtags.php??

Am I looking at this arse about face - if some one can set me on the right path it would be greatly appreciated.


Ok found this, just to help those who are searching

Re: Need help with Saratoga-Weather templates…

but you have posted the solution

I posted an answer I found much later - I am sorry for that but I wanted to help others searching the topic to find the solution easily.

I have had the chance to implement the solution now. I have a setting in the config:

Create custom file=Y //converts the custom tags in a file called wxlocal.html to wx.html (or wxlocal2.html to wx2.html, up to wxlocal5.html (file needs to be where consolewd is))
custom log out=
Use this filename instead of wx.html=testtags.php (I have taken the testtags.txt from the webfiles in the template and renamed wxlocal.html in the root of consolewd)
Use this filename instead of wx2.html=index.php (I have my own small custom page I have been using as a control wxlocal2.html in the consolewd root)
Use this filename instead of wx3.html=
Use this filename instead of wx4.html=
Use this filename instead of wx5.html=
do custom log=N // set to Y to create an appended logfile from a template (customlog.txt)
FTP the custom file=Y //will FTP the wx.html or filename you set to FTP server specified (clientraw FTP needs to be enabled too)

The results I can see populate most of the custom tags in the template (apart from Alamac and Moon) but as far as I can see testtags.php is not uploaded - is that correct?
Also when I do cronftp it uploads all the clientraw files and wx.html - is it possible to upload wx2.html if so what setting do I need to change?

Thanks in advance


Due to limitations of wdconsole', I've written custom shell/sed/named pipes to massage the client*.txt data so wxlocal.html’ is somewhat generated correctly.

My WMR-100 blew up Dec 18th, 2008 and I just found out Oregon Scientific messed up and forgot to send me a replacement. It’s on its way … yeah right! :slight_smile: … so my site is down/stale.

Just an update the fix after a period stops showing the information shown in the wx.html file. The file generated in the wx.html file is correct but the page is fixed on a previous input.

Ok this is for any one stuck with Saratoga templates and consolewd and is getting the error that contains unexpected T_DNUMBER testtags.php on line 252. If you work backwards and find the same lines in wxlocal.html - delete the comments corresponding to the next couple of lines. It seems the conversion to testtags.php by consolewd includes some of the characters in the comments and is screws up the conversion - it ends up ommitting "; / off the next line. I found this before and forgot the solution so just wasted another couple of hours finding it again, so I suppose it is for me too:).

which particular custom tags?

$currentrainratehr = “%currentrainratehr%”; // Current rain rate, mm/hr (or in./hr)

$maxrainrate = “%maxrainrate%”; // Max rain rate,for the day, mm/min (or in./min)

$maxrainratehr = “%maxrainratehr%”; // Max rain rate,for the day, mm/hr (or in.mm)

After I deleted the comments on there 3 - no problems.

noted too soon - problem is continuing, the symptoms are

Parse error: syntax error, unexpected T_DNUMBER in /www/wd/testtags.php on line 252

which read

$dayswithrain = “0”; // Days with rain for the month
$dayswithrainyear = “%dayswithrainyear%”; // Days with rain for the year
$currentrainratehr = "0.0in rate, mm/hr (or in./hr)
$maxrainrate = “0.0”; // Max rain rate,for the day, mm/min (or in./min)
$maxrainratehr = “0.0”; // Max rain rate,for the day, mm/hr (or in.mm)
$maxrainratetime = “%maxrainratetime%”; // Time that occurred

I am no coder but there seems to be a "; // missing in currentrainratehr

This is from a wxlocal.html that reads


// ====

// Current:

// --------

$dayrn = “%dayrn%”; // today’s rain

$monthrn = “%monthrn%”; // rain so far this month

$yearrn = “%yearrn%”; // rain so far this year

$dayswithnorain = “%dayswithnorain%”; // Consecutative days with no rain

$dayswithrain = “%dayswithrain%”; // Days with rain for the month

$dayswithrainyear = “%dayswithrainyear%”; // Days with rain for the year

$currentrainratehr = “%currentrainratehr%”; // Current rain rate, mm/hr (or in./hr)

$maxrainrate = “%maxrainrate%”; // Max rain rate,for the day, mm/min (or in./min)

$maxrainratehr = “%maxrainratehr%”; // Max rain rate,for the day, mm/hr (or in.mm)

$maxrainratetime = “%maxrainratetime%”; // Time that occurred

// Yesterday:

// ----------

$yesterdayrain = “%yesterdayrain%”; // Yesterday rain


$vpstormrainstart = ‘%vpstormrainstart%’; //Davis VP Storm rain start date

$vpstormrain = ‘%vpstormrain%’; //Davis VP Storm rain value



Hope some one can help, sorry for jumping to the wrong conclusion the symptoms are still live


Would it be possible for you to fix your `testtags.txt’ file withe correct syntax?

Here’s how it works: wd ingests the .txt file and spits out a .php file with the values set for the `testtags’ (%tag%).

If there’s a syntax error in the .php file, more than likely it’s in the .txt file. Unless of course wdconsole has a bug and overreaches its replacement - I’m not sure if I’ve encountered such an issue before.



Hi Pablo,

Thanks for that.

I am with you there and that is exactly what I was trying to do. testtags.txt to wxlocal.html to testtags.php. Correct my logic but as a test I downloaded testtags.php from the site found the offending line saw the omissions put them in re uploaded and a clean page. Working backwards I checked the testtags.txt and wxlocal.html and there were no omissions in the file, so my logic was the wxlocal.html converting to testtags.php was where the issue lay. In my naivety the only thing I believed could throw it out was the / & () behind the comments and I changed the wxlocal.html and seemed to get a clean page but 10 mins later back to the error as probably a new testtags.php had been generated. After a nights rest on reflection if consolewd does not generate the data for a certain field - that may throw it out too so I will try that tack this am.

I am kicking myself as I had it working before & did not document it

I think I have fixed / fudged it, deleted the 3 lines completely but it still came up with the error then I checked the testtags.php & it was still showing the 3 lines, i checked on the PC and there was a testtags.php in consolewdfiles so I deleted that. Now the page is showing true & I rechecked the testtags.php and the lines are not there. I am sure there is a less brutal solution but I have no time to sort it.


I had a similar problem with the normal GUI version I resolved it like this.

I simply renamed the testtag file to wxlocal3.html then let wd parse the file in the normal manner to wx3.html

Then with a bit of script below and cron every 5 mins, moved and renamed the file to testtags.php…job done. This has been working for months perfectly :).



sleep 15

cp /home/weather/wdisplay/webfiles/wx3.html /var/www/testtags.php


Hey Steve,

That’s exactly been my approach: writing shell scripts to prop wdconsole. It’s far easier to do it that way and you have ultimate control. Which I prefer.

Also, as a hint, with creative use of symbolic links, you can have wdconsole fire off your code rather than its own code (like cronftp and their ilk). In other words, you can create your own shell script and either sym link it to, say, cronftp' or name it cronftp’ wdconsole will run your script just the same. Remember to delete/rename the original `crontftp’ (or any other script you replace with your own). :wink:


but Pablo ,stumpey script has got nothing to do with consolewd
its just copying a web file, produced by the full linux version

However my point still stands. For those issues where wdconsole is fork’ing a process and that process is having issues, it can be replaced with a shell script.


I simply symlink to the .html file with the correct name, which negates the need for cron jobs.

In your case

ln -s /home/weather/wdisplay/webfiles/wx3.html /var/www/testtags.php

should do it.