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
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Paul C »

OK

Uploaded new version and worked straight away

But isnt picking up new data for the last few days, guessing I dont have the right path for the dayfile etc ?

Can someone please remind me on how to get that right please. Looking at how my website is setup it looks like all my files get uploaded into a file called public_html

Thanks
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by BCJKiwi »

If your dayfile.txt is in the same folder as betel_readDayfile.php
Change:-
$dayfile = 'data/dayfile.txt'; // to work correctly this should be a relative address NOT full url
to
$dayfile = 'dayfile.txt'; // to work correctly this should be a relative address NOT full url
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 »

Hi Paul;
... uploaded into a file called public_html
That is simply your 'root' or base folder / directory.

You can create and organise as many directories as you need to emulate your old site and ensure uploads go to the right place ;)
Image
......................Imagine, what you will KNOW tomorrow !
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

Non-English help please ....

Post by beteljuice »

The beteljuice has nearly finished some major improvement for Sun Hours display ....

I need 'foreign' help please with new phrases in the language files - at present they are best google guess but may be inappropriate / syntactically wrong.

Current supported languages: cs, de, en, es, fi, fr, it, nl, no, pl, pt.

Please look at the test site below, Sunshine Hours and look at the wording in the 'Note' below the selection drop-down box.
For:
Test option '0' longest day (daily table)
Test option '1' daily max (daily table AND seasonal table)
any other test option (daily table)

ROUGH TEST PAGE HERE
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
Paul C
Posts: 538
Joined: Thu 19 Jun 2008 7:45 am
Weather Station: Davis VP2 with solar
Operating System: Windows 10
Location: Brampton, Cumbria, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Paul C »

beteljuice wrote:Hi Paul;
... uploaded into a file called public_html
That is simply your 'root' or base folder / directory.

You can create and organise as many directories as you need to emulate your old site and ensure uploads go to the right place ;)
All sorted thanks, new php file worked a treat

many thanks
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
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

*** IMPORTANT UPDATES ***

Post by beteljuice »

The beteljuice has finished some major improvements for Sun Hours display including sun possible graph and mouse-over info, plus choice of max hours graph scale length.

All things 'Sun' related allow kit upgrade / multiple failure dates so zeros can now be valid.

ALL files have some changes :shock:

*** ALWAYS back-up your existing stuff, if only to remember your site specific settings ! ***

Away to first page for download - and don't forget to READ the How To .... file !!!!
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
ConligWX
Posts: 1571
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by ConligWX »

Thanks for the update and hard work!
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir •

Image
92merc
Posts: 59
Joined: Wed 15 Feb 2017 6:07 pm
Weather Station: Davis VP2
Operating System: Windows 11 Pro
Location: Bismarck, ND USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc »

Got everything working, almost. Having an issue with my wind values. Even though I have wind units set to mph, all three of my wind numbers are reading km/h at the top.

https://www.bismarckweather.net/dayfile2/basic.php
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 »

Everything Looks OK to me ..... have you fixed it ?
Image
......................Imagine, what you will KNOW tomorrow !
92merc
Posts: 59
Joined: Wed 15 Feb 2017 6:07 pm
Weather Station: Davis VP2
Operating System: Windows 11 Pro
Location: Bismarck, ND USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc »

No. All three wind values are showing kilometers per hour instead of miles per hour.
92merc
Posts: 59
Joined: Wed 15 Feb 2017 6:07 pm
Weather Station: Davis VP2
Operating System: Windows 11 Pro
Location: Bismarck, ND USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc »

OK, something must have been cached somewhere. Now it's appearing right.

However, I'd like to integrate it into my Saratoga scripts. I'm trying to put a new PHP file from Saratoga's blank script here:
https://www.bismarckweather.net/dayfile2.php

But my actual dayfiles currently in the /dayfile2 folder. Getting this error you can see if you click on the link.
Failed to open day file.
92merc
Posts: 59
Joined: Wed 15 Feb 2017 6:07 pm
Weather Station: Davis VP2
Operating System: Windows 11 Pro
Location: Bismarck, ND USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc »

Here is the PHP file I used BTW.
dayfile2.txt
You do not have the required permissions to view the files attached to this post.
User avatar
PaulMy
Posts: 3777
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by PaulMy »

I've monkeyed with the file a bit so likely that is the cause of my issues of not showing the new sunshine feature and haven't had a chance to get everything restarted from scratch.
http://www.komokaweather.com/weather/be ... ayfile.php
It initially opens but if I click on another element it stays on "getting data ..." until I actually refresh the url.

Enjoy,
Paul
Davis Vantage Pro2+
C1 www.komokaweather.com/komokaweather-ca
MX www.komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX www.komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX www. komokaweather.com/cumulusmx4/index.htm

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 »

92merc wrote:...
However, I'd like to integrate it into my Saratoga scripts. I'm trying to put a new PHP file from Saratoga's blank script here:
https://www.bismarckweather.net/dayfile2.php

But my actual dayfiles currently in the /dayfile2 folder. Getting this error you can see if you click on the link.
Failed to open day file.
Did you see the saratoga example in the "How To ...." file ?

You don't have the css files loading in your page, and did you notice These  in your page ?
That means you've been editing and NOT saved as UTF-8 (NO BOM) and / or your page isn't UTF-8.

You have:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Whereas it should be:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

It looks like you are including everything in the wrong way - from the saratoga example in the HowTo file

Code: Select all

<div id="datsum">
   <div id="tableData">
      <?php include('betel_readDayfile.php');?>
   </div>
</div>
<div id="tableData"> .... </div> is the 'holder' where the content is injected.

Have a tinker and come on back .....

P.S.
If your weather page and betel_readDayfile are in your web 'root' then the path to your data would be:-
$dayfile = '/dayfile2/dayfile.txt' (root address)
Image
......................Imagine, what you will KNOW tomorrow !
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 »

PaulMy wrote:I've monkeyed with the file a bit so likely that is the cause of my issues of not showing the new sunshine feature and haven't had a chance to get everything restarted from scratch.
http://www.komokaweather.com/weather/be ... ayfile.php
It initially opens but if I click on another element it stays on "getting data ..." until I actually refresh the url.

Enjoy,
Paul
Looks like you forgot the 'holder' <div id="tableData">... </div> as well ! :D

... but you may be having problems with $this_file_name = basename(__FILE__);
ie. You are trying to call another version of the file (in a different location)
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply