If you use Cumulus, please donate Image

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Yet Another Dayfile Reader (PHP)

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

Moderators: daj, TNETWeather

User avatar
beteljuice
Posts: 2443
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Sun Jul 03, 2016 7:10 pm

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

sperry russ
Posts: 63
Joined: Mon Jan 30, 2012 5:09 pm
Weather Station: WindBlown Weather Station
Operating System: Windows XP (SP3)
Location: Central Florida USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby sperry russ » Thu Jul 14, 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: 402
Joined: Sat Dec 17, 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64 - A beast.
Location: Wareham, Dorset - UK

Re: Yet Another Dayfile Reader (PHP)

Postby Mapantz » Sun Aug 14, 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: 25821
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: Davis VP2
Operating System: Raspbian
Location: Sanday, Orkney
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby steve » Sun Aug 14, 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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Like Cumulus and want to support it? Please donate! Image

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

Re: Yet Another Dayfile Reader (PHP)

Postby Mapantz » Sun Aug 14, 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: 18
Joined: Thu Dec 10, 2015 6:41 am
Weather Station: Davis VantageVue
Operating System: Win 10
Location: Brisbane, Queensland, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby griffo42 » Mon Apr 03, 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: 402
Joined: Sat Dec 17, 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64 - A beast.
Location: Wareham, Dorset - UK

Re: Yet Another Dayfile Reader (PHP)

Postby Mapantz » Mon Apr 03, 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: 18
Joined: Thu Dec 10, 2015 6:41 am
Weather Station: Davis VantageVue
Operating System: Win 10
Location: Brisbane, Queensland, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby griffo42 » Tue Apr 04, 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: 35
Joined: Wed Feb 15, 2017 6:07 pm
Weather Station: Davis VP2
Operating System: Windows 10 Pro
Location: Bismarck, ND USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby 92merc » Sun Apr 09, 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: 4843
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby mcrossley » Sun Apr 09, 2017 6:55 pm

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

kocher
Posts: 43
Joined: Sat Apr 19, 2014 7:57 pm
Weather Station: Davis Vantage Pro2+
Operating System: Windows 7
Location: San Sebastian - Spain

Re: Yet Another Dayfile Reader (PHP)

Postby kocher » Mon Apr 10, 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')
                )

Kocher

ESEUS2000000020018A
Windows 7
Davis Vantage Pro Plus f.a.
WeatherLink 6.0.2
cumulusMX
GraphWeather Version 3.0.15
Image

jlmr731
Posts: 84
Joined: Sat Aug 27, 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Linux Ubuntu / windows 10
Location: Youngstown, Ohio
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby jlmr731 » Sat Apr 15, 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: 844
Joined: Mon Jul 09, 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)

Postby BCJKiwi » Sat Apr 15, 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: 84
Joined: Sat Aug 27, 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Linux Ubuntu / windows 10
Location: Youngstown, Ohio
Contact:

Re: Yet Another Dayfile Reader (PHP)

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

Re: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Sun Apr 16, 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 !


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 2 guests