Welcome to the Cumulus Support forum.
Latest Cumulus MX release 3.27.1 (build 3263) - 21 November 2023
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
Latest Cumulus MX release 3.27.1 (build 3263) - 21 November 2023
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
Yet Another Dayfile Reader (PHP)
Moderator: daj
- 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)
Don't I remember that there is a 'repair' facility, or is that for one of the other files ?
......................Imagine, what you will KNOW tomorrow !
- 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)
OK - another fix that may or may not work !
Can someone with a dodgy group of wind readings please tell me what happens with the averages.
Plus the beteljuice has relented and given wind speeds (but not wind run) 1 decimal place.
Plus mouseovers on year averages work they way they should have done - but I was being lazy
Can someone with a dodgy group of wind readings please tell me what happens with the averages.
Plus the beteljuice has relented and given wind speeds (but not wind run) 1 decimal place.
Plus mouseovers on year averages work they way they should have done - but I was being lazy

......................Imagine, what you will KNOW tomorrow !
-
- Posts: 3036
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Worked OK for me once I fixed this code error in line 478.
Believe
should be
Believe
Code: Select all
$wind_dec = ($dataSet == 'windrun' ? 0, 1);
Code: Select all
$wind_dec = ($dataSet == 'windrun' ? 0 : 1);
- 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)

