Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.8.4 (build 3094) - 14 September 2020 (please see announcement regarding releases since 3.5.0)
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

cumulus-jpgraph-graphs-3.1

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
SergiosK
Posts: 24
Joined: Mon 15 Apr 2013 2:17 pm
Weather Station: WH8681-Solar
Operating System: Windows XP SP2
Location: Greece

cumulus-jpgraph-graphs-3.1

Post by SergiosK »

Hello, i have install jpgraph, i have cron program for the realtimelog.php and i get some results.
Baro.php working, temp.php dont working and the others .php dont working (rain.php etc.).\
It tells me te image cannot be displayed because it contains errors.
I have a debug
For temp.php
DEBUG> DEBUG TURNED ON
DEBUG> Script is running in: apache2handler mode
DEBUG> Server Path: C:/server/Apache/htdocs
DEBUG> Request URI: /graphs/temp.php?debug
DEBUG> Server Name: http://localhost
DEBUG> PHP Self: /graphs/temp.php
DEBUG> Path is set to: C:\server\Apache\htdocs\graphs
DEBUG> JpGraph is set to: ../jpgraph/jpgraph/
DEBUG> obtaining data from: ./realtime.log
DEBUG> Obtained 75
DEBUG> Want to obtain 24
DEBUG> Starting Array Sweep
DEBUG> Matched Freq 0
DEBUG> Storing data
DEBUG> Xaxis = 1pm
DEBUG> Y1axis = 17.5
DEBUG> Y2axis = 43
DEBUG> Matched Freq 0
DEBUG> Storing data
DEBUG> Xaxis = 12pm
DEBUG> Y1axis = 18.5
DEBUG> Y2axis = 44
DEBUG> Collected 2 records.
DEBUG> TempUnit = °C
DEBUG> PressUnit = hPa
DEBUG> RainUnit = mm
DEBUG> WindUnit = km/h
DEBUG> Completed Array Sweep. Reversing Data
DEBUG> Output of Xaxis Array

Array
(
[0] => 12pm
[1] => 1pm
)

DEBUG> Output of Y1axis Array

Array
(
[0] => 18.5
[1] => 17.5
)

DEBUG> Output of Y2axis Array

Array
(
[0] => 44
[1] => 43
)

DEBUG> Starting Graph Creation

Notice: Undefined variable: chrs in C:\server\Apache\htdocs\graphs\temp.php on line 237

Notice: Undefined variable: chrs in C:\server\Apache\htdocs\graphs\temp.php on line 244
DEBUG> Graph Creation complete. Graph output suppresed due to debug

For baro.php (that works)
DEBUG> DEBUG TURNED ON
DEBUG> Script is running in: apache2handler mode
DEBUG> Server Path: C:/server/Apache/htdocs
DEBUG> Request URI: /graphs/baro.php?debug
DEBUG> Server Name: http://localhost
DEBUG> PHP Self: /graphs/baro.php
DEBUG> Path is set to: C:\server\Apache\htdocs\graphs
DEBUG> JpGraph is set to: ../jpgraph/jpgraph/
DEBUG> obtaining data from: ./realtime.log
DEBUG> Obtained 76
DEBUG> Want to obtain 24
DEBUG> Starting Array Sweep
DEBUG> Matched Freq 0
DEBUG> Storing data
DEBUG> Xaxis = 1pm
DEBUG> Yaxis = 4.8
DEBUG> Matched Freq 0
DEBUG> Storing data
DEBUG> Xaxis = 12pm
DEBUG> Yaxis = 6.0
DEBUG> Collected 2 records.
DEBUG> TempUnit = °C
DEBUG> PressUnit = hPa
DEBUG> RainUnit = mm
DEBUG> WindUnit = km/h
DEBUG> Completed Array Sweep. Reversing Data
DEBUG> Output of Xaxis Array

Array
(
[0] => 12pm
[1] => 1pm
)

DEBUG> Output of Y1axis Array

Array
(
[0] => 1016.1
[1] => 1016.1
)

DEBUG> Starting Graph Creation
DEBUG> Graph Creation complete. Graph output suppresed due to debug

Anyone can help?
Thank you

SergiosK
Posts: 24
Joined: Mon 15 Apr 2013 2:17 pm
Weather Station: WH8681-Solar
Operating System: Windows XP SP2
Location: Greece

Re: cumulus-jpgraph-graphs-3.1

