New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)

A while ago (well about 8 years ago) I created a set of php driven graphs using the clientraw file set from Weather Display. Recently I was reminded about these graphs by someone who wanted a copy of the package. This decided me to re-write the package as I have now removed flash from my website and these graphs work with the php driven JPGraph package and so were ideal for my own use.

So there is a new package which can be obtained here, you will also need a copy of the latest JPGraph package which is available from here.

The new package has a considerable number of changes both to fix issues that existed in the old version and to add new customisation which means it is easier to change things like fonts and other things. This new package defaults to the fonts supplied with JPGraph and should work with minimal changes initially.

You can view the new default package here, and an initial set using a different (ARIAL) font as part of my website here, although it is not yet linked from my menu. Note some of the graphs do not contain values as I dont have those sensors in WD :wink:

Please let me know if you have any questions, suggestions or issues with them using this thread which I will subscribe to.

Have fun…

Stuart

Edit: I have tested these graphs now on PHP 7 locally and there are two warnings which come up, although they do not show on the graphs, about deprecated things in the JPGraph files themselves. I have reported these errors to JPGraph and await their response. If anyone needs a fix for these errors because their server runs PHP7 please contact me by PM and I will let you know how to edit the files to fix this. As I said the graphs display OK the errors show up in the web server error.log file.

Edit2: I heard from JPGraph this morning and they have confirmed the bug and will fix it soon.

Looking good Stuart!

Great job, Stuart!

Hi
up and running http://www.hc-iom.co.uk/graphs/wxgraphs.html just altered the wording at the top for now.
Harold

Greate news :smiley:

I have had a chat with Mark Crossley about how these graphs can be used with his Steelgauges. I found that the graphs looked a little squashed on my page so after this chat I discovered that you can alter the pop up size for the graph on his Steelgauges by altering some css. I now have it set as this:-


.tipimg{
  width: 380px;
  height: 260px;
}

which is the same size/ratio as I have set in the graphsconf.php file. So If you use these gauges with Steelgauges you might like to alter the css to be the same as the size set in your graphsconf.php file and they should look better.

I think Mark is considering how best this might be handled in future, especially as it seems the JPGraph images are pretty common amongst at least WD users.

Stuart

Besides WeatherDisplay and consoleWD, also Wswin, Meteohub, Meteobridge-Pro and probably some other Weather-programs are able to generate clientraw files. If they use Steelseries in their own site or if they use a Leuven-Template, the same graphs are already used for the pop-up graphs.

Wim

I was aware that JPGraph was indeed used for graphs for other weather programs, however unless the files are in exactly the same format my graph package will not work since I use the WD format only. However having said that if people can send me the equivalent files for other programs, together with the details of the file structure, I am quite happy to convert my graphs where I can if the data is available in the files. I cannot promise how quickly I would be able to do this but am quite willing to have a go as time permits.

Stuart

The weather-programs I mentioned create 4 clientraw files often to be used in WD-Live or Mesonets. So if is is identical enough for WD-Live it is probably OK for the graphs also.
Example Gauges and your graphs for
Meteohub => http://www.weerstation-parkstad.nl/weather2/index.php?p=gaugePage&lang=nl
consoleWD => http://kb9cfv.net/weather/weather27/index.php?p=17&lang=en#data-area
WSWIN => http://www.cux-wetter.de/weather28/?p=gaugePage
[s]WVIEW => http://www.kids4all.nl/weather28/index.php?p=gaugePage&lang=nl#data-area[/s]

There are maybe more weatherprograms generating clientraw files

Wim

Thanks for this. I have not had luck with the old version. I am blaming myself and my lack of coding experience.
I will try it during the turkey break. It may mean moving some files around to get everything in the same folder. This is a good way to get away from flash-although I do like the layout of WDL.

Wim I have not been able to find out what kind of files WVIEW creates and can be used for JPGraph. Certainly I have not been able to find any clientraw type files on that website you linked to. I’ve captured samples for the others. It is perfectly possible someone has created JPGraphs for WView by using the Wview files but I’d need to know what they are in order to progress that one.

Stuart

I think you are right. That site is off-line for a long time, so i will remove the wview from the list of clientraw users. Probably they were just testing different weather-programs at the same site.
Wim

Stuart, appreciate all your work on this new version.

Put it up the other day and have found a bump in the road on my http://tiggrweather.net/wxastronomy.php. Down the page a bit the sun path graph is missing, replaced by the error message, “Unable to find graphslang.php” (called out at line 151 in graphsconf.php). That file is in /wxgraphs/.

Thoughts appreciated.

I am a little puzzled by this one as sunposa.php is not one of my graphs which is the image which is failing. The only sun graphs of mine all start solar.

Stuart

I’ve been doing some testing with the other S/W clientraw files I’ve been able to get. Basically the only one where all my graphs seem to work is consoleWD which lets face it is not a surprise since it is Brian’s code. The other two Meteohub and WSWIN both have problems and the data for all the graphs is simply not there or not in a valid format.

So for Meteohub and WSWIN the easiest thing is to run my sample HTML file which tests all the graphs against the clientraw files for these programs and pick the ones which work. The other graphs for now will not work unless the relevant S/W is updated to include the relevant data in the same format as used in the WD files.

If anyone has any other software which creates clientraw files please let me know and I’ll do some checking to see if they can work.

Stuart

Understood. The only reason I tossed it your way was because all I’ve done is to add your 4.0.1 package - that’s when the failure started. Now I’m unable to fine the graphslang.php file anywhere.

Thanks anyway.

I think your install may not be complete because I can open the link to Stuart’s new zip http://www.stella-maris.org.uk/code/wxgraphs.zip and see graphslang.php is included.

More like my brain is incomplete, niko. Have about 6 things failing right now and messed up my post - my apology for that. The graphslang.php file is in /wxgraphs/ on my server. The problem is why it apparently can’t be found. Line 151 in graphsconf.php is what is looking for that file and also what posts the error. Stuart’s http://tiggrweather.net/wxgraphs/wxgraphs_test.html appears to be working fine (don’t know if it uses the graphslang.php file). Nothing else has been changed.

Thanks.

I suggest we take this to another thread since it’s not really related to Stuart’s project.

The fact the the wxgraphs_test.html is working (and I just tested it here) means that the graphslang.php file is there since the graphsconf.php calls it on line 158. It does look like you have other issues.

Stuart