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
- 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: Yet Another Dayfile Reader (PHP)
This is what happens with the basic code:
Could you try with my dayfile ?
With my code modification i have no more Warning messages but you're right it affects the average value.Could you try with my dayfile ?
You do not have the required permissions to view the files attached to this post.
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Aha found it for windspeed / gust it seems the m/s and km/h are reverted (don't know about the knots and miles) The easiest way should be the change the descriptions I think, but I'm not sure if others have this problem too.
edit found it canged km/h over here to m/s 'wind' => (isset($SITE['uomWind']) ? substr($SITE['uomWind'], 1) : 'm/s'), dumbo me sorry for the inconvenience should read better
Windrun is broken now 
edit found it canged km/h over here to m/s 'wind' => (isset($SITE['uomWind']) ? substr($SITE['uomWind'], 1) : 'm/s'), dumbo me sorry for the inconvenience should read better


-
- Posts: 42
- Joined: Fri 23 Mar 2012 3:17 pm
- Weather Station: Davis VP2
- Operating System: Windows 7 x64 Pro
- Location: Vilppula, Finland
Re: Yet Another Dayfile Reader (PHP)
Yes, I changed same line same way yesterday and had same issue, windrun went broken.nitrx wrote:Aha found it for windspeed / gust it seems the m/s and km/h are reverted (don't know about the knots and miles) The easiest way should be the change the descriptions I think, but I'm not sure if others have this problem too.
edit found it canged km/h over here to m/s 'wind' => (isset($SITE['uomWind']) ? substr($SITE['uomWind'], 1) : 'm/s'), dumbo me sorry for the inconvenience should read betterWindrun is broken now
In Scandinavia we use m/s for wind speed.
- KarlS
- Posts: 134
- Joined: Tue 30 Nov 2010 3:01 pm
- Weather Station: Ecowitt GW1003 / WH32 / WH41
- Operating System: Buster Lite on Pi4
- Location: Bridge Lake, BC, Canada
- Contact:
Re: Yet Another Dayfile Reader (PHP)
I changed the CSS a bit to accommodate it to my page layout (cell width, background colors) and did some minor modifications to the script (no Sunshine hours, UV index) … and had it running within an hour. I plan to make some additional changes (add apparent temperature and/or windchill), so it is not yet selectable from my menu, but for now here it is.
Thank you Beteljuice et al. for this useful scrpt.

Thank you Beteljuice et al. for this useful scrpt.


- 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)
@ laulau - that link IS using YOUR dayfile !
Guys, It's all getting a bit grey.
Please can we determine what is working and what isn't - AND can you please check if your data is valid !
eg. a wind value of 0 is valid - if you didn't record a value it should be null eg. ,'';
Guys, It's all getting a bit grey.
Please can we determine what is working and what isn't - AND can you please check if your data is valid !
eg. a wind value of 0 is valid - if you didn't record a value it should be null eg. ,'';
......................Imagine, what you will KNOW tomorrow !
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Values are valid exept windrun isn't calculated I think this happens due my default windmeasures are in m/s and the windrun is in km by default.
Ron http://apeldoorn.tk/weer/basic.php
Ron http://apeldoorn.tk/weer/basic.php
- 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: Yet Another Dayfile Reader (PHP)
Your original code give me some warnings in "Wind Speed" before the data table
I suppose due to empty cells in dayfile for older data. --
These are my datas (2002->2014) But after i've clicked on "Temp Max"
The text button are in English and the datas are from someone else(oct 2008 to jan 2014) I Really don't understand what happens:o
I suppose due to empty cells in dayfile for older data. --
Ok when i go to the link http://beteljuice.co.uk/daytest/lau.phpbeteljuice wrote:@ laulau - that link IS using YOUR dayfile !
These are my datas (2002->2014) But after i've clicked on "Temp Max"
The text button are in English and the datas are from someone else(oct 2008 to jan 2014) I Really don't understand what happens:o

You do not have the required permissions to view the files attached to this post.
- PaulMy
- Posts: 3603
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2+ Cumulus1 / CummulusMX
- Operating System: Windows8 / Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Yet Another Dayfile Reader (PHP)
I think that is my data that I rented out to beteljuice when he was helping me a while ago.But after i've clicked on "Temp Max"
The text button are in English and the datas are from someone else(oct 2008 to jan 2014)
I hope you get it all worked out so that I can jump in as well.
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www .komokaweather.com/cumulusmxwll/index.htm
MX www.komokaweather.com/cumulusmx/index.php
MX www.komokaweather.com/cumulusmx/index.html

C1 www.komokaweather.com/komokaweather-ca
MX www .komokaweather.com/cumulusmxwll/index.htm
MX www.komokaweather.com/cumulusmx/index.php
MX www.komokaweather.com/cumulusmx/index.html
- 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)
@ Laurent
Sorry - I forgot to change something on line #1235
Subsequent calls should now properly refer to your data.
ATM I'm confused why some font sizes seem to be ignored when combined with weatherstyles.css - an 'inspector' says they are still enforced, but obviously they are not ?
I hate css ........
@ Paul
Yes, I still haven't got anyone with years of entries and a 'clean' (no errors) database
If it's a problem please say - the 'release' code does not show your url.
Sorry - I forgot to change something on line #1235