Post by SergiosK »

I think i must leave the script over 24hours to work as i can see now i have collected records 2 and now i go 3.I see that the errors hits at monthly script into php files.

SergiosK
Posts: 24
Joined: Mon 15 Apr 2013 2:17 pm
Weather Station: WH8681-Solar
Operating System: Windows XP SP2
Location: Greece

Re: cumulus-jpgraph-graphs-3.1

Post by SergiosK »

Nothing happens. I get the same result.
If i debug it it says:
DEBUG> Starting Graph Creation

Notice: Undefined variable: chrs in C:\server\Apache\htdocs\graphs\temp.php on line 237

Notice: Undefined variable: chrs in C:\server\Apache\htdocs\graphs\temp.php on line 244
DEBUG> Graph Creation complete. Graph output suppresed due to debug

If i defined the code
// Place small monthly under right index
$txtaa=new Text($chrs . "Hum");
$txtaa->SetFont(FF_VERDANA, FS_BOLD,5);
$txtaa->SetPos(374,204,'center');
$txtaa->SetColor("azure4");
$graph->AddText($txtaa);

// Place small daily under right index
$txtab=new Text($chrs . "Temp");
$txtab->SetFont(FF_VERDANA, FS_BOLD,5);
$txtab->SetPos(22,204,'center');
$txtab->SetColor("azure4");
$graph->AddText($txtab);

If i defined those lines it runs the temp.php.
So, if i understand, those lines are a simple text humidity and temperature that write on y axis and they dont work.
Any idea?Thanks.

SergiosK
Posts: 24
Joined: Mon 15 Apr 2013 2:17 pm
Weather Station: WH8681-Solar
Operating System: Windows XP SP2
Location: Greece

Re: cumulus-jpgraph-graphs-3.1

Post by SergiosK »

I have fix it i think. For some reason the php (i dont know, i run php in windows mode, first time happened that :bash: )
The code goes :
// Place small monthly under right index undefined argotera
$txtaa=new Text($chrs . "Hum");
$txtaa->SetFont(FF_VERDANA, FS_BOLD,5);
$txtaa->SetPos(374,204,'center');
$txtaa->SetColor("azure4");
$graph->AddText($txtaa);

// Place small daily under right index
$txtab=new Text($chrs . "Temp");
$txtab->SetFont(FF_VERDANA, FS_BOLD,5);
$txtab->SetPos(22,204,'center');
$txtab->SetColor("azure4");
$graph->AddText($txtab);

// If Info is on, then display
// Chart Hours and Sample on graph

