Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed Jun 19, 2013 11:41 pm
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  [ 253 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15 ... 17  Next
Author Message
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Wed Jun 10, 2009 10:08 am 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
try this (attachement)
drop it in the same folder with the others


You do not have the required permissions to view the files attached to this post.

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Wed Jun 10, 2009 10:21 am 
Offline
User avatar

Joined: Thu Dec 04, 2008 12:15 am
Posts: 298
Location: Tortosa-Baix Ebre- Catalonia
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
pinto wrote:
try this (attachement)
drop it in the same folder with the others



A lot of thanks

_________________
Weather in Tortosa (NE Spain), updated every 15'
Image Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Wed Jun 10, 2009 10:31 am 
Offline
User avatar

Joined: Thu Dec 04, 2008 12:15 am
Posts: 298
Location: Tortosa-Baix Ebre- Catalonia
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
:roll: :roll:
Image

_________________
Weather in Tortosa (NE Spain), updated every 15'
Image Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Wed Jun 10, 2009 1:33 pm 
Offline

Joined: Sat Oct 11, 2008 3:20 pm
Posts: 111
Weather Station: Davis Vantage Pro 2 Plus
Operating System: Windows XP SP3
sorry, it was a long time ago.

replace the array in GraphSettings.php with the folowing array

Code:
// Current field names (matches tag fields) used
$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","solar");

_________________
Jozef


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Wed Jun 10, 2009 9:33 pm 
Offline
User avatar

Joined: Thu Dec 04, 2008 12:15 am
Posts: 298
Location: Tortosa-Baix Ebre- Catalonia
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows XP SP3
pinto wrote:
sorry, it was a long time ago.

replace the array in GraphSettings.php with the folowing array

Code:
// Current field names (matches tag fields) used
$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","solar");

:D :D :D :D :D
Image

A lot of thanks pinto

_________________
Weather in Tortosa (NE Spain), updated every 15'
Image Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Fri Jan 08, 2010 7:37 pm 
Offline

Joined: Sun Dec 27, 2009 5:38 am
Posts: 12
Location: Repentigny
Weather Station: Vantage Pro2
Operating System: Win XP SP3
Paul C wrote:
I wonder if some of the expert can advise me regards the look of the wind graph.

Image

Can you confirm that the red line is the Gust ? and the shaded area is the average ?

I get the impression sometimes that is doesnt look right, maybe its the way its being recorded. I was thinking that the red line spikes should always be higher than the shaded area. I also had a Gust of 42.6knots at 1307hrs but this isnt recorded at all ?
any suggestions or thoughts
tks

I had the same situation here when i started to play with the code to get the graph i needed. Currently the original package is using ''wgust'' to plot the wind gust - that way you will mostly (or very often) endup with the gust being slower than the average wind. That is kind of very confusing when you look at the graph.

I decided to use the rmaxgust (recent max gust) instead of windgust and i'm getting a graph that is alot closer to reality and i'm sure i'm always picking up the strongest gust from the last 10 minutes interval (i added that functionnality for the 24hrs graphs). I'm not done yet with that graph but here's a view so far. I'm not sure how the rmaxgust is set lower (what logic or time period...), i might have to tweek it down the road, but for now it does the job.

Image

I need to translate the NWES from the compass to the right (W should be O in french), anybody know where it is in the package (jpgraph) ?

_________________
Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Fri Jan 08, 2010 7:45 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17835
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
The VP2 doesn't actually supply a 'gust' in the sense that most people expect - a 'peak' value. It supplies a short-term wind speed over the previous three seconds, and a 10-minute average. So some of the time the 'short term' value will be below the average and some of the time above. This is why I introduced the 'recent max gust' to give the peak short-term speed in the last 10 minutes.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Fri Jan 08, 2010 8:21 pm 
Offline

Joined: Sun Dec 27, 2009 5:38 am
Posts: 12
Location: Repentigny
Weather Station: Vantage Pro2
Operating System: Win XP SP3
And that was a very good addition. Now that you make me think about the banner, i also changed it the same way :D .

I'm working to have all that working on my pc instead of the server - running Php on the PC side. So the only download to the server would be some png .

Any chance to have the monthly archived data with the same level of detail or format has the realtime.txt file (every 10 minutes). That would suppress the need to run the realtimelog.php and would take care of the monthly cutover as it is already implemented in the archive. At the same time, this would prevent the lost of data if cumulus is stopped or the server goes down.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Fri Jan 08, 2010 8:30 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17835
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
regg001 wrote:
Any chance to have the monthly archived data with the same level of detail or format has the realtime.txt file (every 10 minutes).

It couldn't be the same format; firstly, I don't want to change the layout of the existing items, and secondly, some of the items in realtime.txt don't really make sense in the context of the monthly log file.

But anyway, disregarding all that, I fully accept that the current log files are rather deficient, and this is one of the things I'm addressing in Cumulus 2. I don't have any plans (at this moment) to add anything else to the C1 log files. But plans do change...

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Fri Jan 08, 2010 8:47 pm 
Offline

Joined: Sun Dec 27, 2009 5:38 am
Posts: 12
Location: Repentigny
Weather Station: Vantage Pro2
Operating System: Win XP SP3
regg001 wrote:
I need to translate the NWES from the compass (W should be O in french), anybody know where it is in the package (jpgraph) ?


Please do not respond (or laught at me) :oops: It's right there in the GraphSettings.php . Boy sometimes we search very far for something so obvious.
:lol:

_________________
Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Fri Jan 08, 2010 11:42 pm 
Offline

Joined: Sun Dec 27, 2009 5:38 am
Posts: 12
Location: Repentigny
Weather Station: Vantage Pro2
Operating System: Win XP SP3
i0i wrote:
Hello. Been collecting data for my jpgraphs since recieiving a weather station for Christmas :-)
Now got 4 months worth and want to see all of it in one graph. Would really appreciate some ideas, I work by reverse engineering these scripts and as a result have trouble getting them to do new things.

