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 4018) - 28 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

Yet Another Dayfile Reader (PHP)

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

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: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

... and I was wonderaing where the British Summer went ..... Finland !!!!
Image
......................Imagine, what you will KNOW tomorrow !
sperry russ
Posts: 89
Joined: Mon 30 Jan 2012 5:09 pm
Weather Station: Davis Vantage Pro 2 Cabled
Operating System: Windows 7
Location: Central Florida USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by sperry russ »

Hello beteljuice,

Have you checked your PM's lately? I sent you a PM regarding the dayfile reader.

Thanks.
Mapantz
Posts: 1775
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz »

I've noticed a small bug in the sunshine 'daily' stats..

http://www.warehamwx.co.uk/cumulus/datasummary.php

In the sections for Avg: Hi: and Lo: The wrong value is showing in the 'Hi'
Image
User avatar
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)

Post by steve »

Mapantz wrote:In the sections for Avg: Hi: and Lo: The wrong value is showing in the 'Hi'
It appears to be ignoring any figure higher than 9.9. Wrong kind of sorting?
Steve
Mapantz
Posts: 1775
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz »

steve wrote:
Mapantz wrote:In the sections for Avg: Hi: and Lo: The wrong value is showing in the 'Hi'
It appears to be ignoring any figure higher than 9.9. Wrong kind of sorting?
I've just seen a post a few pages back, mentioning the same thing. :oops:
I downloaded the full zip again, and it appears to be rectified. :D
Image
griffo42
Posts: 226
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by griffo42 »

Hi

I have just inplemented this software on my site (kstwx.net/cu/index.htm). However despite having the under quoted at line 33 in my betel_readDayfile.php file:

$buttons = true; // true = button options, false = dropdown options

it shows a drop down list.

Could anyone tell me how to get the button option working, please.

Thanks
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
Mapantz
Posts: 1775
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz »

Hi
It looks as though you're missing the datasummary css?!

Just popped on the laptop to check, and sure enough, a 404 error:

http://www.kstwx.net/cu/betel_datasummary.css
Image
griffo42
Posts: 226
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by griffo42 »

Hi Hapantz

Thanks.

That fixed it.

best wishes

Keith
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
92merc
Posts: 59
Joined: Wed 15 Feb 2017 6:07 pm
Weather Station: Davis VP2
Operating System: Windows 11 Pro
Location: Bismarck, ND USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc »

I have the program up and running. But I have one question.

http://www.bismarckweather.net/dayfiletxt/basic.php

When you go to rainfall, why is my bottom figures all zero's? I'm running MX and not version 1.94.
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley »

It is showing the average daily rainfall for each month, which for you *is* zero.
User avatar
kocher
Posts: 233
Joined: Sat 19 Apr 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 10
Location: San Sebastian - Spain
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by kocher »

Spanish translation:

