Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Cumulus and jpgraphs

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
dvandellen
Posts: 35
Joined: Thu 24 Feb 2011 1:19 pm
Weather Station: ws4000
Operating System: windows xp sp3
Location: The Netherlands
Contact:

Re: Cumulus and jpgraphs

Post by dvandellen »

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/nieuwe ... n/temp.php
dvandellen
Posts: 35
Joined: Thu 24 Feb 2011 1:19 pm
Weather Station: ws4000
Operating System: windows xp sp3
Location: The Netherlands
Contact:

Re: Cumulus and jpgraphs

Post by dvandellen »

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
dvandellen
Posts: 35
Joined: Thu 24 Feb 2011 1:19 pm
Weather Station: ws4000
Operating System: windows xp sp3
Location: The Netherlands
Contact:

Re: Cumulus and jpgraphs

Post by dvandellen »

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/nieuwe ... inddir.php

Maybe someone has the same file that is working, so i can copy it to my site?
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus and jpgraphs

Post by beteljuice »

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 !
dvandellen
Posts: 35
Joined: Thu 24 Feb 2011 1:19 pm
Weather Station: ws4000
Operating System: windows xp sp3
Location: The Netherlands
Contact:

Re: Cumulus and jpgraphs

Post by dvandellen »

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??
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus and jpgraphs

Post by beteljuice »

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 !
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Cumulus and jpgraphs

Post by gemini06720 »

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 11 Mar 2011 4:47 am, edited 1 time in total.
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Cumulus and jpgraphs

Post by gemini06720 »

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: Select all

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: Select all

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: Select all

$x = array_reverse($rx);
$y1 = array_reverse($ry1);
The modified code:

Code: Select all

$x = array_reverse($rx);
$y1 = array_reverse($ry1);
$z = "";
dvandellen
Posts: 35
Joined: Thu 24 Feb 2011 1:19 pm
Weather Station: ws4000
Operating System: windows xp sp3
Location: The Netherlands
Contact:

Re: Cumulus and jpgraphs

Post by dvandellen »

Hey

Thanks guys, it all works fine now!

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

Re: Cumulus and jpgraphs

Post by dvandellen »

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 :)
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus and jpgraphs

Post by beteljuice »

I'm going to have a beer ....
Image
Last edited by beteljuice on Tue 26 Mar 2013 4:11 am, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Cumulus and jpgraphs

Post by gemini06720 »

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: Select all

$rx[] = timeto12(substr(ret_value("time"),0,2));
Modified code:

Code: Select all

// $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.
dvandellen
Posts: 35
Joined: Thu 24 Feb 2011 1:19 pm
Weather Station: ws4000
Operating System: windows xp sp3
Location: The Netherlands
Contact:

Re: Cumulus and jpgraphs

Post by dvandellen »

Yez i know my english is not perfect :D

It works, your good in this stuff man ;)
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Cumulus and jpgraphs

Post by beteljuice »

Don't even think about asking ...
Image

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

Edit: changed for new larger graphs :?
Last edited by beteljuice on Tue 26 Mar 2013 4:10 am, edited 2 times in total.
Image
......................Imagine, what you will KNOW tomorrow !
dvandellen
Posts: 35
Joined: Thu 24 Feb 2011 1:19 pm
Weather Station: ws4000
Operating System: windows xp sp3
Location: The Netherlands
Contact:

Re: Cumulus and jpgraphs

Post by dvandellen »

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
Post Reply