cloudy cloudy

Author Topic: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)  (Read 15653 times)

0 Members and 1 Guest are viewing this topic.

Offline broadstairs

  • Stuart
  • Posts: 7,066
  • Broadstairs, Kent, UK
  • OS/Browser:
  • (Linux Mint)
  • Firefox 49.0
    • Broadstairs
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.
« Last Edit: November 24, 2016, 09:26:41 AM by broadstairs »

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 28,250
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 54.0.2840.99
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #1 on: November 21, 2016, 03:13:14 PM »
Looking good Stuart!

Offline saratogaWX

  • Global Moderator
  • Posts: 5,945
  • Ken True
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win NT 10.0
  • Firefox 50.0
    • Saratoga Weather
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #2 on: November 21, 2016, 04:03:23 PM »
Great job, Stuart!
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline hcorrin

  • Posts: 1,265
  • Ballaugh Isle of Man GB
  • OS/Browser:
  • Win NT 10.0
  • Mozilla compatible
    • Ballaugh Weather
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #3 on: November 21, 2016, 04:04:31 PM »
Hi
up and running  http://www.hc-iom.co.uk/graphs/wxgraphs.html just altered the wording at the top for now.
Harold

Offline Bjørn

  • Posts: 334
  • Ulsteinvik, Norway
  • OS/Browser:
  • Win NT 10.0
  • Chrome 53.0.2785.148
    • Ulsteinvikweather
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #4 on: November 21, 2016, 09:06:47 PM »
Greate news  :D

Offline broadstairs

  • Stuart
  • Posts: 7,066
  • Broadstairs, Kent, UK
  • OS/Browser:
  • (Linux Mint)
  • Firefox 50.0
    • Broadstairs
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #5 on: November 23, 2016, 10:23:03 AM »
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:-

Code: [Select]
.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

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,421
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.12.1
  • Chrome 54.0.2840.98
    • My PWS at Leuven Belgium Europe
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #6 on: November 23, 2016, 12:23:50 PM »
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:-

Code: [Select]
.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
« Last Edit: November 23, 2016, 01:51:45 PM by wvdkuil »
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline broadstairs

  • Stuart
  • Posts: 7,066
  • Broadstairs, Kent, UK
  • OS/Browser:
  • (Linux Mint)
  • Firefox 50.0
    • Broadstairs
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #7 on: November 23, 2016, 01:42:40 PM »
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

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,421
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.12.1
  • Chrome 54.0.2840.98
    • My PWS at Leuven Belgium Europe
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #8 on: November 23, 2016, 04:14:42 PM »
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
WVIEW => http://www.kids4all.nl/weather28/index.php?p=gaugePage&lang=nl#data-area

There are maybe more weatherprograms generating clientraw files

Wim
« Last Edit: November 24, 2016, 10:51:36 AM by wvdkuil »
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline chief-david

  • Posts: 153
  • OS/Browser:
  • Win NT 10.0
  • Chrome 54.0.2840.99
    • Robbinsdale Middle School Weather
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #9 on: November 23, 2016, 06:46:20 PM »
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.
« Last Edit: November 23, 2016, 06:52:10 PM by chief-david »
Vantage Pro Plus 6163
KMNMINNE28
CWOP DW6947
Midwesternweather.net 
twitter @RMSWeather

Offline broadstairs

  • Stuart
  • Posts: 7,066
  • Broadstairs, Kent, UK
  • OS/Browser:
  • (Linux Mint)
  • Firefox 50.0
    • Broadstairs
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #10 on: November 24, 2016, 10:45:59 AM »
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

Offline wvdkuil

  • Wim van der Kuil
  • Posts: 1,421
  • Leuven Belgium CET
  • OS/Browser:
  • Mac OS X 10.12.1
  • Chrome 54.0.2840.98
    • My PWS at Leuven Belgium Europe
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #11 on: November 24, 2016, 10:51:15 AM »
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
Support & demo PWS_Dasboard  (HWS_template) http://pwsdashboard.weather-template.com/ 
My PWS at home https://weer.sluispark.be/
And at my daughters house https://www.weerstation-herent.be/

Offline jgillett

  • John - W7JKG
  • Posts: 968
  • Phoenix, AZ
  • OS/Browser:
  • Mac OS X 10.12
  • Firefox 50.0
    • TiggrWeather Phoenix
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #12 on: November 24, 2016, 04:59:39 PM »
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.
John
W7JKG


Offline broadstairs

  • Stuart
  • Posts: 7,066
  • Broadstairs, Kent, UK
  • OS/Browser:
  • (Linux Mint)
  • Firefox 50.0
    • Broadstairs
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #13 on: November 24, 2016, 05:32:35 PM »
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

Offline broadstairs

  • Stuart
  • Posts: 7,066
  • Broadstairs, Kent, UK
  • OS/Browser:
  • (Linux Mint)
  • Firefox 50.0
    • Broadstairs
Re: New version of the JPGraphs for WD using clientraw data (wxgraphs.zip)
« Reply #14 on: November 24, 2016, 05:46:32 PM »
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