Code: Select all


            'es' => array(//   Español
                    'daily' => 'Diario', // drop-down table selector
                    'seasonal' => 'Estaciones', // drop-down table selector
                    'note' => array('Nota','Datos incompletos.', 'Cero tratado como nulo !'),
                    'loading' => 'Obteniendo datos ...',
                    'fail' => 'Error en la obtención de los datos !!!',
                    'total' => 'Σ',
                    'avg' => 'Med',
                    'hi' => 'Máx',
                    'lo' => 'Mín',
                    'dom' => 'Dom', // short for dominant (wind direction)
                    'season_1' => '<img src="snowflake.png" height="22px" alt="Winter" />Invierno', // previous Dec, Jan, Feb
                    'season_2' => '<img src="daffodil.png" height="22px" alt="Spring" />Primavera', // Mar, Apr, May
                    'season_3' => '<img src="sun.png" height="22px" alt="Summer" />Verano', // Jun, Jul, Aug
                    'season_4' => '<img src="leaf.gif" height="22px" alt="Autumn" />Oto&ntilde;o', // Sep, Oct, Nov
                    'mn' => array('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'),
                    'dy' => array('Dom','Lun','Mar','Mi&eacute;','Jue','Vie','S&aacute;b'),
                    'compass_headings' => array('N&nbsp;&#x2193;','NE&nbsp;&#x2199;','E&nbsp;&#x2190;','SE&nbsp;&#x2196;','S&nbsp;&#x2191;','SW&nbsp;&#x2197;','W&nbsp;&#x2192;','NW&nbsp;&#x2198;','N&nbsp;&#x2193;'),
                    'maxtemp' => array('Máx T&deg;', 'Temperatura Máxima'),
                    'mintemp' => array('Mín T&deg;', 'Temperatura Mínima'),
                    'tdiff' => array('Dif T&deg;', 'T&deg; Diferencia'),
                    'avgtemp' => array('Temp Med', 'Temperatura media'),
                    'tappmax' => array('M&aacute;x T&deg; Ap', 'Maximum Apparent Temperature'),
                    'tappmin' => array('M&iacute;n T&deg; Ap', 'Minimum Apparent Temperature'),
                    'dpmax' => array('M&aacute;x PR', 'Maximum Dew Point Temperature'),
                    'dpmin' => array('M&iacute;n PR', 'Minimum Dew Point Temperature'),
                    'rhmax' => array('M&aacute;x Hum', 'Maximum Relative Humidity %'),
                    'rhmin' => array('M&iacute;n Hum', 'Minimum Relative Humidity %'),
                    'rainfall' => array('Lluvia', 'Lluvia'),
                    'windspd' => array('Viento', 'Highest Velocidad del Viento '),
                    'windgust' => array('Rachas', 'Racha M&aacute;xima'),
                    'windrun' => array('Recorrido', 'Recorrido del Viento'),
                    'winddir' => array('Direcci&oacute;n', 'Dirección del Viento Dominante'),
                    'baromax' => array('Baro M&aacute;x', 'Presi&oacute;n  - Max'),
                    'baromin' => array('Baro M&iacute;n', 'Presi&oacute;n - Min'),
                    'HoursSun' => array('Horas Sol', 'Horas de Sol'),
                    'Solar' => array('Solar', 'Energ&iacute;a Solar W/m&sup2;'),
                    'HighUV' => array('Indice UV', 'Indice UV'),
                    'evt' => array('Evapotranspiraci&oacute;n', 'Evapotranspiraci&oacute;n'),
                    'heatday' => array('Grados-D&iacute;a Calentar', 'Heating Day'),
                    'coolday' => array('Grados-D&iacute;a Enfr&iacute;ar', 'Cooling Day')
                )

Image
jlmr731
Posts: 225
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Wickliffe, Ohio
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by jlmr731 »

With php 7.1 i get an error
From apache error log

Code: Select all

 [php7:notice] [pid 12140] [client 192.168.0.27:55028] PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /var/www/html/betel_readDayfile.php:804\nStack trace:\n#0 /var/www/html/betel_readDayfile.php(1549): drawCalendar('2017')\n#1 /var/www/html/basic.php(11): include('/var/www/html/b...')\n#2 {main}\n  thrown in /var/www/html/betel_readDayfile.php on line 804 
Now this does work just fine with php 5.6
BCJKiwi
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)

Post by BCJKiwi »

Hi

I wrote about this earlier but not sure where and not sure I posted what I actually did.
line 804 In betel_readDayfile.php original Version: 3.1 - 04 Mar 2014

replace this;
if($dataSet != 'winddir') $alltime[$m][] = $thisValue;
with this
if($dataSet != 'winddir') $alltime[$m] = $thisValue;

and in original line 951
replace this;
$seasonTot[$sT][] = $thisValue;
with this
$seasonTot[$sT] = $thisValue;

i.e. remove the extra [ ] in each case, It is all about changes in PHP 7's handling of arrays.
jlmr731
Posts: 225
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Wickliffe, Ohio
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by jlmr731 »

BCJKiwi wrote:Hi

I wrote about this earlier but not sure where and not sure I posted what I actually did.
line 804 In betel_readDayfile.php original Version: 3.1 - 04 Mar 2014

replace this;
if($dataSet != 'winddir') $alltime[$m][] = $thisValue;
with this
if($dataSet != 'winddir') $alltime[$m] = $thisValue;

and in original line 951
replace this;
$seasonTot[$sT][] = $thisValue;
with this
$seasonTot[$sT] = $thisValue;

i.e. remove the extra [ ] in each case, It is all about changes in PHP 7's handling of arrays.
That did fix that problem so now it will display in php7 and 7.1
Thank you very much!

now i do get another error even though it seems to be working properly from what i can tell it is more of a warning than an error so i just enabled the error_reporting(0); so i dont see it (maybe thats why it was there in the first place)
but the warning is :

Warning: Illegal string offset 'short' in /var/www/html/betel_readDayfile.php on line 1128,

Like i said its working fine so dont think there is a cause for alarm

Thanks Again
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: Yet Another Dayfile Reader (PHP)

Post by beteljuice »

The beteljuice is still unconvinced about the 'workaround'

I've just spent several hours trying to get it to work accross php versions and the figures just aren't correct in either one place or another !

... to do list
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply