Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

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 drop-down menus to 2030)

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

Yearly Data Summary--Adding new fields

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

I am using dayfile col #39 for the dominate wind direction but it does not display any data. When I insert another data field # in the javascript it will show that data. Is field #39 the correct one for dominate wind bearing?
I'm not sure, but I think it's complaining because at the start of the year that (and several other) values did not exist.[/quote]

So no values will show until Jan 2012?
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by mcrossley »

from when you started using the build of Cumulus 1.9.2 that added this data to the dayfile
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

mcrossley wrote:from when you started using the build of Cumulus 1.9.2 that added this data to the dayfile
I am using 1.9.2 build 1017. The numeric # is in the dayfile at the website, but this script will not display it. any ideas?
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by mcrossley »

I haven't studied the JavaScript in any detail, but it does not seem to check for missing values at all.

I'd try changing line 134..141 from

Code: Select all

                // get the data element             
                $(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');}
to

Code: Select all

				// get the data element             
				if(wd_data.length > 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');}
				}
Last edited by mcrossley on Fri 28 Oct 2011 2:44 pm, edited 1 time in total.
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

Tried your idea. No change. All data is displayed EXCEPT Dominate Wind Direction,the page has no data entries.

Perplexing.....
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: Yearly Data Summary--Adding new fields

Post by beteljuice »

Slight change to Marks suggestion
Try ..

Code: Select all

				// 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 !
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

beteljuice wrote:Slight change to Marks suggestion
Try ..

Code: Select all

				// 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
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by mcrossley »

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)
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

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..
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

Got it all working now with Marks code.

Thank you! :clap:
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by Mapantz »

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.
Image
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by mcrossley »

Take a look at this, I suspect it will fix it for you...
https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=6640
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by Mapantz »

mcrossley wrote:Take a look at this, I suspect it will fix it for you...
https://cumulus.hosiene.co.uk/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.
Image
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by mcrossley »

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.
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by Mapantz »

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