Sandaysoft

Support forum for Cumulus weather station software
It is currently Thu Jun 20, 2013 12:32 am
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Thu Mar 10, 2011 1:02 pm 
Offline

Joined: Thu Feb 24, 2011 1:19 pm
Posts: 35
Location: The Netherlands
Weather Station: ws4000
Operating System: windows xp sp3
Hmm, i uploaded all the 'Cumulus PHP JpGraph Graphs'.

I dont know why some of them dont work..

Edit: I changed the rights of all jpgraph files to read and write permission, now it gives a other error:

http://www.weerstationniawier.nl/nieuwegrafieken/temp.php

_________________
http://www.weerstationniawier.nl


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Thu Mar 10, 2011 1:20 pm 
Offline

Joined: Thu Feb 24, 2011 1:19 pm
Posts: 35
Location: The Netherlands
Weather Station: ws4000
Operating System: windows xp sp3
I figured it out by myself...

In the temp.php file on line 237 and 244 is:

237: $txtaa=new Text($chrs . "Hum");
244: $txtab=new Text($chrs . "Temp");

I changed it to :

237: $txtaa=new Text("Hum");
244: $txtab=new Text("Temp");

and now it works.

very very very strange... :?

Thanks anyway

_________________
http://www.weerstationniawier.nl


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Thu Mar 10, 2011 2:17 pm 
Offline

Joined: Thu Feb 24, 2011 1:19 pm
Posts: 35
Location: The Netherlands
Weather Station: ws4000
Operating System: windows xp sp3
I changed all .php files that wouldn't load, so those work fine now.

Only i cant change winddir.php for some reason, this one give a other error:
http://www.weerstationniawier.nl/nieuwegrafieken/winddir.php

Maybe someone has the same file that is working, so i can copy it to my site?

_________________
http://www.weerstationniawier.nl


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Thu Mar 10, 2011 2:34 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Part of: http://www.weerstationniawier.nl/nieuwe ... .php?debug

Notice: Undefined index: tempunit in D:\www\weerstationniawier.n\www\nieuwegrafieken\winddir.php on line 113 DEBUG> TempUnit =
Notice: Undefined index: pressunit in D:\www\weerstationniawier.n\www\nieuwegrafieken\winddir.php on line 114 DEBUG> PressUnit =
Notice: Undefined index: rainunit in D:\www\weerstationniawier.n\www\nieuwegrafieken\winddir.php on line 115 DEBUG> RainUnit =
Notice: Undefined index: windunit in D:\www\weerstationniawier.n\www\nieuwegrafieken\winddir.php on line 116 DEBUG> WindUnit =

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Thu Mar 10, 2011 3:00 pm 
Offline

Joined: Thu Feb 24, 2011 1:19 pm
Posts: 35
Location: The Netherlands
Weather Station: ws4000
Operating System: windows xp sp3
If you put some more words in your reply i would be able to change it.
Now i have to ask what needs to be changed because i still dont know what to change... I can see its something with the pressunit etc..

So what need to be changed??

_________________
http://www.weerstationniawier.nl


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 1:18 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
As I said before, I'm not using the software.

I assume that the section in winddir.php which is missing the data is common accross the various graph files.

Have a look see .....

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 4:37 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1698
Location: World...
Weather Station: No weather station
Operating System: No operating system
beteljuice wrote:
As I said before, I'm not using the software.
For someone not using the scripts, you are really trying hard to solve the problems... :D

beteljuice wrote:
I assume that the section in winddir.php which is missing the data is common accross the various graph files.
I have compared the 7 graphic scripts and found that some code is missing from the 'winddir.php' script... :shock:


Last edited by gemini06720 on Fri Mar 11, 2011 4:47 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 4:46 am 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1698
Location: World...
Weather Station: No weather station
Operating System: No operating system
OK, some code and a variable have to be added to at least the 'winddir.php' script...

