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 4017) - 17 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
PaulMy
Posts: 3775
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 »

pressing F12 says I am missing weatherstyle.css:1 ?
where is that supposed to come from please
weatherstyle.css was one of the standard files in the previous \webfiles folder but is no longer used in the current default template. I still have that weatherstyle.css on my site.
I have it attached but renamed as .txt
It is easiest and avoids path issues if the script files are added to the same folder as the default webfiles.

Enjoy,
Paul
You do not have the required permissions to view the files attached to this post.
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
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 »

Another clue as to why it is failing is

Code: Select all

FATAL ERROR - Language File FAIL !!
A language file is mandatory and one of the first checks. So you will at barest minimum have your language set to en and the file betal-dayfile-langauges.php has to be available in the same place as betal-readDayfile.php.

Code: Select all

// language ........
$default_lang = 'en'; // 'look-up' array to use if not passed or defined elsewhere

// get language files - nothing for you here !!
(@include_once 'betel_dayfile_languages.php') OR die('FATAL ERROR - Language File FAIL !!');
As you can see if you don't the php at that point exits with a fatal error before it has done anything.
David
Image
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 »

Sorry chaps this is just not working for me at all - I havent touched anything to do with language.

Can you help further in very simple terms please.

1. Do you have a page I could use as a template - all I need is a blank page but with the correct php code on
2. Do I upload all the contents of the betel folder to my website and call the folder betel eg bramptonweather.co.uk/betel
3. If I upload the files to that folder, and the dayfile.text is in bramptonweather.co.uk/dayfile.txt - the php will be left as it is and not altered ?
4. Is there anything else to do ?

Clearly the code I have copied from the download folder doesnt work when I added it to one of the CumulusMx templates, so I think I need to start from nothing. However I have tried this aswell this morning and that didnt work either.

Thankyou for your help
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
flort
Posts: 213
Joined: Thu 17 Dec 2020 9:06 am
Weather Station: Davis Vantage Vue
Operating System: Raspbian GNU/Linux 10 (buster)
Location: Tin Can Bay, Queensland, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by flort »

Hi Paul,

It would appear you haven't quite got all the right files nor placed them in the correct location. To start from scratch do the following -

1. From the first page of this post download 'beteljuice_7_1_4.zip'.
2. Just below this you will also find 'yadr.zip' which you need to download. This contains your template file to work with the Neil Thomas templates.
3. Copy 700betel_datasummary.css to your CSS folder.
4. Ensure the following files are placed in the same folder as your default webfiles -
- yadr.php
- betel_readDayfile.php
- betel_dayfile_languages.php
- daffodil.png
- hatch2.jpg
- leaf.png
- raindrop.png
- snowflake.png
- sun.png
- dayfile.txt

If you follow the above then everything should work without any other configuration. If you want the files in a separate folder then you will need to edit betel_readDayfile.php. There are comprehensive instructions in betel_Dayfile_HowTo.txt which are easy to follow.

Hopefully this will get things going for you.

Regards,
Trevor
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 »

Cheers Trevor !!!! much appreciated :D

At last I have something on my screen.

Its not quiet right, but getting there I think http://www.bramptonweather.co.uk/yadr.php

historical files stop at 2018 ? and the formatting doesnt look right.
You do not have the required permissions to view the files attached to this post.
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
User avatar
PaulMy
Posts: 3775
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 »

Do you have 16 files downloaded from the betel scripts - 4 css, 5 PHP, 6 png images, and 1 HowTo?
And uploaded all the css, PHP and png files to the same place as your dayfile.txt?

Mine is a combination of a very early version 1_4_1 script and all updates to 7_1_4 in 2021.
But I also have a betel_datasummary_mx.css in my website /css folder that does not appear in the current download zips and not sure where that came from. Possibly from a discussion with the beteljuice, or possible for another of his special projects.

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

Hi

Yes I have all those files uploaded, all in the same place ?
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
User avatar
PaulMy
Posts: 3775
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 »

Hi,
There have been many versions over the years, and modifications, i.e. for MXUIwebsite and Saratoga - I have more than a dozen downloads. I just tried the latest on a test site that just has the CumulusMX default website and got it working http://komokaweather.com/cumulusmx4wll/ ... maryCU.php The betel_datasummaryCU.php file is just an old calling file which is not updated and the navigating links don't work, but it shows that the data summary script does work. I have attached all the files that I just uploaded to the test site, including the several .css files beteljuice had included. I presume that uploading these to your site it should work out-of-the-box as long as your dayfile.txt is in the same folder.

Enjoy,
Paul
You do not have the required permissions to view the files attached to this post.
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
flort
Posts: 213
Joined: Thu 17 Dec 2020 9:06 am
Weather Station: Davis Vantage Vue
Operating System: Raspbian GNU/Linux 10 (buster)
Location: Tin Can Bay, Queensland, Australia
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by flort »

Paul C wrote: Mon 24 Jan 2022 1:31 pm Cheers Trevor !!!! much appreciated :D

At last I have something on my screen.

