Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.3.0 build 3063 - 10 January 2020.
    Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

    See the Wiki for downloading either version.

    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: 2806
    Joined: Tue 09 Dec 2008 1:37 pm
    Weather Station: None !
    Operating System: ex XP SP3 - now W10 laptop grr
    Location: Dudley, West Midlands, UK

    Re: Yet Another Dayfile Reader (PHP)

    Post by beteljuice » Sun 04 Aug 2019 12:35 am

    @Mapantz ...

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

    Phil23
    Posts: 374
    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 » Sun 04 Aug 2019 8:34 pm

    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
    Image

    User avatar
    beteljuice
    Posts: 2806
    Joined: Tue 09 Dec 2008 1:37 pm
    Weather Station: None !
    Operating System: ex XP SP3 - now W10 laptop grr
    Location: Dudley, West Midlands, UK

    Re: Yet Another Dayfile Reader (PHP)

    Post by beteljuice » Sun 04 Aug 2019 9:19 pm

    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: 374
    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 » Sun 04 Aug 2019 10:18 pm

    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.
    Image

    User avatar
    beteljuice
    Posts: 2806
    Joined: Tue 09 Dec 2008 1:37 pm
    Weather Station: None !
    Operating System: ex XP SP3 - now W10 laptop grr
    Location: Dudley, West Midlands, UK

    Re: Yet Another Dayfile Reader (PHP)

    Post by beteljuice » Sun 04 Aug 2019 10:45 pm

    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: 2806
    Joined: Tue 09 Dec 2008 1:37 pm
    Weather Station: None !
    Operating System: ex XP SP3 - now W10 laptop grr
    Location: Dudley, West Midlands, UK

    Re: IMPORTANT UPDATE

    Post by beteljuice » Sun 04 Aug 2019 10:56 pm

    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: 374
    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 » Sun 04 Aug 2019 11:23 pm

    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.
    Image

    User avatar
    grwkak
    Posts: 100
    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 » Sun 04 Aug 2019 11:55 pm

    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: 2806
    Joined: Tue 09 Dec 2008 1:37 pm
    Weather Station: None !
    Operating System: ex XP SP3 - now W10 laptop grr
    Location: Dudley, West Midlands, UK

    Re: Yet Another Dayfile Reader (PHP)

    Post by beteljuice » Mon 05 Aug 2019 1:32 am

    @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: 825
    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 » Mon 05 Aug 2019 1:52 am

    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: 2806
    Joined: Tue 09 Dec 2008 1:37 pm
    Weather Station: None !
    Operating System: ex XP SP3 - now W10 laptop grr
    Location: Dudley, West Midlands, UK

    Re: Yet Another Dayfile Reader (PHP)

    Post by beteljuice » Mon 05 Aug 2019 2:09 am

    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: 2029
    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 » Mon 05 Aug 2019 2:14 am

    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: 2806
    Joined: Tue 09 Dec 2008 1:37 pm
    Weather Station: None !
    Operating System: ex XP SP3 - now W10 laptop grr
    Location: Dudley, West Midlands, UK

    Re: Yet Another Dayfile Reader (PHP)

    Post by beteljuice » Mon 05 Aug 2019 3:05 am

    *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 » Mon 05 Aug 2019 9:18 am


    User avatar
    PaulMy
    Posts: 2029
    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 » Mon 05 Aug 2019 1:57 pm

    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