WDconsole + Saratoga template issue

Hi to everyone. I am trying to set up an old WX-200 weather station (yes the Radio Shack one) with WDconsole and Saratoga script. I have managed to come to a good point and start working on the details little by little. One issue I see is with the “Station Graphs” page (wxgraphs.php). I see the page is calling for several gif images like ./wxgraphscurr24hourgraph.gif but can’t find any. I know these are php generated but can’t tell where they are. All clentraw files are generated and ftped to the web server as expected. Any suggestions, ideas?

Thank you in advance
Manos SV1IW

current24 48 72hourgraph.gif are in your webfiles folder.
In Control Panel under Internet File Creation/Uploads you can set up File#11 (current24 48 72hourgraph.gif)

note that he is using the linux consolewd program
which does not produce any graph image files
you would need to use php generated graphs (which can be done)

As also suggested by Nico I have used JPGraphs feeding the with the clientraw files and it works, but as Brian noticed these are php pages which produce the graphics and the saratoga is looking for pngs and gifs to embed . So I may have to rewrite the original page to match this and php is not my strong point. Unless of course there is no other way to do it…

Thanks anyway
Manos SV1IW

If you have an Apache web server you could use a .htaccess file to convert the xxx.png request into an xxx.php call internally…

For example…

RewriteEngine On
RewriteRule ^cloudbase.png$ 	graphCloudbase.php [NC,L]

I’m not sure that will work, Ken uses a function to generate the image links, e.g.:

<?php genImageLink('curr24hourgraph.gif','Last 24 hours',469,555); ?>

function genImageLink ( $imagename, $alttext, $width=310, $height=200) {
	global $graphImageDir;
	
	if(!file_exists($graphImageDir.$imagename)) {
		print "$graphImageDir$imagename not found.";
	} else {
		print "<img src=\"$graphImageDir$imagename\" alt=\"$alttext\" width=\"$width\" height=\"$height\" />\n";
	}

}

As I believe that “straight line” is the shortest among all others, does anyone else uses a way to produce these gifs, pngs, from clientraw files that the page is asking for? What I am trying to say is that if this graphic page is built with a specific way there must be another way to populate it, or perhaps the template doesn’t comply with consolewd. I Do not blame anyone, just see that there is a mismatch here …
Any other suggestions for a template to fit here? (a headless pi (either 2 or 3) with consolewd)?.

Doh! Ken’s too clever :wink:

It’s really not difficult to display a .php generated graph in a page:

<img src="rain_yesterday.php" alt="Yesterdays Rain">

The template set includes a blank page, wxnewpage.php, so just add whatever code you want into that page and use it as a replacement for wxgraphs.php. You could use code from the wxgraphs demo page wxgraphs_test.html that’s included in the wxgraphs package.

The free template is designed to use the full version of WD, you are using a stripped down version of WD that can run on a very limited processor, it doesn’t have all the capabilities of the full version.

Thanks Niko, I understand and I will try to do it although extremely busy with radio activities. I will try a php editor to work on the page, any suggestion for a good one?

Regards
MAnos SV1IW

notepad++ is popular and free (I use UltraEdit which isn’t free).

Ok that wasn’t that hard after all. I used notepad++ and wxnewpage.php to work on my version of wxgraphs.php. The result is very good and matches the rest of the template. Thanks to everyone who assisted…

73 (Ham Radio greetings)
Manos SV1IW

sounds good
do you have a link to the web site? :slight_smile:

Sure do Brian. I have not check all the possibilities of the template yet, (now looking for the history files and data), but basic info are present (I hope).
http://sv1iw.ignorelist,com/weather

Regards
Manos SV1IW

good stuff
http://sv1iw.ignorelist.com/weather/wxgraphs.php

Thanks for the comments Brian. It needs a lot of work still…
Can you point me the latest testtags.txt? It seems that I am missing a couple of variables…

Thank you in advance
Manos SV1IW

not all are available with consolewd
but I could add in the ones you need, jet me me know

Looking in this page http://sv1iw.ignorelist.com/weather/wxtrends.php I saw %maxavgdirectionletter% and %maxgstdirectionletter% missing. Perhaps because I do not use the proper testtags.txt. So I do not want to put you in trouble if I use an older file. Whatever you thing is better…

Hi
its no problem to add those custom tags
remind me again what consolewd version you are using?

Consolewd V 12.4