Subsequent calls should now properly refer to your data.
ATM I'm confused why some font sizes seem to be ignored when combined with weatherstyles.css - an 'inspector' says they are still enforced, but obviously they are not ?
I hate css ........
@ Paul
Yes, I still haven't got anyone with years of entries and a 'clean' (no errors) database

If it's a problem please say - the 'release' code does not show your url.
......................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)
'native' m/s windrun fixed ... my oops !
rain conversion corrected - thanks jdc
@ Ron
Averages:
The sum of 'valid' data / number of valid data entries in a month.
The 'overall' averages (bottom line of main table) are the averages of the (counted) month averages.
The seasonal works in a similar way but using 3 months valid data / valid entries
rain conversion corrected - thanks jdc
@ Ron
Averages:
The sum of 'valid' data / number of valid data entries in a month.
The 'overall' averages (bottom line of main table) are the averages of the (counted) month averages.
The seasonal works in a similar way but using 3 months valid data / valid entries
......................Imagine, what you will KNOW tomorrow !
- PaulMy
- Posts: 3603
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2+ Cumulus1 / CummulusMX
- Operating System: Windows8 / Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Yet Another Dayfile Reader (PHP)
@ beteljuice,
No problem at all, use it at your convenience...
Paul
No problem at all, use it at your convenience...
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www .komokaweather.com/cumulusmxwll/index.htm
MX www.komokaweather.com/cumulusmx/index.php
MX www.komokaweather.com/cumulusmx/index.html

C1 www.komokaweather.com/komokaweather-ca
MX www .komokaweather.com/cumulusmxwll/index.htm
MX www.komokaweather.com/cumulusmx/index.php
MX www.komokaweather.com/cumulusmx/index.html
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: Yet Another Dayfile Reader (PHP)
Thanks Beteljuice evrything is up and running fine now.beteljuice wrote:'native' m/s windrun fixed ... my oops !
rain conversion corrected - thanks jdc
@ Ron
Averages:
The sum of 'valid' data / number of valid data entries in a month.
The 'overall' averages (bottom line of main table) are the averages of the (counted) month averages.
The seasonal works in a similar way but using 3 months valid data / valid entries
What do you mean with
@ Paul
Yes, I still haven't got anyone with years of entries and a 'clean' (no errors) database
About the seasons
I've looked at this winter , february isn't completed yet so the average is dec+jan+(incomplete-feb) divided by 3 as far I can see , there is an * that indicates it's not complete but... it would be nice to have the trending season to be the sum of days divided by the days in the season, or am I asking too muchThe seasonal works in a similar way but using 3 months valid data / valid entries

Anyway thanks for this great script !
Ron
- 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)
Quite straight forward, and yes with incomplete months there is a difference ! - with completed months there is sometimes 0.1 difference (due to rounding)Ron wrote:it would be nice to have the trending season to be the sum of days divided by the days in the season, or am I asking too much![]()
(temporarily on my test page) Edit: link no longer valid
Today 2014 Winter season Average Max Temp was -1.2C, day-by-day method now -1.9C
But .... I am not sure which is the "correct" method to use.
Anyone got a 'source' ?
Last edited by beteljuice on Tue 18 Feb 2014 4:27 am, edited 2 times in total.
......................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)
I have just noticed that in the wind data pages (i.e. Wind Speed, Wind Gust, Wind Run) I am getting 0"> instead of zero.
Tried to find where this occurring, I can see what is happening in the table data generated by the php
but cannot find the problem in the code, obviously not conversant enough with it yet!!
If you want to check it out see here http://www.dmjsystems.co.uk/weather/basic.php and choose Wind Run year 2012.
Tried to find where this occurring, I can see what is happening in the table data generated by the php
Code: Select all
<td class="datacell" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" datamon=".Feb">0"> </td>
If you want to check it out see here http://www.dmjsystems.co.uk/weather/basic.php and choose Wind Run year 2012.
- nitrx
- Posts: 1297
- Joined: Sun 13 Dec 2009 1:21 pm
- Weather Station: WH1080
- Operating System: Windows 10
- Location: Apeldoorn The Netherlands
- Contact:
Re: Yet Another Dayfile Reader (PHP)
I've not a direct source but this is a Dutch site (unfortenally) that calculates averages over a given period when I look up the perod 1 dec 2012 to 28 feb 2013 it gives an average of 2.9 C and for the period 1 dec to 2 febr 2013 3.6 C . (not sure how it should be handled according the WMO). I'm aware of the 0.1 roundingbeteljuice wrote:Quite straight forward, and yes with incomplete months there is a difference ! - with completed months there is sometimes 0.1 difference (due to rounding)
(temporarily on my test page basic
Today 2014 Winter season Max Temp was -1.2C, day-by-day method now -1.9C
But .... I am not sure which is the "correct" method to use.
Anyone got a 'source' ?
edit The KNMI (Dutch metoffice) calculates the monthly average from the sum of the temps divided by the past days