Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See the Wiki for download

Yet Another Dayfile Reader (PHP)

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

User avatar
Paul C
Posts: 377
Joined: Thu Jun 19, 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 » Sun Oct 14, 2018 7:36 pm

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

BCJKiwi
Posts: 868
Joined: Mon Jul 09, 2012 8:40 pm
Weather Station: Davis VP2 Cabled with Solar
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by BCJKiwi » Sun Oct 14, 2018 10:09 pm

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: 2504
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Sun Oct 14, 2018 10:14 pm

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: 2504
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Non-English help please ....

Post by beteljuice » Sun Oct 14, 2018 10:38 pm

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: 377
Joined: Thu Jun 19, 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 » Mon Oct 15, 2018 5:53 pm

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

User avatar
beteljuice
Posts: 2504
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

*** IMPORTANT UPDATES ***

Post by beteljuice » Thu Oct 18, 2018 12:00 am

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: 726
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.5 Stretch
Location: Bangor, NI
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by ConligWX » Thu Oct 18, 2018 1:24 am

Thanks for the update and hard work!
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2 Plus - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS Templates

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

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc » Fri Oct 19, 2018 2:15 pm

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: 2504
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Fri Oct 19, 2018 2:31 pm

Everything Looks OK to me ..... have you fixed it ?
Image
......................Imagine, what you will KNOW tomorrow !

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

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc » Fri Oct 19, 2018 3:07 pm

No. All three wind values are showing kilometers per hour instead of miles per hour.

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

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc » Fri Oct 19, 2018 4:47 pm

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: 43
Joined: Wed Feb 15, 2017 6:07 pm
Weather Station: Davis VP2
Operating System: Windows 10 Pro
Location: Bismarck, ND USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by 92merc » Fri Oct 19, 2018 5:23 pm

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: 1707
Joined: Sun Sep 28, 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 » Fri Oct 19, 2018 7:08 pm

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

User avatar
beteljuice
Posts: 2504
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Fri Oct 19, 2018 9:08 pm

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: 2504
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Yet Another Dayfile Reader (PHP)

Post by beteljuice » Fri Oct 19, 2018 9:22 pm

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