Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

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: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Sun 03 Jul 2016 7:10 pm

... and I was wonderaing where the British Summer went ..... Finland !!!!
Image
......................Imagine, what you will KNOW tomorrow !

sperry russ
Posts: 71
Joined: Mon 30 Jan 2012 5:09 pm
Weather Station: Davis Vantage Pro 2 Cabled
Operating System: Windows 10
Location: Central Florida USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by sperry russ » Thu 14 Jul 2016 12:55 am

Hello beteljuice,

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

Thanks.

User avatar
Mapantz
Posts: 525
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64 - A beast.
Location: Wareham, Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz » Sun 14 Aug 2016 3:50 pm

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
Image

User avatar
steve
Cumulus Author
Posts: 26714
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 » Sun 14 Aug 2016 3:59 pm

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

User avatar
Mapantz
Posts: 525
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64 - A beast.
Location: Wareham, Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz » Sun 14 Aug 2016 5:08 pm

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
Image

griffo42
Posts: 25
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis VantageVue
Operating System: Win 10
Location: Brisbane, Queensland, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by griffo42 » Mon 03 Apr 2017 6:14 am

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
Carina Weather
Brisbane, Australia
Davis Vantage Vue Model #6357
http://www.kstwx.net/cu/index.htm
http://www.kstwx.net/index.php
Image

User avatar
Mapantz
Posts: 525
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64 - A beast.
Location: Wareham, Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz » Mon 03 Apr 2017 10:20 am

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
Image

griffo42
Posts: 25
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis VantageVue
Operating System: Win 10
Location: Brisbane, Queensland, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by griffo42 » Tue 04 Apr 2017 1:46 am

Hi Hapantz

Thanks.

That fixed it.

best wishes

Keith
Keith
Carina Weather
Brisbane, Australia
Davis Vantage Vue Model #6357
http://www.kstwx.net/cu/index.htm
http://www.kstwx.net/index.php
Image

92merc
Posts: 43
Joined: Wed 15 Feb 2017 6:07 pm
Weather Station: Davis VP2
Operating System: Windows 10 Pro
Location: Bismarck, ND USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc » Sun 09 Apr 2017 6:00 pm

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: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley » Sun 09 Apr 2017 6:55 pm

It is showing the average daily rainfall for each month, which for you *is* zero.

User avatar
kocher
Posts: 67
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 » Mon 10 Apr 2017 8:57 am

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: 118
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Youngstown, Ohio
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by jlmr731 » Sat 15 Apr 2017 5:26 am

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: 874
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by BCJKiwi » Sat 15 Apr 2017 10:25 pm

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: 118
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Youngstown, Ohio
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by jlmr731 » Sun 16 Apr 2017 2:47 am

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: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Sun 16 Apr 2017 3:14 am

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