Sandaysoft

Support forum for Cumulus weather station software
It is currently Fri May 24, 2013 11:36 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  [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 3:25 pm 
Offline
User avatar

Joined: Tue Dec 09, 2008 1:37 pm
Posts: 1851
Location: Dudley, West Midlands, UK
Weather Station: None !
Operating System: XP SP3
Slight change to Marks suggestion
Try ..
Code:
            // get the data element             
            if(wd_data[dayfilecol]) {
               $(data_cell).html(wd_data[dayfilecol]);
               if (dayfilecol2 >0) { $(data_cell+'-2').html(wd_data[dayfilecol2]); }
               if ((parseFloat(wd_data[dayfilecol].split(',').join('.')) == 0) && (dayfilecol ==14 || dayfilecol ==1)) { $(data_cell).addClass('zerovalue'); }
            if((parseFloat(wd_data[dayfilecol])>80)&&(dayfilecol==6)){$(data_cell).addClass('highvalue');}
                    if((parseFloat(wd_data[dayfilecol])>140)&&(dayfilecol==16)){$(data_cell).addClass('highvalue');}
                     if((parseFloat(wd_data[dayfilecol])<5)&&(dayfilecol==4)){$(data_cell).addClass('lowvalue');}
                  if((parseFloat(wd_data[dayfilecol])>30)&&(dayfilecol==1)){$(data_cell).addClass('highvalue');}
              } else {
                     $(data_cell).html('N/A');
            }

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


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 3:34 pm 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 351
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
beteljuice wrote:
Slight change to Marks suggestion
Try ..
Code:
            // get the data element             
            if(wd_data[dayfilecol]) {
               $(data_cell).html(wd_data[dayfilecol]);
               if (dayfilecol2 >0) { $(data_cell+'-2').html(wd_data[dayfilecol2]); }
               if ((parseFloat(wd_data[dayfilecol].split(',').join('.')) == 0) && (dayfilecol ==14 || dayfilecol ==1)) { $(data_cell).addClass('zerovalue'); }
            if((parseFloat(wd_data[dayfilecol])>80)&&(dayfilecol==6)){$(data_cell).addClass('highvalue');}
                    if((parseFloat(wd_data[dayfilecol])>140)&&(dayfilecol==16)){$(data_cell).addClass('highvalue');}
                     if((parseFloat(wd_data[dayfilecol])<5)&&(dayfilecol==4)){$(data_cell).addClass('lowvalue');}
                  if((parseFloat(wd_data[dayfilecol])>30)&&(dayfilecol==1)){$(data_cell).addClass('highvalue');}
              } else {
                     $(data_cell).html('N/A');
            }


Using this code makes ALL data disappear...

Thanks though

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 4:20 pm 
Online
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2521
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
I amended my code a little (see original post on prevoius page), and it works fine (temp page on my site... http://weather.wilmslowastro.com/datasummary.htm)

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 4:28 pm 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 351
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
mcrossley wrote:
I amended my code a little (see original post on prevoius page), and it works fine (temp page on my site... http://weather.wilmslowastro.com/datasummary.htm)


Thank you so much, Mark. :clap: :clap:

Now if I can get the degree #s to convert to letters....IE: NW,SSW..etc

Again thanks to all who have had input on this..

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Fri Oct 28, 2011 5:20 pm 
Offline

Joined: Wed Feb 25, 2009 12:01 am
Posts: 351
Location: Woodland Park, Colorado USA
Weather Station: Zephyr PWS-1000TB(Fine/Offset)
Operating System: Windows 7 64bit
Got it all working now with Marks code.

Thank you! :clap:

_________________
Bob

http://woodlandweather.org/


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Sun Jan 01, 2012 1:07 pm 
Offline

Joined: Sat Dec 17, 2011 11:55 am
Posts: 139
Location: Wareham, Dorset
Weather Station: Davis Vantage Vue
Operating System: Windows 7 x64
Hi, i'm a bit new to this side of things. But i had it working yesterday .. dayfile.txt uploaded etc ..
But since it's turned 2012, there's now no data in the 2011 drop down at all, and how do i get 2012's data? I don't see any data in Cumulus apart from Jan12log.txt.

Regards.


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Sun Jan 01, 2012 1:42 pm 
Online
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2521
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Take a look at this, I suspect it will fix it for you...
viewtopic.php?f=14&t=6640

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Sun Jan 01, 2012 2:14 pm 
Offline

Joined: Sat Dec 17, 2011 11:55 am
Posts: 139
Location: Wareham, Dorset
Weather Station: Davis Vantage Vue
Operating System: Windows 7 x64
mcrossley wrote:
Take a look at this, I suspect it will fix it for you...
viewtopic.php?f=14&t=6640


Ok, thank you.
Just a few questions .. Do i have to upload the dayfile.txt manually everyday?
And does the information getting added to the dayfile.txt, get added at the end of the following day? As i don't have anything for 1/1/12 yet, ie; it's only 14:12 in the afternoon :lol:

PS: I added a false line of info to the dayfile.txt on my server, for 1/1/12 and it shows both 2011 and 2012 with data, but if i remove the line, i have empty fields for 2011.

Regards.


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Sun Jan 01, 2012 4:22 pm 
Online
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2521
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Mapantz wrote:
Just a few questions .. Do i have to upload the dayfile.txt manually everyday?
No, get Cumulus or Cumulus Toolbox to do it for you ;) There is an option to add a 'daily' command in Cumulus where you can add a FTP batch script. Or Toolbox can do the FTP directly for at a set time each day.
Mapantz wrote:
And does the information getting added to the dayfile.txt, get added at the end of the following day? As i don't have anything for 1/1/12 yet, ie; it's only 14:12 in the afternoon :lol:
Correct it is a summary of the days data, so is meaningless until the day is done.
Mapantz wrote:
PS: I added a false line of info to the dayfile.txt on my server, for 1/1/12 and it shows both 2011 and 2012 with data, but if i remove the line, i have empty fields for 2011.
Bad idea, delete the file and let Cumulus create it when it needs it.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Sun Jan 01, 2012 4:33 pm 
Offline

Joined: Sat Dec 17, 2011 11:55 am
Posts: 139
Location: Wareham, Dorset
Weather Station: Davis Vantage Vue
Operating System: Windows 7 x64
Ok, i've kinda got the jist of it all now.

Still a bit confused as to why i can see data on my datasummary.php but not my datasummary.html though.

http://www.wareham-weather.co.uk/datasummary.php
http://www.wareham-weather.co.uk/datasummary.html

I made a copy as a text so it can be looked at.

http://www.wareham-weather.co.uk/readDayfile.txt
http://www.wareham-weather.co.uk/readDayfile.js

Regards, and thank you for the help.


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Sun Jan 01, 2012 4:49 pm 
Online
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2521
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Because you have applied a fix to the PHP script to account for displaying the previous years data on the 1st January but not the javascript.
Code:
if (urlParams['year']) {
  drawYear=urlParams['year'];
} else {
  var d = new Date();
  var curr_date = d.getDate();
  drawYear=d.getFullYear();
}

becomes
Code:
if (urlParams['year']) {
  drawYear=urlParams['year'];
} else {
  var d = new Date();
  var curr_date = d.getDate();
  d.setDate(d.getDate() - 1);
  drawYear=d.getFullYear();
}

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Jan 03, 2012 9:05 pm 
Offline

Joined: Mon Mar 23, 2009 2:50 pm
Posts: 72
Location: Skegness
Weather Station: WH3080
Operating System: Win XP SP3
Might be having a blonde moment but where can i get this script from ? cheers

_________________
Image
Image
Skegness PWS Data
Skegness Wunderground


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Tue Jan 03, 2012 9:58 pm 
Online
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2521
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
In the wiki

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jan 04, 2012 3:02 am 
Offline
User avatar

Joined: Mon Apr 05, 2010 10:40 pm
Posts: 218
Location: Cabimas, Zulia, Venezuela
Weather Station: WX-200 / WS-2310
Operating System: Win XP Professional
mcrossley wrote:
In the wiki


http://wiki.sandaysoft.com/a/AnnualDataSummary

I hope the wiki have the last and stable version. :shock:

_________________
Marco-Luis
YV1HX
Cabimas, Zulia, Venezuela
http://www.twitter.com/meteoven


Top
 Profile  
 
 Post subject: Re: Yearly Data Summary--Adding new fields
PostPosted: Wed Jan 04, 2012 9:50 am 
Online
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2521
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
yv1hx wrote:
I hope the wiki have the last and stable version. :shock:

I doubt it, it says it is version 1.1 from March 2011. As David is taking a bit of a break from the forum any volunteers for updating it with some of the 'patches' - but please do not add loads of value colouring, leave that as an exercise for the user. ;)

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3, 4, 5  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