if ($SITE['info']) {
$chrs = $SITE['hrs'];
if ($SITE['freq'] == 0) {
$fq = "Once an Hour";
}
if ($SITE['freq'] == 1) {
$chrs = $chrs / 2;
$fq = "Twice an Hour";
}
if ($SITE['freq'] == 2) {
$chrs = $chrs /4;
$fq = "4x an Hour";

So i fix it as
$chrs = $SITE['hrs'];
// Place small monthly under right index undefined argotera
$txtaa=new Text($chrs . "Hum");
$txtaa->SetFont(FF_VERDANA, FS_BOLD,5);
$txtaa->SetPos(374,204,'center');
$txtaa->SetColor("azure4");
$graph->AddText($txtaa);

// Place small daily under right index
$txtab=new Text($chrs . "Temp");
$txtab->SetFont(FF_VERDANA, FS_BOLD,5);
$txtab->SetPos(22,204,'center');
$txtab->SetColor("azure4");
$graph->AddText($txtab);

// If Info is on, then display
// Chart Hours and Sample on graph

if ($SITE['info']) {
$chrs = $SITE['hrs'];
if ($SITE['freq'] == 0) {
$fq = "Once an Hour";
}
if ($SITE['freq'] == 1) {
$chrs = $chrs / 2;
$fq = "Twice an Hour";
}
if ($SITE['freq'] == 2) {
$chrs = $chrs /4;
$fq = "4x an Hour";

It must read it at the beggining the $chrs cause it dont recognize. So solved :lol:

SergiosK
Posts: 24
Joined: Mon 15 Apr 2013 2:17 pm
Weather Station: WH8681-Solar
Operating System: Windows XP SP2
Location: Greece

Re: cumulus-jpgraph-graphs-3.1

Post by SergiosK »

Does anyone have the solar.php (solar/uv) cause i didn't find in the cumulus-jpgraph3.1 package.
Thanks.

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-jpgraph-graphs-3.1

Post by gemini06720 »

SergiosK wrote:Does anyone have the solar.php (solar/uv) cause i didn't find in the cumulus-jpgraph3.1 package.
I do not know if it is the script you need ... I hope the script can be of some use... :|
Last edited by gemini06720 on Sun 09 Jun 2013 9:49 am, edited 1 time in total.

SergiosK
Posts: 24
Joined: Mon 15 Apr 2013 2:17 pm
Weather Station: WH8681-Solar
Operating System: Windows XP SP2
Location: Greece

Re: cumulus-jpgraph-graphs-3.1

Post by SergiosK »

DEBUG> Starting Graph Creation

Notice: Undefined index: graphwidth in C:\server\Apache\htdocs\graphs\solar1.php on line 163

Notice: Undefined index: graphheight in C:\server\Apache\htdocs\graphs\solar1.php on line 163
JpGraph Error: 25008 Image width/height argument in Graph::Graph() must be numeric



As i can see the parameter graphwidth is undefined. To work you must define in graphsettings.php or in solar.php.
I have made yesterday mine solar-uv.php and ofcourse i have and must add the UV and SolarRad as the realtime.txt comes from the cumulus page.So if someone wants to run solar-uv.php must add(the bold words):

$SITE['cvalues'] = array(
"date","time","temp","hum","dew","wspeed","wgust","avgbearing","rrate",
"rfall","press","wdir","beaufort","windunit","tempunit","pressunit","rainunit",
"windrun","presstrend","rmonth","ryear","rfallY","intemp","inhum","wchill",
"temptrendval","tempTH","TtempTH","tempTL","TtempTL",
"windTM","TwindTM","wgustTM","TwgustTM",
"pressTH","TpressTH","pressTL","TpressTL",
"version","build","rmaxgust","heatindex","humidex","UV","ET","SolarRad");

############################################################################

############################################################################
# Reference: Cumulus Format of realtime.txt file
############################################################################
# Field Pos Example Description
# date 0 18/10/08 date (always dd/mm/yy)
# time 1 16:03:45 time (always hh:mm:ss)
# temp 2 8.4 outside temperature
# hum 3 84 relative humidity
# dew 4 5.8 dewpoint
# wspeed 5 24.2 wind speed (average)
# wgust 6 33.0 wind speed (gust)
# avgbearing 7 261 wind bearing
# rrate 8 0.0 current rain rate
# rfall 9 1.0 rain today
# press 10 999.7 barometer
# wdir 11 W wind direction
# beaufort 12 6 wind speed (beaufort)
# windunit 13 mph wind units
# tempunit 14 C temperature units
# pressunit 15 mb pressure units
# rainunit 16 mm rain units
# windrun 17 146.6 wind run (today)
# pressrend 18 +0.1 pressure trend value
# rmonth 19 85.2 monthly rain
# ryear 20 588.4 yearly rain
# rfallY 21 11.6 yesterday's rainfall
# intemp 22 20.3 inside temperature
# inhum 23 57 inside humidity
# wchll 24 3.6 wind chill
# temptrendval 25 -0.7 temperature trend value
# tempTH 26 10.9 today's high temp
# TtempTH 27 12:00 time of today's high temp (hh:mm)
# tempTL 28 7.8 today's low temp
# TtempTL 29 14:41 time of today's low temp (hh:mm)
# windTM 30 37.4 today's high wind speed (average)
# TwindTM 31 14:38 time of today's hi wind (avg) (hh:mm)
# wgustTM 32 44.0 today's high wind gust
# TwgustTM 33 14:28 time of today's high wind gust (hh:mm)
# pressTH 34 999.8 today's high pressure
# TpressTH 35 16:01 time of today's high pressure (hh:mm)
# pressTL 36 998.4 today's low pressure
# TpressTL 37 12:06 time of today's low pressure (hh:mm)
# version 38 1.8.2 Cumulus version
# build 39 459 Cumulus build no
# rmaxgust 40 1.6 Recent Max Gust
# heatindex 41 76.2 Heat Index
# humidex 42 24.9 Humidex Index
# uvindex 44 13.0 UV Index
# evapration 45 0.2 Evapotranspiration
# solarrad 46 14 SolarRadiation
You do not have the required permissions to view the files attached to this post.

Post Reply