Its not quiet right, but getting there I think http://www.bramptonweather.co.uk/yadr.php

historical files stop at 2018 ? and the formatting doesnt look right.
Hi Paul,

It looks like you have not unzipped the files before copying them across to your server. All of your references are pointing to a location on your local computer rather than your web server.

Code from your page looks like this: (I've highlighted in blue the lines with incorrect references)

<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="weather data">
<meta name="keywords" content="Cumulus, weather, data, weather station">
<meta name="author" content="beteljuice">
<title>Data Summary</title>
<link rel="icon" type="image/png" href="../../../../AppData/Local/Temp/Temp1_yadr.zip/images/favicon.png">

<!-- jQuery library -->
<script src="../../../../AppData/Local/Temp/Temp1_yadr.zip/lib/jquery/jquery-latest.min.js"></script>

<!-- Fonts System will default to a sans-serif font if no Internet connection -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?famil ... splay=swap" rel="stylesheet">

<!-- All Styles -->
<link href="../../../../AppData/Local/Temp/Temp1_yadr.zip/css/w3Pro.css" rel="stylesheet"> <!-- Basic w3shools responsive styles -->
<link href="../../../../AppData/Local/Temp/Temp1_yadr.zip/css/colours.css" rel="stylesheet"> <!-- Slightly enhanced w3schools colours -->
<link href="../../../../AppData/Local/Temp/Temp1_yadr.zip/css/mx-templates.css" rel="stylesheet"> <!-- Specific styles for these templates. -->
<link rel="stylesheet" type="text/css" media="screen" href="../../../../AppData/Local/Temp/Temp1_yadr.zip/css/700betel_datasummary.css" /> <!-- Specific styles for THIS template. -->

<style>

The above should look like this:

<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="weather data">
<meta name="keywords" content="Cumulus, weather, data, weather station">
<meta name="author" content="beteljuice">
<title>Data Summary</title>
<link rel="icon" type="image/png" href="images/favicon.png">

<!-- jQuery library -->
<script src="lib/jquery/jquery-latest.min.js"></script>

<!-- Fonts System will default to a sans-serif font if no Internet connection -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?famil ... splay=swap" rel="stylesheet">

<!-- All Styles -->
<link href="css/w3Pro.css" rel="stylesheet"> <!-- Basic w3shools responsive styles -->
<link href="css/colours.css" rel="stylesheet"> <!-- Slightly enhanced w3schools colours -->
<link href="css/mx-templates.css" rel="stylesheet"> <!-- Specific styles for these templates. -->
<link rel="stylesheet" type="text/css" media="screen" href="css/700betel_datasummary.css" /> <!-- Specific styles for THIS template. -->

<style>

As a test, I just downloaded the files and followed the instructions I gave you and everything worked perfectly, apart from it didn't find dayfile.txt. This was because betel_readDayfile.php has the location of the dayfile in a folder called "data". I edited the location and all was good.

Regards,
Trevor
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 »

Paul/Trevor

Many thanks for your help !! - I have it working, I can see where it went wrong now - cheers

Does the dayfile.txt get automatically uploaded ?

I do appear to be missing a few buttons at the top, rainfall, wind etc

Many thanks
You do not have the required permissions to view the files attached to this post.
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
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 »

I think that is because you have missing parts of the javascript. F12 is showing
Missing JS.jpg
So the page is incorrectly formed as the relevant js script is not being loaded.

Fix those errors and the missing .jpg and I think the buttons will appear as it is obvious that the header part of the page is missing if you look at the right hand column.

And on looking at the source you have the same problem with path for the script that Trevor pointed out.

Code: Select all

		<script src="../../../../AppData/Local/Temp/Temp1_yadr.zip/js/setpagedata.js"></script>	<!--	Utility javascripts for all pages.	-->
You do not have the required permissions to view the files attached to this post.
David
Image
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 »

Cheers

Thats fixed it - thankyou !!

Just one final question hopefully ?

Does the dayfile.txt get automatically uploaded

thanks all
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
User avatar
PaulMy
Posts: 3775
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 »

Hi Paul,
Does the dayfile.txt get automatically uploaded
No, dayfile.txt does not by default get updated to your website. However you can add it to your CumulusMX Extra web files settings to then automatically upload at end of day. See attached, but you must use YOUR local filename path and YOUR remote filename path.

Enjoy,
Paul
You do not have the required permissions to view the files attached to this post.
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
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 »

All sorted and working

Thank :D you for your help
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
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 »

Morning all

Could someone tell me what the follow values are actually reading please

Wind Speed
Wind Gust

Yesterday was a windy day, Maximum Gust was 54knots ( 62mph) so very windy. Best 10 minute average was 38knots.

Unfortunately the dayfile.txt doesnt appear to have the values listed, showing 29.2knots for gust and 20.5 knots for mean and hence they now show up on my yearly pages effectively as wrong values, looking quickly through my other years they look very low aswell ? http://www.bramptonweather.co.uk/yadr.php
Paul C
Brampton, Cumbria, UK
117m ASL
http://www.bramptonweather.co.uk
Image
Post Reply