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
Yet Another Dayfile Reader (PHP)
Moderator: daj
- PaulMy
- Posts: 3830
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Yet Another Dayfile Reader (PHP)
This script has been working well but just found it getting an error: http://komokaweather.com/komokaweather- ... ummary.php
Warning: array_key_exists() expects parameter 2 to be array, null given in /home/content/96/5379896/html/weather/betel_readDayfile.php on line 809
I don't recognize what the problem might be at line 809 - this is the code from lines 803 to 815:
if($thisValue || $thisValue == 0){
if($dataSet != 'winddir') $alltime[$m][] = $thisValue;
formatOP();
$short = (count($turd) < cal_days_in_month(CAL_GREGORIAN, $m, $type_year[$d]) ? "* " : "");
if(count($turd) < cal_days_in_month(CAL_GREGORIAN, $m, $type_year[$d])) $shortMon[$d][$m] = true ;
$tablelayout .= " class=\"datacell2\"".$part2.">".($dataSet != 'HoursSun' ? $short : '').$thisValue."</td>";
}else {
$tablelayout .= ' class="nondate"> </td>';
}
}else{
$tablelayout .= ' class="nondate"> </td>';
}
} // END month walk
I have not made any changes to this script. Any suggestions what I could try?
Paul
Warning: array_key_exists() expects parameter 2 to be array, null given in /home/content/96/5379896/html/weather/betel_readDayfile.php on line 809
I don't recognize what the problem might be at line 809 - this is the code from lines 803 to 815:
if($thisValue || $thisValue == 0){
if($dataSet != 'winddir') $alltime[$m][] = $thisValue;
formatOP();
$short = (count($turd) < cal_days_in_month(CAL_GREGORIAN, $m, $type_year[$d]) ? "* " : "");
if(count($turd) < cal_days_in_month(CAL_GREGORIAN, $m, $type_year[$d])) $shortMon[$d][$m] = true ;
$tablelayout .= " class=\"datacell2\"".$part2.">".($dataSet != 'HoursSun' ? $short : '').$thisValue."</td>";
}else {
$tablelayout .= ' class="nondate"> </td>';
}
}else{
$tablelayout .= ' class="nondate"> </td>';
}
} // END month walk
I have not made any changes to this script. Any suggestions what I could try?
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
- 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: Yet Another Dayfile Reader (PHP)
I thought we'd got rid of all those - I can't see anyone else with the problem ATM.
Does this apply : https://cumulus.hosiene.co.uk/viewtopic.p ... &start=173
Does this apply : https://cumulus.hosiene.co.uk/viewtopic.p ... &start=173
......................Imagine, what you will KNOW tomorrow !
- PaulMy
- Posts: 3830
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Thanks beteljuice,
I have scanned through that page and all the pages and nothing has caught my eye as yet, but will look again tomorrow after a good night's sleep. It seems that the message might have occurred from about the time of a recent change to my .htaccess but not certain.
Paul
I have scanned through that page and all the pages and nothing has caught my eye as yet, but will look again tomorrow after a good night's sleep. It seems that the message might have occurred from about the time of a recent change to my .htaccess but not certain.
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
- 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: Yet Another Dayfile Reader (PHP)
IF it's to do with changes to your .htaccessSince these are warnings only how about changingCode: Select all
error_reporting(E_ALL ^ E_NOTICE); // to error_reporting(0);
It could be that the 'global' error reporting level has changed, or in some cases the server has more than one version of PHP and you may have slipped back a version.
... but most likely it's just the error level ... perhaps ...
......................Imagine, what you will KNOW tomorrow !
- PaulMy
- Posts: 3830
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Thanks beteljuice. I had to rush away until this evening, and will then be at the computer to try that change. All the data displays seem to be working and ok.
Paul
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
- PaulMy
- Posts: 3830
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Have changed to error_reporting(0); and all is well again.
Thank you for the hint,
Paul
Thank you for the hint,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm
-
- Posts: 1255
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Mark,
recently upgraded to VP2 with a Solar sensor.
For some reason when the sunshine hours are 0.0 for the day, the data cell is blank instead of 0.0 When there are sunshine hours recorded, the data shows as expected.
Have had a look at the file(s) and tried a few things but not making any difference.
Any suggestions?
Thanks
recently upgraded to VP2 with a Solar sensor.
For some reason when the sunshine hours are 0.0 for the day, the data cell is blank instead of 0.0 When there are sunshine hours recorded, the data shows as expected.
Have had a look at the file(s) and tried a few things but not making any difference.
Any suggestions?
Thanks
- 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: Yet Another Dayfile Reader (PHP)
Code: Select all
// Cumulus provides 0 or 0.0 for missing or invalid data - this can make a nonsense of minimum and average values.
// The best thing to do is to edit your dayfile.txt and nullify (,,) any false data.
// However; depending upon your location, some datasets can reasonably be expected to be > 0 (remember these are daily values)
// These COULD include:
// ... 'windspd', 'windgust', 'windrun', 'HoursSun', 'Solar', 'HighUV', evt
$SANITIZE = true; // true OR false - attempt to ignore zero in the following datasets:
$zero_as_null = array('windspd', 'windgust', 'windrun', 'HoursSun', 'Solar', 'HighUV'); // datasets to 'fix' - EDIT TO SUIT
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 1255
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Tried that but I then get 0 instead of 0.0 and also all the table area that is normally blank (i.e. where there is no record data at all) is also filled with 0.
- 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: Yet Another Dayfile Reader (PHP)
The problem is that it will only properly display data since the addition of the sensor
I'm afraid for the 'historical' stuff you are going to have to edit your dayfile.txt
See also https://cumulus.hosiene.co.uk/viewtopic.p ... &start=283 about HighUV
I'm afraid for the 'historical' stuff you are going to have to edit your dayfile.txt
See also https://cumulus.hosiene.co.uk/viewtopic.p ... &start=283 about HighUV
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 1255
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Acknowledge the
I finally RTFM and have edited the historical EVT, Sunshine and Solar records in the dayfile.
Also removed sunHours from the sanitise section (evt was already removed).
However the sunshine was still showing 0 instead of 0.0 on days with no sun hours.
resolved that with the following change from this; to this;
Do you see any unintended repercussions with this approach?
Thanks
I finally RTFM and have edited the historical EVT, Sunshine and Solar records in the dayfile.
Also removed sunHours from the sanitise section (evt was already removed).
However the sunshine was still showing 0 instead of 0.0 on days with no sun hours.
resolved that with the following change from this;
Code: Select all
if ($dataSet == 'HoursSun'){ // based on code by Mark Crossley
$decimals = 1; // special case - not handled elsewhere
// 'width' is 24hr
$part2 .= '><div class="meterCont"><span class="meterBar" style="width:' . min(round($thisValue / 24 * 100), 100) . '%"></span>' .
'<span class="meterTxt">' . round($thisValue, $decimals) . '</span></div><b></b';
$native = $thisValue;
$thisValue = '';
}
Code: Select all
if ($dataSet == 'HoursSun'){ // based on code by Mark Crossley
// 'width' is 24hr
$part2 .= '><div class="meterCont"><span class="meterBar" style="width:' . min(round($thisValue / 24 * 100), 100) . '%"></span>' .
'<span class="meterTxt">' . $thisValue = number_format((float)$thisValue, 1, '.' , '') . '</span></div><b></b';
$native = $thisValue;
$thisValue = '';
}
Thanks
- 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: Yet Another Dayfile Reader (PHP)
It's been awhile, and the 'bar graph' is Marks, but as long as that displays alright I think you're safe ... but I've been wrong before
Last edited by beteljuice on Thu 18 Dec 2014 2:49 am, edited 1 time in total.
......................Imagine, what you will KNOW tomorrow !
-
- Posts: 1255
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Yet Another Dayfile Reader (PHP)
OK!
I'll keep an eye on it.
I'll keep an eye on it.
-
- Posts: 1255
- Joined: Mon 09 Jul 2012 8:40 pm
- Weather Station: Davis VP2 Cabled
- Operating System: Windows 10 Pro
- Location: Auckland, New Zealand
- Contact:
Re: Yet Another Dayfile Reader (PHP)
OK, adjustments referred to in recent posts seem to be OK but a new issue arose.
One day's solar was not appearing (a white area where the number and coloured background should have been). The number is the solar max from the Davis sensor as recorded by Cumulus in Watts/m2. The max value that a Davis system can output is 1800 and on this day it was 1536 (an elevated value - bright sun and lots of reflected energy from many small white clouds - not a steady value). This value is recorded in dayfile.txt.
I found the solution here; in betel_readDayfile.php by changing the 1500 to 1800.
One day's solar was not appearing (a white area where the number and coloured background should have been). The number is the solar max from the Davis sensor as recorded by Cumulus in Watts/m2. The max value that a Davis system can output is 1800 and on this day it was 1536 (an elevated value - bright sun and lots of reflected energy from many small white clouds - not a steady value). This value is recorded in dayfile.txt.
I found the solution here;
Code: Select all
// solar irradiance colours
$sunGrad0to10 = gradient('FFFF00','FF0000',1500); // value suggested by Graham64
-
- Posts: 24
- Joined: Tue 02 Dec 2014 9:04 pm
- Weather Station: Oregon WMR200
- Operating System: windows 7
- Location: Italia
Re: Yet Another Dayfile Reader (PHP)
Hello everyone, I downloaded the .zip file to the first post and I put all the files in a folder on my website / TABLE.
When I open the file basic.php tells me I can not find the file daytime.txt.
But I have to do this process by cumulus menu configuration / internet / file?
The file is in the folder daytime.txt Cumulus / data /
I am using the template of Sunset 'Weather By You'
thank you
When I open the file basic.php tells me I can not find the file daytime.txt.
But I have to do this process by cumulus menu configuration / internet / file?
The file is in the folder daytime.txt Cumulus / data /
I am using the template of Sunset 'Weather By You'
thank you