Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.2.4 build 3060 - 10 December 2019.
    Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

    See the Wiki for downloading either version.

    AnnualDataSummary PHP

    Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
    KevinF
    Posts: 71
    Joined: Sat 14 Apr 2012 5:01 pm
    Weather Station: WMR200
    Operating System: XP SP3
    Location: Lancashire

    Re: AnnualDataSummary PHP

    Post by KevinF » Tue 20 Nov 2012 5:54 pm

    Kiwi? That's good shoe polish! :lol:

    BCJKiwi
    Posts: 885
    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: AnnualDataSummary PHP

    Post by BCJKiwi » Tue 20 Nov 2012 10:07 pm

    KevinF wrote:Kiwi? That's good shoe polish! :lol:
    Just like most things from New Zealand!

    gemini06720
    Posts: 1700
    Joined: Mon 10 Aug 2009 10:16 pm
    Weather Station: No weather station
    Operating System: No operating system
    Location: World...

    Re: AnnualDataSummary PHP

    Post by gemini06720 » Tue 20 Nov 2012 10:30 pm

    BCJKiwi wrote:Ray, you know who I am as we have exchanged emails. Those are my real initials plus an indication of where in the world I am. I trust you know what a Kiwi is and where it comes from...
    Indeed, Mr. B - I found the exchanges we had ... association now completes... ;)

    The only thing I know about kiwis is that I have stopped eating them (for the same reason mentioned below)... :mrgreen:
    BCJKiwi wrote:Just like most things from New Zealand!
    I used to enjoy the New Zealand lamb but now find it tasteless ... that is why I pay a bit more money and get my lamb from an island producer (ie: Vancouver Island, British Columbia, Canada)... :D

    User avatar
    beteljuice
    Posts: 2792
    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: AnnualDataSummary PHP

    Post by beteljuice » Wed 21 Nov 2012 4:17 am

    Maintaining legibility especially in the vertical (column) plane for a 'twinned' data entry has proved interesting.

    Although I think temperatures in F would be tight, and comparing say high / low pressure would break the cell formating.

    The beteljuice attempt using BCJkiwi 'buttons' and Ron's (nitrix) data.
    Edit: Out of date link removed
    Last edited by beteljuice on Thu 31 Jan 2019 1:14 am, edited 2 times in total.
    Image
    ......................Imagine, what you will KNOW tomorrow !

    User avatar
    mcrossley
    Posts: 5817
    Joined: Thu 07 Jan 2010 9:44 pm
    Weather Station: Davis VP2
    Operating System: Stretch Lite rPi
    Location: Wilmslow, Cheshire, UK
    Contact:

    Re: AnnualDataSummary PHP

    Post by mcrossley » Wed 21 Nov 2012 3:31 pm

    Hmm, personally I find these double entries too hard to read, I don't think the slash makes it any easier, a space/double space may be better.

    User avatar
    beteljuice
    Posts: 2792
    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: AnnualDataSummary PHP

    Post by beteljuice » Wed 21 Nov 2012 6:38 pm

    Nice idea, but somehow it feels 'uncomfortable' .. Edit: old link removed

    ... and again with eg. deg, F would become even more confusing - I think any kind of 'double-entry' would have to be judiciously considered upon it's unique output.
    Last edited by beteljuice on Thu 31 Jan 2019 4:07 pm, edited 3 times in total.
    Image
    ......................Imagine, what you will KNOW tomorrow !

    BCJKiwi
    Posts: 885
    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: AnnualDataSummary PHP

    Post by BCJKiwi » Thu 22 Nov 2012 1:53 am

    Well perhaps you can see why I decided to concatenate the double columns into one.

    12.3/23.4
    12.3/23.4
    12.3/23.4
    12.3/23.4

    12.3 / 23.4
    12.3 / 23.4
    12.3 / 23.4
    12.3 / 23.4

    12.3 23.4
    12.3 23.4
    12.3 23.4
    12.3 23.4

    | 12.3 | 23.4 |
    | 12.3 | 23.4 |
    | 12.3 | 23.4 |
    | 12.3 | 23.4 | - if you have a table with borders.

    Layout does not really work here as the BBS strips out extra spaces but I guess you get the idea.

    "you pays your money and you takes your choice"

    gemini06720
    Posts: 1700
    Joined: Mon 10 Aug 2009 10:16 pm
    Weather Station: No weather station
    Operating System: No operating system
    Location: World...

    Re: AnnualDataSummary PHP

    Post by gemini06720 » Thu 22 Nov 2012 2:51 am

    Indeed Mark, the double entries are very difficult to read for most people - I had some double entries months ago when I first installed the original script - then I got some comments from my users/visitors as the double entries, because the font size had to be reduced (to fit within the same space) were quite difficult to read (many of my users are 50+) - thus, I re-wrote the original script, added all the tags available from Cumulus, and deactivated all double entries. I have not received any comments from my 'audience'... ;)

    BCJKiwi
    Posts: 885
    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: AnnualDataSummary PHP

    Post by BCJKiwi » Thu 22 Nov 2012 11:40 pm

    Back to the new year rollover - Oh dear not yet quite right.
    We do need to -1 day.
    Have looked in detail at what is on the hoster.
    It is the 23/11/2012 here in NZ
    The current file shows a last modified time stamp of of 23/11/2012 12:00:00 a.m.
    Cumulus (well, Windows 7) shows the exact same time stamp.
    The data is for the 22nd.

    The best solution I could come up with that should work regardless of the rollover time is :-

    Code: Select all

    // was a year passed in the URL?  If not use meterological date year from time stamp of dayfile.txt
    	if (isset($_GET['year'])) {
    		$tableYear=$_GET['year'];
    	} else {
    		if(date("m", filemtime($dayfile)) == 1 && date("d", filemtime($dayfile)) ==1) {
    			$tableYear = date("Y", filemtime($dayfile)) -1 ;
    			} else {
    			$tableYear = date("Y", filemtime($dayfile)) ;
    			}
    		}
    i.e. if the mod date of the file is the first day of the year use the previous year.

    User avatar
    mcrossley
    Posts: 5817
    Joined: Thu 07 Jan 2010 9:44 pm
    Weather Station: Davis VP2
    Operating System: Stretch Lite rPi
    Location: Wilmslow, Cheshire, UK
    Contact:

    Re: AnnualDataSummary PHP

    Post by mcrossley » Fri 23 Nov 2012 5:16 pm

    I have tried adding some column banding to my page, I think this helps particularly with the 'double column format?
    http://weather.wilmslowastro.com/datasummary.php

    BCJKiwi
    Posts: 885
    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: AnnualDataSummary PHP

    Post by BCJKiwi » Sat 24 Nov 2012 1:03 am

    Agreed, a significant improvement.

    The issue for me with the original script was that all the columns are the same width and with the data centred there is no way to intuitively know which columns are a pair. The column headers being right aligned did not help either.
    This became more annoying once most pages had double columns.

    Your solution resolves this. However I would like to have the paired columns' data closer together than the non-paired columns and am not sure how complicated that would be to do. If it was relatively simple to identify and style differently alternate columns in the double column setup, then a number of options arise,
    A vertical border either side of the pair.
    More padding on the left of the right column and on the right of the left column.

    Much food for thought.

    User avatar
    beteljuice
    Posts: 2792
    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: AnnualDataSummary PHP

    Post by beteljuice » Sat 24 Nov 2012 4:03 am

    However I would like to have the paired columns' data closer together than the non-paired columns and am not sure how complicated that would be to do. If it was relatively simple to identify and style differently alternate columns in the double column setup
    It is relatively straightforward to either overide or declare a (new) class / style so that eg. the 2nd (right) column of the pair was left justified. The existing cell padding would leave a differential gap.

    In the tests I posted you will notice that this technique was used to center justify the headers over 'dual entry' columns.
    Image
    ......................Imagine, what you will KNOW tomorrow !

    sfws
    Posts: 466
    Joined: Fri 27 Jul 2012 11:29 am
    Weather Station: Final post in top ten topic
    Operating System: Tempermental Win. 10 PC
    Location: Moving

    Re: AnnualDataSummary PHP

    Post by sfws » Tue 01 Jan 2013 2:31 pm

    BCJKiwi wrote:Back to the new year rollover - Oh dear not yet quite right.
    I've posted in http://sandaysoft.com/forum/viewtopic.php?f=18&t=6640 an update on year rollover - including a comparison of the PHP version you developed in this thread and the PHP version you've linked to from the Wiki. Could be a difference in our time zones issue or an error on my part, but one seemed on your 1 January to try to display 2013 before it was available, but all is right now its 2 January for you.

    I edited the Wiki yesterday, and moved the bit I inserted to directly after your subsequent insert, trying to complement your style. I have put some explanation of my changes in http://sandaysoft.com/forum/viewtopic.php?f=18&t=8690 following on from the experiences noted there of someone trying to implement the JavaScript version.

    BCJKiwi
    Posts: 885
    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: AnnualDataSummary PHP

    Post by BCJKiwi » Wed 02 Jan 2013 2:01 am

    This year rollover date fix (Posted 5 posts above this) survived the new Year and worked as expected.
    BCJKiwi wrote:Back to the new year rollover - Oh dear not yet quite right.
    We do need to -1 day.
    Have looked in detail at what is on the hoster.
    It is the 23/11/2012 here in NZ
    The current file shows a last modified time stamp of of 23/11/2012 12:00:00 a.m.
    Cumulus (well, Windows 7) shows the exact same time stamp.
    The data is for the 22nd.

    The best solution I could come up with that should work regardless of the rollover time is :-

    Code: Select all

    // was a year passed in the URL?  If not use meterological date year from time stamp of dayfile.txt
    	if (isset($_GET['year'])) {
    		$tableYear=$_GET['year'];
    	} else {
    		if(date("m", filemtime($dayfile)) == 1 && date("d", filemtime($dayfile)) ==1) {
    			$tableYear = date("Y", filemtime($dayfile)) -1 ;
    			} else {
    			$tableYear = date("Y", filemtime($dayfile)) ;
    			}
    		}
    i.e. if the mod date of the file is the first day of the year use the previous year.

    User avatar
    dazza1223
    Posts: 506
    Joined: Sun 25 Jan 2015 8:41 pm
    Weather Station: Davis Vantage Vue
    Operating System: raspberry pi 3 +
    Location: Worthing
    Contact:

    Re: AnnualDataSummary PHP

    Post by dazza1223 » Wed 30 Jan 2019 8:53 pm

    sorry but i got the sql one ive tryed setting this up but all im geting is this

    http://www.davisworthing.co.uk/datasummary.php



    --------------------------------------------------------


    in the php log it dumping a lote off erros

    [Wed Jan 30 20:52:24.337677 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: maxRainRate in /home/pi/usb/website/datasummary.php on line 223, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.337725 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: maxRainRate in /home/pi/usb/website/datasummary.php on line 223, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.337918 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: highAvgWspeed in /home/pi/usb/website/datasummary.php on line 224, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.338089 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: highAvgWspeed in /home/pi/usb/website/datasummary.php on line 224, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.338145 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: highWindGust in /home/pi/usb/website/datasummary.php on line 225, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.338174 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: highWindGust in /home/pi/usb/website/datasummary.php on line 225, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.339662 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: totWindRun in /home/pi/usb/website/datasummary.php on line 226, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.340554 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: totWindRun in /home/pi/usb/website/datasummary.php on line 226, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.340821 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: domWindDir in /home/pi/usb/website/datasummary.php on line 227, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.341032 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: domWindDir in /home/pi/usb/website/datasummary.php on line 227, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.341096 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: maxPress in /home/pi/usb/website/datasummary.php on line 228, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.342065 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: maxPress in /home/pi/usb/website/datasummary.php on line 228, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.342356 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: minPress in /home/pi/usb/website/datasummary.php on line 229, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.342971 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: minPress in /home/pi/usb/website/datasummary.php on line 229, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.343132 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: HighSolarRad in /home/pi/usb/website/datasummary.php on line 231, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.343172 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: HighSolarRad in /home/pi/usb/website/datasummary.php on line 231, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.343949 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: totalEvap in /home/pi/usb/website/datasummary.php on line 233, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.344079 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: totalEvap in /home/pi/usb/website/datasummary.php on line 233, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.344120 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: HeatDegDays in /home/pi/usb/website/datasummary.php on line 234, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.344184 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: HeatDegDays in /home/pi/usb/website/datasummary.php on line 234, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.344218 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: CoolDegDays in /home/pi/usb/website/datasummary.php on line 235, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.344249 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined index: CoolDegDays in /home/pi/usb/website/datasummary.php on line 235, referer: http://www.davisworthing.co.uk/index.php
    [Wed Jan 30 20:52:24.484430 2019] [:error] [pid 11360] [client 92.27.85.131:62392] PHP Notice: Undefined variable: dataset in /home/pi/usb/website/datasummary.php on line 1072, referer: http://www.davisworthing.co.uk/index.php
    :bash:
    Have fun and keep learning

    dazza :D

    https://www.davisworthing.co.uk/banner.php

    Post Reply