cloudy

Author Topic: How to setup jpgraphs and wxgraphs  (Read 82352 times)

0 Members and 2 Guests are viewing this topic.

Offline Boce

  • Posts: 16
  • Knjazevac, Serbia
    • Meteo Knjazevac
Re: How to setup jpgraphs and wxgraphs
« Reply #60 on: February 11, 2008, 11:45:23 AM »
Thanx Stuart
I think that is OK
We will be sure by night when Temp will be below zero

Dejan
 

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: How to setup jpgraphs and wxgraphs
« Reply #61 on: February 11, 2008, 09:33:34 PM »
I seem to be having a really simplistic problem but I can't solve it.  The two fonts are present in the jpgraph folder in a folder of their own named "ttf" but for some reason I'm getting this error.  All help appreciated.


Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,156
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: How to setup jpgraphs and wxgraphs
« Reply #62 on: February 11, 2008, 09:51:56 PM »
You can't just upload fonts, you have to install them, see this Broadstairs post for instructions.

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: How to setup jpgraphs and wxgraphs
« Reply #63 on: February 11, 2008, 11:07:38 PM »
Thanks, Niko.....I had done the "hard path" but neglected to put the rest of it in. 


Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: How to setup jpgraphs and wxgraphs
« Reply #64 on: February 14, 2008, 11:56:18 PM »
On the different graphs that are labelled "last whole hour" I have a question.  My local time is 18:53.  On each of the different types of graphs that I have running so far the ones that are for the time period  "last whole hour" are showing 16:xx.  Why would they not show 17:xx?


Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,156
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: How to setup jpgraphs and wxgraphs
« Reply #65 on: February 15, 2008, 12:03:17 AM »
Do you have a link to the graph?

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: How to setup jpgraphs and wxgraphs
« Reply #66 on: February 15, 2008, 02:25:22 AM »
http://www.luvretirement.com/graphtemp.php  My time now is 9:30PM.  The graph shows that the "last whole hour" was 7:00 PM to 7:59 PM.  I'm not questioning the operation of the script at all, I'm just curious about the terminology.

Also another time question:  The "last whole hour" time is in 12hr format; the "last 60 minutes" time is in 24hr format; the "indoor temperature" time is in 12hr format but doesn't specify AM or PM.  Just curious.
« Last Edit: February 15, 2008, 02:53:45 AM by lulu836 »


Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,156
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: How to setup jpgraphs and wxgraphs
« Reply #67 on: February 15, 2008, 03:04:04 AM »
It appears to calculate the times for the last hour from the filedate/time that it sees on clientrawhour.txt file (not in the file, the actual file creation/update date/time) on the server. So if you look at that file with your ftp client, what time does it show? And is that GMT/UTC or somehow related to your local clock time?

Offline broadstairs

  • Stuart
  • Posts: 6,248
  • Broadstairs, Kent, UK
    • Broadstairs
Re: How to setup jpgraphs and wxgraphs
« Reply #68 on: February 15, 2008, 07:05:09 AM »
The time is calculated from the file modified time because, at least on my server, it is not created each time but modified. The clientrawhour.txt is the file and it is created at 59 minutes past each hour and the data contained in it represents the data for the hour which is just about to end, and in my testing I found that mine was always uploaded on the hour or just after the hour so I take the time and reduce the hour value by one. Now it is just possible that your weather PC creates this file say at 16:59:00 and uploads it so the time stamp is 16:59:59 in which case my calculation will fail because it should be the hour ending at 16:59:59 but the graph will display hour 15. The problem here is that this data file does not have a timestamp so I have to calculate the time represented somehow. WDL gets round it be only showing the minutes as a negative value. I decided on this way to make it the same as the other graphs and I think the data may well be uploaded more than once per hour as well in which case the second time it uploads the time will display correctly.

If someone can suggest a more reliable way then I can change it, or maybe we could ask Brian to add the timestamp to the file showing when the data is created which would be the best way to do it.

Stuart

EDIT: I do think in retrospect we need a time stamp in the file because if your server is in a different timezone it will also show wrong since I'm using the server file time. Yes I know I could get PHP to work with the correct timezone but I think the best way is to ask Brian to add the time stamp.
« Last Edit: February 15, 2008, 07:08:28 AM by broadstairs »

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,156
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: How to setup jpgraphs and wxgraphs
« Reply #69 on: February 15, 2008, 01:56:37 PM »
EDIT: I do think in retrospect we need a time stamp in the file because if your server is in a different timezone it will also show wrong since I'm using the server file time. Yes I know I could get PHP to work with the correct timezone but I think the best way is to ask Brian to add the time stamp.

I think the way you are doing it is fine. If you just add a user entered (at install) variable in the code for an offset between server time and station time it should be almost bulletproof.

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: How to setup jpgraphs and wxgraphs
« Reply #70 on: February 15, 2008, 02:01:39 PM »
GoDaddy offices are located in Scottsdale, AZ but how would you find out where their server farm is?


Offline broadstairs

  • Stuart
  • Posts: 6,248
  • Broadstairs, Kent, UK
    • Broadstairs
Re: How to setup jpgraphs and wxgraphs
« Reply #71 on: February 15, 2008, 02:08:13 PM »
Setting a timezone on PHP requires PHP V5.1.0 as a minimum which would mean that these graphs would require that level of PHP.

To answer the other point it would be your station timezone which would be used and therefore it would not matter where the server was located or what timezone it worked on.

I guess the other point would be daylight saving as well.

I still think it would be best to ask Brian to add a field which represented perhaps just the hour value that the data represented. That would work universally and not require PHP V5.1.0 either.

Stuart

Offline niko

  • syzygy
  • Global Moderator
  • Posts: 22,156
  • Crystal Ball broken! Please post the URL.
  • Northern California, U.S.A.
    • http://www.realweatherstation.com
Re: How to setup jpgraphs and wxgraphs
« Reply #72 on: February 15, 2008, 02:44:35 PM »
It certainly would be easier if there was a timestamp. I'm not sure how lulu's graph is working at all, her server responds that it's set to GMT so I would have thought that's what the file time would be in.

Offline lulu836

  • Linda
  • Posts: 2,232
  • Louisiana
    • Luv Retirement
Re: How to setup jpgraphs and wxgraphs
« Reply #73 on: February 15, 2008, 02:51:26 PM »
It certainly would be easier if there was a timestamp. I'm not sure how lulu's graph is working at all, her server responds that it's set to GMT so I would have thought that's what the file time would be in.

One of the questions during domain set up pertains to what time zone you are in if that makes any difference. :dontknow:
« Last Edit: February 15, 2008, 02:55:05 PM by lulu836 »


Offline broadstairs

  • Stuart
  • Posts: 6,248
  • Broadstairs, Kent, UK
    • Broadstairs
Re: How to setup jpgraphs and wxgraphs
« Reply #74 on: February 15, 2008, 03:26:01 PM »
As to servers I guess it may well be possible for them to be set to the users timezone, perhaps someone who knows could confirm this.

As to the mixed time styles 12 vs 24 hour format. All my graphs show in 24 hour format, but I run WD in 24hr mode. Any graphs which have time values (the 24 hour ones all have time stamps in the appropriate clientraw file) will show in whatever mode you run WD in, all the others are coded in 24 hour mode which was the way I coded it.

I probably think right now that the graphs need some cleaning up and sorting out a bit to perhaps externalise some more stuff to the config file. As to the timing of the last whole hour graphs I still would like Brian to consider adding a time stap of the hour the data represents which makes that part fireproof. The other time formats could then be externalised to the config file.

Right now I probably dont have the time to do this, I will consider it but it will be a while before it happens.

Stuart

 

cumulus