Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

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 drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

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

@Pantz ...

Nah ... 'cus I don't Feel Like it :)

What monitor you got ? > Display 3840 x 2160 (32 bit) (60Hz)
.. or are you running two screens ?

Literally just unboxed a threadripper 1950x with GTX1080 and looking for a monitor that doesn't lie about the colours :evil:
Image
......................Imagine, what you will KNOW tomorrow !
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Yet Another Dayfile Reader (PHP)

Post by Phil23 »

beteljuice wrote: Sat 09 May 2020 11:28 pm looking for a monitor that doesn't lie about the colours :evil:
I've had my dual AOC's telling the truth about colours for some time now.
They get calibrated with a Datacolor Colorimeter.

First up had a Spyder3 & now a Spyder5 from Datacolor.
https://www.datacolor.com/photography-d ... 5-welcome/

Still doesn't give me perfect blowups at the 1 hour lab though :lol:

Counter girl still insists they are fine & I may need to adjust my camera & maybe even check my monitor. :bash:
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Mapantz
Posts: 1777
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Mapantz »

beteljuice wrote: Sat 09 May 2020 11:28 pm @Pantz ...

Nah ... 'cus I don't Feel Like it :)

What monitor you got ? > Display 3840 x 2160 (32 bit) (60Hz)
.. or are you running two screens ?

Literally just unboxed a threadripper 1950x with GTX1080 and looking for a monitor that doesn't lie about the colours :evil:
I don't have a dedicated monitor as such. I use my 4K TV as my screen, which is on a swivel wall bracket.

I've just finished building inside a new PC case myself. The one I had before was for a water loop, but it was rather big. I sold it and bought a white Be Quiet! Pure Base 500DX. I stepped away from Asus too, and got a Gigabyte Aorus Z390 Master mobo. I'm just waiting to get an Aorus 2060 Super for it.

https://warehamwx.co.uk/lychee/view.php ... 1061538864
https://warehamwx.co.uk/lychee/view.php ... 1061416646
https://warehamwx.co.uk/lychee/view.php ... 1061472806
Image
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 »

Is it a light show or a computer :D :D :D
David
Image
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley »

Looking at this again with a view to hacking my seasons to start with spring, I notice that the seasonal February data is flagged as incomplete each leap year (2016, 2012, 2008). But the February in question will actually be from the year following the leap years though.
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley »

Ah, yes, because it is using the season year in cal_days_in_month(). The actual year in say Feb 2016 (seasonal) will be 2017 = 28 days, but lookup will find 29 days.

So, the checks need to be something like this...

Code: Select all

                        $dayCnt = cal_days_in_month(CAL_GREGORIAN, $m_offset[$m], $typeS_year[$d] + ($m_offset[$m] < 3 ? 1 : 0));
                        $short =  (count($turd) < $dayCnt) ? '*' : '';
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by freddie »

mcrossley wrote: Fri 22 May 2020 3:23 pm

Code: Select all

                        count($turd)
I was always taught to give my variables meaningful names :lol: :lol: :lol:
Freddie
Image
User avatar
beteljuice
Posts: 3292
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 »

@Mark

How many years have I been debugging this and you still find errors ? :cry:

@freddie

Nothing like processing waste, plus it reflects the beteljuices demeanour at the (recoding) time ;)

@ALL

I'll have a investigate sometime, I need to include the small cookies mod anyway.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by mcrossley »

beteljuice wrote: Fri 22 May 2020 4:51 pm @Mark

How many years have I been debugging this and you still find errors ? :cry:
We aim to please! My version is now fixed I think.
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by freddie »

beteljuice wrote: Fri 22 May 2020 4:51 pm@freddie

Nothing like processing waste, plus it reflects the beteljuices demeanour at the (recoding) time ;)
:lol: :lol:
Freddie
Image
Sadgit
Posts: 192
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: Yet Another Dayfile Reader (PHP)

Post by Sadgit »

mcrossley wrote: Fri 22 May 2020 5:26 pm
beteljuice wrote: Fri 22 May 2020 4:51 pm @Mark

How many years have I been debugging this and you still find errors ? :cry:
We aim to please! My version is now fixed I think.
and where would I find a copy of this illusive SQL version please? I looked at the source of your Mark and it comes back with "tough the password is changed" :D :D
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: Yet Another Dayfile Reader (PHP)

Post by sfws »

Sadgit wrote: Sun 07 Jun 2020 8:32 am I looked at the source of your Mark and it comes back with "tough the password is changed" :D :D
Try the more obscure value "?view=getorfmiland". No promises that it will work, but I do recognise the message you saw being output. The developer who uses the querystring I quote codes his scripts to output that message if someone uses a different querystring. Some of the other posts in this very topic identify the developer and the fun he has with obscure text.


For more information on viewing source PHP with all the different approaches seen, please read my post at viewtopic.php?f=14&t=16425&p=126065 where I tried and failed to get a more consistent approach adopted by all those contributing PHP scripts here.
Sadgit
Posts: 192
Joined: Sun 04 Jan 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: Yet Another Dayfile Reader (PHP)

Post by Sadgit »

nice one thanks, that works! however pity I haven't a clue how to get what I wanted from it.. text file version it is then :D
stewartwlewis
Posts: 38
Joined: Sat 29 Jan 2011 7:08 pm
Weather Station: Davis VP2 Plus
Operating System: Rasbian on RPI
Location: Durham, Co Durham
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by stewartwlewis »

Hi
I think these graphs look great and just what I was looking for to let others see my hsitoric weather information but Iam having a bi tof trouble getting this to work.
I have a standard Cumulus web implementation and dropped the PHP include, CCS and jquery references into my standard page. Then copied dayfile.txt to a data directory above my weather directory. When I go to the page I get the default 2020 max temperature table and all the data looks fine but when I try and change to any of the charts or other years from the buttons or dropdown I get a page not found error.
GET http://www.stewartwlewis.com/betel_read ... =0&lang=en 404 (Not Found)
Looking at the GET command it's missing a "dot" in the filename betel_readDayfile.php.
I have added the name of the file correctly in betel_readDayfile.php as:-
$this_file_name = basename(betel_readDayfile.php);
I have checked the data in dayfile.txt using the data file check facility in cumulusutils and I can get any page to display by adding the dataset name and year to the URL so it doesn’t look like a data error.
Turning on error reporting in YADR just gives data error!!!
The PHP logs don’t contain any information.
My historic tables page is:-
http://www.stewartwlewis.com/historictables.php
Version of YADR is Release..V7.1.3
PHP version: 7.2.7
CumulusMX version v3.6.5 (3081)

I am sure it's something trivial that I have got wrong but just cant find the problem.
Grateful for any help and happy to provide any additional information that might help.

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

So why have you changed this:

Code: Select all

$this_file_name = "betel_readDayfile.php"; // If you want to change the name of this file, change this TOO !
to

Code: Select all

$this_file_name = basename(betel_readDayfile.php);
It shouldn't be required, but at the very least it should be "quoted"

Hmm ... your weatherstyles.css is interfering with the betel_datasummary.css

In betel_datasummary.css add

width: auto;

at the end of #table_menu li {
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply