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 4019) - 03 April 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Annual Data Summary - Problem!
-
- Posts: 44
- Joined: Sat 07 Nov 2009 3:43 pm
- Weather Station: WP1400
- Operating System: XP SP3
- Location: Tønsberg, Norway
- Contact:
Annual Data Summary - Problem!
Hi
Trying to get Annual Data Summary to work, but as you see I have not got it right: grottem.com/ver/data/datasummary.php
Have tried both versions (php / html) - but none of them will display the data. Have followed the instructions and changed readayfile.js / php as instructed.
Have been in contact with mcrossley, but he is busy all week so he can't help me. He said that the Annual Summary page is downloading the dayfile.txt OK, so there is some other problem. The script is not producing any errors either.
Any suggestions?
Trying to get Annual Data Summary to work, but as you see I have not got it right: grottem.com/ver/data/datasummary.php
Have tried both versions (php / html) - but none of them will display the data. Have followed the instructions and changed readayfile.js / php as instructed.
Have been in contact with mcrossley, but he is busy all week so he can't help me. He said that the Annual Summary page is downloading the dayfile.txt OK, so there is some other problem. The script is not producing any errors either.
Any suggestions?
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Annual Data Summary - Problem!
In readDayfile.php you have to change this part of code
And verify the dayfile.txt path
to$field_delimiter = ',';
$date_delimiter = '/';
Hope it helps$field_delimiter = ';';
$date_delimiter = '.';
And verify the dayfile.txt path
$dayfile='dayfile.txt';
-
- Posts: 44
- Joined: Sat 07 Nov 2009 3:43 pm
- Weather Station: WP1400
- Operating System: XP SP3
- Location: Tønsberg, Norway
- Contact:
Re: Annual Data Summary - Problem!
Thanks for your reply laulau!!
Have changed lines 28 and 30 in readDayfile.php as you suggested, but no data appears.
Have changed lines 28 and 30 in readDayfile.php as you suggested, but no data appears.
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Annual Data Summary - Problem!
Did you check the dayfile.txt path in line 15
$dayfile='dayfile.txt';
-
- Posts: 44
- Joined: Sat 07 Nov 2009 3:43 pm
- Weather Station: WP1400
- Operating System: XP SP3
- Location: Tønsberg, Norway
- Contact:
Re: Annual Data Summary - Problem!
I corrected readDayfile.js with your suggestion, and now I get data out on grottem.com/ver/data/datasummary.html !!
Thanks for your help laulau!!
Then I just have to figure out how to mark max and min?
Thanks again!!!!
Thanks for your help laulau!!
Then I just have to figure out how to mark max and min?
Thanks again!!!!
- laulau
- Posts: 678
- Joined: Tue 13 Oct 2009 10:52 pm
- Weather Station: WeatherDuino Pro2
- Operating System: Win 7
- Location: Meyenheim, Alsace, FR
- Contact:
Re: Annual Data Summary - Problem!
Happy to hear that's working now
But what do you mean by
But what do you mean by
Then I just have to figure out how to mark max and min?
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: Annual Data Summary - Problem!
If you mean you want max and min to look different, try different background colours. See https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=6640for possible look.
If that is what you want, then I can post relevant code extract.
If that is what you want, then I can post relevant code extract.
-
- Posts: 44
- Joined: Sat 07 Nov 2009 3:43 pm
- Weather Station: WP1400
- Operating System: XP SP3
- Location: Tønsberg, Norway
- Contact:
Re: Annual Data Summary - Problem!
Hello "sfws"
Yes, it was something like that I was thinking of!
Yes, it was something like that I was thinking of!
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: Annual Data Summary - Problem!
you are using the jQuery/JavaScript version so:
Maybe you want a different look for days without any values
and days with values
and negative values (modify existing code for zero values by changing = to <=)
Note b_green is a new class, not in original CSS, sets up a different background for 2nd figure of a day if you are displaying say minimum and maximum
Finally, for changing colours at particular values, I don't know what you want. As some hints to help you, one option on my implementation is to display total rainfall (as per original) but to also display in second column the rainfall rate and this is coloured as per rate descriptions listed in Wiki with a colour key appearing in the caption. is relevant amended line in array declaration
is amended line in switch coding (adds rainfall rate as second figure and adds colour key to caption)
is code that varies text colour for the different rates
Maybe you want a different look for days without any values
Code: Select all
tablelayout+='<td class="nondate" datarow="#tr'+d+'" datacol="#tc'+m+'" id="'+d+'-'+mname[m-1]+'">'; // data_cell created as a nondate class for days beyond end of month in short months and days without any data
Code: Select all
if (!isNaN(wd_data[dayfilecol])){$(data_cell).removeClass('nondate');$(data_cell).addClass('datacell'); // added to change look of cells with numbers
}
Code: Select all
if( (parseFloat( wd_data[dayfilecol].split(',').join('.') )<=0) ){$(data_cell).addClass('zerovalue');} // amended to change look of negative values in main column
if(dayfilecol2>0){
if (!isNaN(wd_data[dayfilecol2])){
$(data_cell+'-2').removeClass('nondate');$(data_cell+'-2').addClass('b_green'); // amended to change look of cells in second column with numbers
if( (parseFloat( wd_data[dayfilecol2].split(',').join('.') )<=0) ){$(data_cell+'-2').addClass('zerovalue');} // added to change look of zero and negative values in any second column
Finally, for changing colours at particular values, I don't know what you want. As some hints to help you, one option on my implementation is to display total rainfall (as per original) but to also display in second column the rainfall rate and this is coloured as per rate descriptions listed in Wiki with a colour key appearing in the caption.
Code: Select all
['rain', 'Rainfall', 'Daily Rainfall - Totals (mm) and (coloured fainter figures) Maximum Rate (mm/hr)', true],
Code: Select all
case'rain': tablelayout+=label_items[9][2]+' <img src="IMAGE_DIRECTORY/rainfall_key.png" alt="Horizontal bar with sections in various colours">';dayfilecol=14;dayfilecol2=12;break;
Code: Select all
if(dayfilecol2==12){ // added to change colour of numbers for rainfall rate
if((parseFloat(wd_data[dayfilecol2].split(',').join('.')))<0.5) {
$(data_cell+'-2').css('color',"rgba(0,38,255,0.8)");}
else if ((parseFloat(wd_data[dayfilecol2].split(',').join('.')))<1) {
$(data_cell+'-2').css('color', "rgba(0,85,255,0.8)");}
else if ((parseFloat(wd_data[dayfilecol2].split(',').join('.')))<2) {
$(data_cell+'-2').css('color',"rgba(127,116,28,0.8)");}
else if ((parseFloat(wd_data[dayfilecol2].split(',').join('.')))<4) {
$(data_cell+'-2').css('color',"rgba(255,85,0,0.8)");}
else if ((parseFloat(wd_data[dayfilecol2].split(',').join('.')))<8) {
$(data_cell+'-2').css('color',"rgba(255,106,0,0.8)");}
else if ((parseFloat(wd_data[dayfilecol2].split(',').join('.')))<16) {
$(data_cell+'-2').css('color',"rgba(255,0,0,0.8)");}
else if ((parseFloat(wd_data[dayfilecol2].split(',').join('.')))<32) {
$(data_cell+'-2').css('color',"rgba(255,0,220,0.8)");}
else {$(data_cell+'-2').css('color',"rgba(198,255,255,0.8)");}
}
-
- Posts: 44
- Joined: Sat 07 Nov 2009 3:43 pm
- Weather Station: WP1400
- Operating System: XP SP3
- Location: Tønsberg, Norway
- Contact:
Re: Annual Data Summary - Problem!
Hello, and thanks for quick reply!
Now I have something to do since I'm not so familiar with programing!
I'm using Javascript since I cant't get php to work (grottem.com/ver/data/datasummary.php).
Have been cheking the forum for answers - and tried everything
Thank's anyway for your help!!!
Now I have something to do since I'm not so familiar with programing!
I'm using Javascript since I cant't get php to work (grottem.com/ver/data/datasummary.php).
Have been cheking the forum for answers - and tried everything
Thank's anyway for your help!!!