The original code - lines 96 to 110:
Code:
foreach($rawdata as $key) {
  if ($got < $wanted) {

    $DATA = preg_split('/ +/', $key);

    if (freq_check(substr( ret_value("time"),3,2))) {
      debug_out("Storing data");
      debug_out("Xaxis = " . timeto12(substr(ret_value("time"),0,2)));
      debug_out("Y1axis = " . ret_value("avgbearing"));
      $rx[] = timeto12(substr(ret_value("time"),0,2));
      $ry1[] = ret_value("avgbearing");
      $got++;
    }
  }
}
The new replacement code - 4 new lines added:
Code:
foreach($rawdata as $key) {
  if ($got < $wanted) {

    $DATA = preg_split('/ +/', $key);

    if (freq_check(substr( ret_value("time"),3,2))) {
      debug_out("Storing data");
      debug_out("Xaxis = " . timeto12(substr(ret_value("time"),0,2)));
      debug_out("Y1axis = " . ret_value("avgbearing"));
      $rx[] = timeto12(substr(ret_value("time"),0,2));
      $ry1[] = ret_value("avgbearing");

      $SITE['tempunit']    = "&#xb0;" . ret_value("tempunit");
      $SITE['pressunit']    = ret_value("pressunit");
      $SITE['rainunit']    = ret_value("rainunit");
      $SITE['windunit']   = ret_value("windunit");
      $got++;
    }
  }
}
The variable '$z' must also be defined (a few lines further down) - the original code:
Code:
$x = array_reverse($rx);
$y1 = array_reverse($ry1);
The modified code:
Code:
$x = array_reverse($rx);
$y1 = array_reverse($ry1);
$z = "";


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 11:38 am 
Offline

Joined: Thu Feb 24, 2011 1:19 pm
Posts: 35
Location: The Netherlands
Weather Station: ws4000
Operating System: windows xp sp3
Hey

Thanks guys, it all works fine now!

:clap:

_________________
http://www.weerstationniawier.nl


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 11:46 am 
Offline

Joined: Thu Feb 24, 2011 1:19 pm
Posts: 35
Location: The Netherlands
Weather Station: ws4000
Operating System: windows xp sp3
An other question... ;)

How can i change the time's that are in the graphs?

Like 7am needs to be 7:00 and 7pm needs to be 19:00...

What files need to be changed?


Thanks in advance again :)

_________________
http://www.weerstationniawier.nl


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 11:56 am 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
I'm going to have a beer ....
Image

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Last edited by beteljuice on Tue Mar 26, 2013 4:11 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 12:36 pm 
Offline

Joined: Mon Aug 10, 2009 10:16 pm
Posts: 1698
Location: World...
Weather Station: No weather station
Operating System: No operating system
dvandellen wrote:
An other question... ;)
Not another question??? :mrgreen:

dvandellen wrote:
How can i change the time's that are in the graphs? ... Like 7am needs to be 7:00 and 7pm needs to be 19:00...
A line of code has to be modified in all graphic producing scripts ('baro.php, 'dewpt.php', 'intemp.php', 'rain.php', 'temp.php', 'wind.php' and 'winddir.php')...
Original code:
Code:
$rx[] = timeto12(substr(ret_value("time"),0,2));
Modified code:
Code:
// $rx[] = timeto12(substr(ret_value("time"),0,2)); // for 12 hour display with am/pm
$rx[] = substr(ret_value("time"),0,5); // for 24 hour display
What I have done was to comment out the old line and add the new line.


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 1:17 pm 
Offline

Joined: Thu Feb 24, 2011 1:19 pm
Posts: 35
Location: The Netherlands
Weather Station: ws4000
Operating System: windows xp sp3
Yez i know my english is not perfect :D

It works, your good in this stuff man ;)

_________________
http://www.weerstationniawier.nl


Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 1:55 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1888
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Don't even think about asking ...
Image

Note to management; please remove if / when fails or annoying :D

Edit: changed for new larger graphs :?

_________________
Image
......................Imagine, what you will KNOW tomorrow !


Last edited by beteljuice on Tue Mar 26, 2013 4:10 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Cumulus and jpgraphs
PostPosted: Fri Mar 11, 2011 4:03 pm 
Offline

Joined: Thu Feb 24, 2011 1:19 pm
Posts: 35
Location: The Netherlands
Weather Station: ws4000
Operating System: windows xp sp3
Thats a nice idee for my website...

I was thinking about how i could place my jpgraphs in different hours (24/72/94 etc...) without getting 28 thumbnails

thanks :D

_________________
http://www.weerstationniawier.nl


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group