Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.3.0 (build 4063) - 04 December 2024

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

PHP script to display monthly/yearly snow depth totals from diary.db

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

Moderator: daj

surban21
Posts: 42
Joined: Wed 07 Dec 2016 1:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by surban21 »

Scripts have been updated to ver 1.0 - 03-20-2023

Added jqueryUI dialog popup. When clicking on any monthly snowfall amount in the main snowfall table, the daily amounts for that month will pop up in a calendar style dialog. You can view a pic of this on the first page. Notice: For those that have already installed my previous scripts, you will need to install all of version 1.0 scripts except for snowSumData.txt. You will not loose any data.

The download zip file is on the first page of this thread if you're interested.
surban21
Posts: 42
Joined: Wed 07 Dec 2016 1:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by surban21 »

Scripts have been updated to ver 1.1 - 04-10-2023

Added a new HTML table containing the following items by month;

* Cumulative days with snowfall
* Cumulative snowfall depth
* Average annual snowfall depth
* Probability of snowfall %
* Year with most snowfall and its amount
* Year with least snowfall and its amount

Also re-wrote large portions of the script for better optimization.

If you're interested the file can be downloaded from the first post of this thread.
User avatar
Dador
Posts: 307
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by Dador »

The new winter season 2024/2025 has arrived, but it turns out that the script does not work. Could it be CMX's fault or PHP version 8.x?
weatherbee
Posts: 24
Joined: Sat 16 Mar 2024 7:02 pm
Weather Station: WS-5000
Operating System: Windows 11
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by weatherbee »

It's working for me. I'm using Cumulus MX v4.2.1 build 4043 and using php 8.2.
Maybe a file got corrupted.
Tom
Image
surban21
Posts: 42
Joined: Wed 07 Dec 2016 1:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by surban21 »

Dador wrote: Mon 25 Nov 2024 8:44 pm The new winter season 2024/2025 has arrived, but it turns out that the script does not work. Could it be CMX's fault or PHP version 8.x?
Dador - each year the "new" season will not show until you make the first entry for that season. It does not automatically roll over.
User avatar
HansR
Posts: 6541
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by HansR »

Dador wrote: Mon 25 Nov 2024 8:44 pm The new winter season 2024/2025 has arrived, but it turns out that the script does not work. Could it be CMX's fault or PHP version 8.x?
You might try the Cutils snow reporting when the new CMX is released (which contains the new snow database).
Hans

https://meteo-wagenborgen.nl
CMX build 4039+ ● RPi 4B ● Linux 6.6.51+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Dador
Posts: 307
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by Dador »

surban21 wrote: Wed 27 Nov 2024 6:07 pm
Dador wrote: Mon 25 Nov 2024 8:44 pm The new winter season 2024/2025 has arrived, but it turns out that the script does not work. Could it be CMX's fault or PHP version 8.x?
Dador - each year the "new" season will not show until you make the first entry for that season. It does not automatically roll over.
I noted snowfall a few days ago and entered it in my diary. However, the new season has not appeared. I didn't change anything in the settings. For now, I don't know what doesn't work.
Last edited by Dador on Wed 27 Nov 2024 7:40 pm, edited 1 time in total.
User avatar
Dador
Posts: 307
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by Dador »

HansR wrote: Wed 27 Nov 2024 6:14 pm
Dador wrote: Mon 25 Nov 2024 8:44 pm The new winter season 2024/2025 has arrived, but it turns out that the script does not work. Could it be CMX's fault or PHP version 8.x?
You might try the Cutils snow reporting when the new CMX is released (which contains the new snow database).
Of course I will test it. :D
I'm waiting for the official release of CMX 4.3 and Cutils 7.3
surban21
Posts: 42
Joined: Wed 07 Dec 2016 1:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by surban21 »

For now, I don't know what doesn't work.
Dador - I suggest re-reading the install instructions to verify nothing was changed or corrupted. I would also suggest looking at or reinstall the SnowSumData.php file and adjust the USER DEFINED VARIABLES in that file to suit your location. This file creates the text file of the same name which gets uploaded to your website. Mine works as designed as did weatherbee's. I know yours has been heavily modified by you for your needs and maybe that could have broke something but I know that yours did work previously.
User avatar
Dador
Posts: 307
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by Dador »

surban21 wrote: Thu 28 Nov 2024 12:35 pm
For now, I don't know what doesn't work.
Dador - I suggest re-reading the install instructions to verify nothing was changed or corrupted. I would also suggest looking at or reinstall the SnowSumData.php file and adjust the USER DEFINED VARIABLES in that file to suit your location. This file creates the text file of the same name which gets uploaded to your website. Mine works as designed as did weatherbee's. I know yours has been heavily modified by you for your needs and maybe that could have broke something but I know that yours did work previously.
Thanks for the tips. Do you have any alternative to xampp that would work with your script? I think it might have been his fault.
surban21
Posts: 42
Joined: Wed 07 Dec 2016 1:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by surban21 »

Check your SnowSumData,txt file that gets uploaded to your website which contains the weather diary data. Look for fTimestamp toward the end of the file and see if the last date you made an entry in CMX is in there. If not, then verify in Extra Web Files inside CMX that it looks something like this below:

Screenshot Extra web files - Cumulus MX.png

Of course use your own directory paths where the snowSumDataT.txt file is located and where you want the converted snowSumData.txt to be uploaded.
You do not have the required permissions to view the files attached to this post.
User avatar
Dador
Posts: 307
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by Dador »

I reinstalled the original version 1.1.
My problem is that php-win.exe doesn't seem to work for me. I reinstalled xampp, turned off UAC in windows, because xampp had a problem with it. However, it still doesn't work. The snowSumData script is not executed locally on my computer.

In xampp don't work only Tomcat.
You do not have the required permissions to view the files attached to this post.
freddie
Posts: 2778
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by freddie »

You don't need Tomcat for PHP. Different technologies.
Freddie
Image
surban21
Posts: 42
Joined: Wed 07 Dec 2016 1:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by surban21 »

Dador - since it sounds like a problem with your php and you reinstalled xampp, check the php.ini file and search for sqlite. Look for extension=pdo_sqlite and if there is a semi-colon ( ; ) in front of it, delete the semi-colon and save the ini file. I seem to remember that I had to do this when I installed xampp/php. I could be wrong but something to check anyway.
User avatar
Dador
Posts: 307
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: PHP script to display monthly/yearly snow depth totals from diary.db

Post by Dador »

I did as you indicated, but it still doesn't work.
I noticed that the snowSumDataT.txt file stopped overwriting on October 2, 2024, and CMX 4.2 was released on October 1. I wonder if it's CMX's fault.

Edit:
In release 4.2.0 [b4039] - 2024-10-01 I found such changes.

Changed
External Programs now sets the working directory to the location of the executable/script rather than the Cumulus MX home directory - (Here I don't understand what the change has been)

Package Updates
SQLite: Reverted to v2.1.8 pending fix from author

Perhaps one of the above options prevents the script from being executed by CMX. Both my CMX installations where I use the snowSummary.php script stopped overwriting after installing version 4.2.0
Post Reply