Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.7.0 (build 3089) - 28 July 2020 (please see important announcement regarding releases since 3.5.0)
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 the NOAA report and Snow Index drop-down menus to 2030)

Use this link to Download the Software (Cumulus MX / Cumulus 1 and other related items). Software

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: 2973
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 »

@Mapantz ...

Well it seems to be working for you ..... :D
Image
......................Imagine, what you will KNOW tomorrow !

Phil23
Posts: 508
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: Yet Another Dayfile Reader (PHP)

Post by Phil23 »

On two different data sets.

My live data http://weather.inverellit.com/test_dayfile.php & also my old & new data merged http://weather.inverellit.com/historic/test_dayfile.php

User avatar
beteljuice
Posts: 2973
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 »

Phil23 wrote:
Sun 04 Aug 2019 8:34 pm
On two different data sets.

My live data http://weather.inverellit.com/test_dayfile.php
You seem to have your TZ as <space> ..
.. missing hatch2.jpg from the directory.

... but functionally OK :clap:
Image
......................Imagine, what you will KNOW tomorrow !

Phil23
Posts: 508
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: Yet Another Dayfile Reader (PHP)

Post by Phil23 »

Just got this

Code: Select all

Notice: Undefined offset: -6 in /home/inv49478/public_html/weather/historic/TEST_readDayfile.php on line 1951
On
Min T° App
Min DP

& on Sunshine

Code: Select all

Notice: date_default_timezone_set(): Timezone ID '' is invalid in /home/inv49478/public_html/weather/historic/TEST_readDayfile.php on line 2248
Added timezone as

Code: Select all

$maxsunhours = 24; // Set sunshine bar graph option as above

$bg_lat = -29.773; // If $maxsunhours 0 or 1 set your Latitude in decimal, -negative values for Southern hemisphere
$bg_lon = 151.120; // If $maxsunhours 0 or 1 set your Longitude in decimal, -negative values for West
$bg_time_zone = "Australia/Sydney";  // If $maxsunhours 0 or 1 set your timezone ONLY if your data is a different TZ to your server - see: http://php.net/manual/en/timezones.php
But error is unchanged.

No issues on my working pages though that don't have the TZ set.

Code: Select all

$maxsunhours = 0; // Set sunshine bar graph option as above

$bg_lat = -29.773; // If $maxsunhours 0 or 1 set your Latitude in decimal, -negative values for Southern hemisphere
$bg_lon = 151.120; // If $maxsunhours 0 or 1 set your Longitude in decimal, -negative values for West
$bg_time_zone = "";  // If $maxsunhours 0 or 1 set your timezone *ONLY* if your data is a different TZ to your server - see: http://php.net/manual/en/timezones.php
http://weather.inverellit.com/datasummary.php
http://weather.inverellit.com/historic/datasummary.php

Edit errors only on Historic data Test Page.

User avatar
beteljuice
Posts: 2973
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 »

errors only on Historic data Test Page.
Check out your entries Jan 2012 ...

Re. TZ - I seem to remember someone else having a problem with Sydney being recognized ... put it back to ""
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
beteljuice
Posts: 2973
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: IMPORTANT UPDATE

Post by beteljuice »

New distribution ready ...

Ver 7.1.1 Important Update ...

betel_readDayfile.php has been updated to fix Seasonal wrong year attribution of Jan, Feb, Mar.

Rainfall, EVT, and WindRun have had the data they display changed.
Optional Rain Days summary included in Rainfall data.

Existing users only need to download betel_readDayfile_7_1_1.zip (new raindrop.png included)

Remember to back-up your existing file !!!

... and Copy ALL your user set vars to the new file
Image
......................Imagine, what you will KNOW tomorrow !

Phil23
Posts: 508
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: Yet Another Dayfile Reader (PHP)

Post by Phil23 »

beteljuice wrote:
Sun 04 Aug 2019 10:45 pm
Check out your entries Jan 2012 ...
Yes,

Certainly some very bizarre figures for Min's in 2012 & 13.
Work in progress cleaning those up for the sake of it.

That said though, I don't get it erroring on the original code on the same dirty data.

User avatar
grwkak
Posts: 102
Joined: Fri 28 Jun 2013 12:32 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Hambden, Ohio US
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by grwkak »

Seem to have this partially working:

http://wilsonsweather.host-ed.me/dayfilebetel/test.php

I can display max temp and switch to seasonal but can't display anything else (min temps, switch units) - I get a "getting data" message, but the page never changes.
Any suggestions?

Guy

User avatar
beteljuice
Posts: 2973
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 »

@grwkak

if you 'post' ?data=rainfall to your page it works (but you can't switch to anything else), That sounds like a javascript problem, or it can't find its way to betel_readDayfile.php

I can't see anything obvious with the paths you've put, and I've rechecked the distribution code and it's test page.

http://beteljuice.co.uk/daytest/test_dayfile.php It's using the 'distribution' file and a bare bones 'holding page' like yours.

Anyone else got the problem ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
Super-T
Posts: 839
Joined: Tue 09 Sep 2008 3:37 am
Weather Station: wh-1081
Operating System: Weather Laptop - Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Super-T »

I loaded all the files in the zip but get this "FATAL ERROR - Language File FAIL !!"

Perhaps I need some updates as I was running the original or close to it?

T

User avatar
beteljuice
Posts: 2973
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 »

All the file you need are in the distribution zip.

It has had some serious updates over the years, especially for php 7+

Which zip did you just download ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
PaulMy
Posts: 2190
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by PaulMy »

I have it working fine on my Cumulus site as http://www.komokaweather.com/weather/be ... maryCU.php
But on my Saratoga site I can get the initial page (default Max Temp) to display in Daily and Season but when I select another data item I get the Data FAIL!!! message http://www.komokaweather.com/komokaweat ... ummary.php

Enjoy,
Paul

User avatar
beteljuice
Posts: 2973
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 »

*Paul Yours at least seems to be a path issue.

Did you copy the path from your previous 'worker'

on .ca where is betel_readDayfile ?
Image
......................Imagine, what you will KNOW tomorrow !

berwickw
Posts: 4
Joined: Mon 22 Jul 2019 9:14 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7

Re: Yet Another Dayfile Reader (PHP)

Post by berwickw »


User avatar
PaulMy
Posts: 2190
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by PaulMy »

Thanks beteljuice. Saratoga now seems to be working well http://www.komokaweather.ca/betel_datasummary.php

Previously I had all the necessary files in /weather which is the home folder for the Cumulus site. And in the komokaweather-ca Saratoga folder only had betel_datasummary.php which had an include_once "../weather/betel_readDayfile.php" (I believe with the help of BCJKiwi to minimize the duplication of files)
With the new v7.1.1 that gave the DataFAIL when selecting a different data element.
Now added all the necessary files in the Saratoga komokaweather-ca folder and this now works fine as well. No doubt a path issue as you mentioned but have not been able to track it down and will need to do some further checking, but the script works great!.

Enjoy,
Paul
Last edited by PaulMy on Mon 05 Aug 2019 4:02 pm, edited 1 time in total.

Post Reply