I want the temp365 graph to draw a 365 data point x axis and gradually fill it during the year, rather than draw an x axis with 4 months of data and increase it in size each day.


I tried your code and each and every record are plotted - there's no selection to them so they got all selected and plotted. Do you mean you want to have one single record per day containing the min and max temperature per day.

So you'll need to get the last record of each day containing the tempTH and tempTL (highest and lowest temp of that day). That way, you'll plot one bar per day containing the high/low temps. Is that what you want to acheive ?

_________________
Image


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Sun Jan 10, 2010 2:03 am 
Offline

Joined: Sun Dec 06, 2009 2:26 pm
Posts: 48
Weather Station: lacrosse ws2350
Operating System: Windows 7 x64
Hello I would like to use those graphs to show graphs for data of the last 24h.

As i read in the description you have to send regularly realtime.txt to enable the logging. The problem is I don't have the PC always on so when I re-open the PC and open the website what will I found? Graphs completely flat (I mean same data for as long as the realtime.txt was not updated) ?
What I wanted is to "turn-off" the logging while the pc is closed and than continue when it's re-open. The problem would always be that previous missing data would not be recovered in any way so the user won't see a tendency for the last 24h :cry: . The only way is to let the graphs work on the monthlog.txt file from Cumulus. I didn't look at the script but I guess it could be done, the only problem is that I won't have to upload a less-than-1kb file but a really heavy file every minute, which is not that fascinating.


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Sun Jan 10, 2010 3:47 am 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
The graphs are designed to work the way there are because I could not come up with a reasonable way of transferring the data any other way.

In order to chart 24 hours worth of data, you have to have the 24 hours worth of data to work from. With your PC off for long periods of time, you would have to somehow catch up the data on the website so that the graphs could work.

Otherwise you have to do something on the PC side... which i can't really help you with.

I saw something about Cumulus being able to change the graph period of time, but I don't know if that would help much if your PC is offline for extended periods of time. The website would still be out of date parts of the day.

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Sun Jan 10, 2010 9:32 am 
Offline

