Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

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

Legacy Cumulus 1 release 1.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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Yet Another Dayfile Reader (PHP)

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

Moderator: daj

User avatar
mcrossley
Posts: 14382
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 »

Well Cumulus won't invent it ;) just to be clear, you see decimal values on the dashboard other than x.0?

If you don't, then there is no point is displaying the decimal and you could set it to 0 in the settings.
92merc
Posts: 68
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 »

Is the dayfile reader compatible with the new V4?
User avatar
mcrossley
Posts: 14382
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 »

Yes
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Dador »

Hi,

I recently updated php on the server to version 8.3.7 and accidentally discovered that some data in the betel_readDayfile.php script (SunHours, EVT, HighUV) is not working. The rest works fine. I installed the latest version 7.1.4 but it didn't help.

Please note that my dayfile.txt file has changes. For example, when I didn't have a UV sensor, I put blanks instead of the default value of "0.0". In the php version 7.4.33 that I am currently using, everything works.

Does anyone have an idea what I can change in betel_readDayfile.php to make it compatible with php 8.3?
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by ConligWX »

Dador wrote: Mon 03 Jun 2024 9:06 am Hi,

I recently updated php on the server to version 8.3.7 and accidentally discovered that some data in the betel_readDayfile.php script (SunHours, EVT, HighUV) is not working. The rest works fine. I installed the latest version 7.1.4 but it didn't help.

Please note that my dayfile.txt file has changes. For example, when I didn't have a UV sensor, I put blanks instead of the default value of "0.0". In the php version 7.4.33 that I am currently using, everything works.

Does anyone have an idea what I can change in betel_readDayfile.php to make it compatible with php 8.3?
unless you post the error, how can we suggest a fix? the code will need to be changed more likely due to depricated code.
water01
Posts: 3669
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 »

It would help if you told us what PHP error the dayfile reader is giving and which lines. The PHP code in the reader is compatible with PHP 7.x but not *.x and I think I modified mine but cannot remember what I did!!
David
Image
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Dador »

It's hard for me to enter any errors when the browser doesn't display them. After clicking on e.g. EVT, the page is empty, without any message.
I tried to paste something about ignoring errors into the script, but it didn't work.
It looks like the new php doesn't accept empty fields.
water01
Posts: 3669
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 »

Can you look for the php errors log on your server?
David
Image
water01
Posts: 3669
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by water01 »

OK I switched my PHP to PHP 8.0.30 and mine is working correctly.

Have attached the source as I cannot remember what I changed!!
You do not have the required permissions to view the files attached to this post.
David
Image
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Dador »

Ok,

but if you want, you can check if the script will work in php 8.
Just remove the random value (temp, hum, solar, etc.) in dayfile.txt on server and see what happens.

e.g.

Code: Select all

02/06/24,27,169,07:24,13.5,23:46,19.6,(...)
02/06/24,27,169,07:24,13.5,23:46,, <- empty field
In version 7.4 this is possible, in version 8.* probably not.
User avatar
PaulMy
Posts: 4355
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 »

Please note that my dayfile.txt file has changes. For example, when I didn't have a UV sensor, I put blanks instead of the default value of "0.0". I
Were these 'blanks' created through the CreateMissing utility or another way?

I am running CMXv4 and PHP 8.0 with GoDaddy and that works fine. I have not tried a later PHP version.
My dayfile did not have sunhours until I got the B-L sunrecorder in 2011, and then in 2018 I upgraded to VP2 Plus which included UV and solar. Running the CreateMissing when Mark introduced this that filled in all the missing fields since 2008 with 0.0 or 0.00.

Enjoy,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Dador »

PaulMy wrote: Mon 03 Jun 2024 2:50 pm Were these 'blanks' created through the CreateMissing utility or another way?
Yes, you could say that I manually removed the "0.0" values.
User avatar
meteosangonera
Posts: 64
Joined: Thu 07 Jun 2018 2:17 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by meteosangonera »

Hi,

I have the same problem as @water01
water01 wrote: Mon 03 Jun 2024 10:10 am It would help if you told us what PHP error the dayfile reader is giving and which lines. The PHP code in the reader is compatible with PHP 7.x but not *.x and I think I modified mine but cannot remember what I did!!
But even weirder, I'll quickly comment:

I have three versions of DayfileReader, two work and one does not.

The version of my weather station is working properly.
https://www.meteosangonera.es/meteo/vis ... /basic.php

In addition, I have two versions to read the data from the official weather station in my area:

The first one, I modified it to work with data from the 20th century (1900). It works correctly.
https://www.meteosangonera.es/meteo/vis ... /basic.php

The second is for data from the year 2000 onwards. It is precisely this one that does not work.
https://www.meteosangonera.es/meteo/vis ... /basic.php

The error shown is:

Code: Select all

[03-Jun-2024 17:36:35 UTC] PHP Fatal error:  Uncaught TypeError: cal_days_in_month(): Argument #3 ($year) must be of type int, string given in /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/betel_readDayfile.php:1393
Stack trace:
#0 /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/betel_readDayfile.php(1393): cal_days_in_month(0, 1, '200-1')
#1 /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/betel_readDayfile.php(2430): drawCalendar('2024')
#2 /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/basic750.php(11): include('/home/elvtogcd/...')
#3 {main}
  thrown in /home/elvtogcd/public_html/meteo/visordiarioalcantarilla/betel_readDayfile.php on line 1393
The corresponding line is:

Code: Select all

 $short =  (count($turd) < cal_days_in_month(CAL_GREGORIAN, $m_offset[$m], $typeS_year[$d]) ? "* " : ""); // doesn't matter about 'previous' December - will always be 31
I can't find a way to solve it, although I think it must be related to the solar information, as I gather from that line.
User avatar
Super-T
Posts: 906
Joined: Tue 09 Sep 2008 3:37 am
Weather Station: wh-1081
Operating System: Weather Laptop - Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by Super-T »

My betel dayfile reader stopped working a few days ago as if a timeout happened or a date expired. Nothing has changed on my website and I was wondering if anyone else has the same problem before I go delving into why it stopped?

If you goto History on my first page you will see if it works for you.
AndyKF650
Posts: 818
Joined: Thu 20 Aug 2020 8:35 am
Weather Station: Davis VP2 Plus
Operating System: RPiv5B 64bit Linux 12 Bookworm
Location: Jersey Channel Islands
Contact:

Re: Yet Another Dayfile Reader (PHP)

Post by AndyKF650 »

Hi Terry

I looked at your history page and there is no information, just a blank screen. My beteljuuice dayfile reader works just fine.

I expect that you have changed a link to it. Good luck with the problem solving.
Post Reply