......................Imagine, what you will KNOW tomorrow !
-
- Posts: 74
- Joined: Mon 23 Aug 2010 5:04 pm
- Weather Station: Davis Vantage Pro 2
- Operating System: Windows XP
- Location: Cornwall, England
- Contact:
Re: Yet Another Dayfile Reader (PHP)
The average for Oct 2013, for wind speed, is the same as before the fix, 3.0. It has summed all 31 values including 17 zeroes and divided by 31.
See http://poundstockpacket.org.uk/weather/basic.php
Pity about the decimal place!
Incidentally, I also have had similar problems with temperature when my Davis sensor failed in July 2012. I wanted to store null but couldn't. In the end I cheated and calculated some averages values and recorded them - don't tell the Met Office!
However it is something that I need to think about. Maybe Mark's solution of a database that can be edited is the best solution. But then what about the NOAA reports?
See http://poundstockpacket.org.uk/weather/basic.php
Pity about the decimal place!
Incidentally, I also have had similar problems with temperature when my Davis sensor failed in July 2012. I wanted to store null but couldn't. In the end I cheated and calculated some averages values and recorded them - don't tell the Met Office!
However it is something that I need to think about. Maybe Mark's solution of a database that can be edited is the best solution. But then what about the NOAA reports?
- 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)
As things stand, I'm afraid you would have to 'nullify' (,,) those entries in the dayfile in order for those averages to be correct.
......................Imagine, what you will KNOW tomorrow !
- steve
- Cumulus Author
- Posts: 26702
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Yet Another Dayfile Reader (PHP)
The editor can create missing entries in dayfile.txt from the monthly logs; it would never create null items.beteljuice wrote:Don't I remember that there is a 'repair' facility, or is that for one of the other files ?
The solution to null items in Cumulus itself isn't easy (and I see that certain other popular software avoids the issue also, so I'm certainly not going to beat myself up over this). I wanted the CSV logs to be able to be used directly in spreadsheets or other software packages for analysis and graph plotting etc, and there is no standard for 'null' values using normal numbering which would be understood by all software.
Internally, a database would be the best way to go, as those have proper support for nulls. You still have the issue of what to do if you want to export some data to use in a spreadsheet...
Steve
-
- Posts: 74
- Joined: Mon 23 Aug 2010 5:04 pm
- Weather Station: Davis Vantage Pro 2
- Operating System: Windows XP
- Location: Cornwall, England
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Beteljuice
Null values
I have manually 'nullified' some of my missing wind speed & wind run values for Oct 2013.
The zeroes are now shown as blanks and the monthly average is calculated only of the real values.
There is an asterisk shown against the average to show that the data is in-complete.
See http://poundstockpacket.org.uk/weather/basic.php, 2013, October.
So the logic and program is a 'proper job' as we say in Cornwall, thanks.
The only problem now is to find a way to make the 'missing values' in Dayfile.txt always null!
UV values
I have been trying to stop the UV button displaying, I changed true to false in the $label_items array:
This stops the UV button from displaying initially but when I change year the button returns. Is that something to do with the cookies or am I missing something?
Null values
I have manually 'nullified' some of my missing wind speed & wind run values for Oct 2013.
The zeroes are now shown as blanks and the monthly average is calculated only of the real values.
There is an asterisk shown against the average to show that the data is in-complete.
See http://poundstockpacket.org.uk/weather/basic.php, 2013, October.
So the logic and program is a 'proper job' as we say in Cornwall, thanks.
The only problem now is to find a way to make the 'missing values' in Dayfile.txt always null!
UV values
I have been trying to stop the UV button displaying, I changed true to false in the $label_items array:
Code: Select all
'HighUV' => array($translit[$lang]['HighUV'][0], $translit[$lang]['HighUV'][1], false, 44, null, 'ah')
- 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)
@ Graham64
Thanks for confirming behavour of 'null'
RE. UV button - I like that ! It happens on ALL kinds of subsequent calls.
Have you got more than one version of betel_readDayfile ?
Edit:
In order for the 'Ajax' calls to work the file MUST be called betel_readDayfile.php unless you also change the name in the JavaScript function doesforme()
No longer applicable
@ ALL
Experimented with shoehorning into 750px width (and a few other tweaks) Edit: old link removed
Thoughts please, this is probably going to be 'beta' release.
Thanks for confirming behavour of 'null'
RE. UV button - I like that ! It happens on ALL kinds of subsequent calls.
Have you got more than one version of betel_readDayfile ?
Edit:
In order for the 'Ajax' calls to work the file MUST be called betel_readDayfile.php unless you also change the name in the JavaScript function doesforme()
No longer applicable
@ ALL
Experimented with shoehorning into 750px width (and a few other tweaks) Edit: old link removed
Thoughts please, this is probably going to be 'beta' release.
Last edited by beteljuice on Wed 11 Jun 2014 3:01 pm, edited 3 times in total.
......................Imagine, what you will KNOW tomorrow !
- jdc
- Posts: 142
- Joined: Tue 19 Jun 2012 8:51 pm
- Weather Station: Davis VP2 : Instromet
- Operating System: Win 10
- Location: Portsoy,.
- Contact:
Re: Yet Another Dayfile Reader (PHP)
The only thing I can find is Sunshine isn't totalling on Daily page. Rain, windrun etc is OK.
I've added another series but not getting totals/avg/hi, but that is most likely my lack of php knowledge.
I've added another series but not getting totals/avg/hi, but that is most likely my lack of php knowledge.
- 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)
You're not wrong, I must have 'lost' it with one of the many tweaks - I'll investigate later.jdc wrote:The only thing I can find is Sunshine isn't totalling on Daily page.
'Normal' stuff has the 'flags' set in the $labels_list ( 'a' AND/OR 's' AND/OR 'h' AND/OR 'l' OR null - display (a)verage and / or (s)um, (h)i, (l)o for month(s)), and the routines work with the 'native' values.I've added another series but not getting totals/avg/hi, but that is most likely my lack of php knowledge.
......................Imagine, what you will KNOW tomorrow !
- 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)
Was an incomplete 'tweak' - Total Sunshine hours will be fixed in next release.
......................Imagine, what you will KNOW tomorrow !
- jdc
- Posts: 142
- Joined: Tue 19 Jun 2012 8:51 pm
- Weather Station: Davis VP2 : Instromet
- Operating System: Win 10
- Location: Portsoy,.
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Got Evapotranspiration sorted using your latest release, above, with 'rainfall' settings (and in 550px container
) here.
Thankyou.

Thankyou.
- 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)
Still too tight I'm afraid John ...
The whammies are baro hPa, especially if there is an * in front
But at that scale you might get away with it, without it being too much of a wobble.
The whammies are baro hPa, especially if there is an * in front
But at that scale you might get away with it, without it being too much of a wobble.
......................Imagine, what you will KNOW tomorrow !
- 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)
Beta release now Out
but there will no doubt be things to change !
To those who have graciously translated, there are a few more options now I'm afraid
but there will no doubt be things to change !
To those who have graciously translated, there are a few more options now I'm afraid

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