Joined: Sun Dec 27, 2009 5:38 am
Posts: 12
Location: Repentigny
Weather Station: Vantage Pro2
Operating System: Win XP SP3
regg001 wrote:
i0i wrote:
Hello. Been collecting data for my jpgraphs since recieiving a weather station for Christmas :-)
Now got 4 months worth and want to see all of it in one graph. Would really appreciate some ideas, I work by reverse engineering these scripts and as a result have trouble getting them to do new things.

I want the temp365 graph to draw a 365 data point x axis and gradually fill it during the year, rather than draw an x axis with 4 months of data and increase it in size each day.


I tried your code and each and every record are plotted - there's no selection to them so they got all selected and plotted. Do you mean you want to have one single record per day containing the min and max temperature per day.

So you'll need to get the last record of each day containing the tempTH and tempTL (highest and lowest temp of that day). That way, you'll plot one bar per day containing the high/low temps. Is that what you want to acheive ?


Here's what i've been able to pull from the data with a different PHp receipe to select the available data . Currently it's only showing January's data, but by changing the xaxis value to (0,365), a year of data can be plotted - dough you'll probably get a very large realtime.log file to process. Suggestion would be to split the realtime.log per months - preprocess the files for the completed months and add the partial (on going) month's data to the year graph.

Remember working with txt files, is sequential reading - not really cpu friendly even if PHp does help alot. If you have many people requesting the same year chart, your server will have to compute all the records of that year for each html pages loaded from all those peoples. Maybe the best solution is to have PHP on your pc, manage all the database locally and create PNG graph files that will be uploaded to your server. A lot less stress to your server. If you want to keep everything on the server, then have the php to create pngs on the server and use the pngs for your webpage. A simple Cron running your php code 2 times a day, will update the pngs. Again, less stress on your server.

It's not completed yet, but it shows the actual High/Low temps for the current january period.
Image

As i said in my previous message, the high/low of the day is already in the record so there's no need to search for them. So you have to find the last record of the day to pickup the values and plot them. That's what the following code is doing. It works because the current realtime.log file is already in the right order (sequential). Otherwise, you would have to sort the records prior to search for the right one. Other method can be used , but that one is working fine.

Big thanks to Hyrules who found the best way to make it.
Code:
foreach($rawdata as $key)
{
   
       $DATA = preg_split('/ +/', $key);
         
      while($oldesttime < ret_value("time"))
      {         
         $oldesttime = ret_value("time");
         
         $y1[] = ret_value("tempTH");
         $y2[] = ret_value("tempTL");
         $x[] =  ret_value("date");
         $y[] =  ret_value("time");
      }
      
      $oldesttime = ret_value("time");
      $got++;

}

$y1 = array_reverse($y1);
$y2 = array_reverse($y2);
$x = array_reverse($x);
$y = array_reverse($y);

_________________
Image


Last edited by regg001 on Sun Jan 10, 2010 6:49 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Cumulus Server Sided JpGraph Graphs
PostPosted: Sun Jan 10, 2010 4:22 pm 
Offline
User avatar

Joined: Wed Sep 17, 2008 1:34 pm
Posts: 629
Location: Mesa, AZ USA
Weather Station: Davis VP2 Plus w/24 FARS
Operating System: WinX Pro SP3 Dedicated wstn
With the upcoming ability to have Cumulus trigger a scheduler, a cached version of the charts will be available. This means that if you have a heavy visitor load, you can use the resulting static images on your pages rather than the php generated ones and only have the processing done at a specific interval.

For example, if you use the level 4 resolution 24 hour charts, they only really need to be generated once every 15 minutes rather than each time someone visits your page.

There are other changes coming including log rotation and ability to use previous months collected data for extended graphs, easier color modification etc..

_________________
Kevin
Image
All you need is Time, Aptitude and Desire ... and you can build just about anything...
Cumulus User Maps


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 253 posts ]  Go to page Previous  1 ... 9, 10, 11, 12, 13, 14, 15 ... 17  Next

All times are UTC


Who is online

Users browsing this forum: No registered users 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:  

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