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

Yearly Data Summary

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Yearly Data Summary

Post by daj »

A PHP version is also now included in the 'pack'

http://wiki.sandaysoft.com/a/AnnualDataSummary

Functionality, control and configuration are identical in both version. To re-iterate, the PHP version in theory is faster as all the work is done on the webserver and only the results sent to the users browser. Whereas the JS (Javascript) version sends all data to the browser for processing. With a decent browser and only a few years of data in the dayfile you will probably not notice the difference. Use IE7 and you might just notice a pause with the JS version.

If you are happy with the JS version already no need to change as they both do exactly the same thing.

I just thought I would offer some flexibility

Sample (one is php the other is JS)...
http://grantownweather.co.uk/ds/datasummary.php
http://grantownweather.co.uk/ds/datasummary.html
(did you spot the different, no!)

Enjoy
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
User avatar
GraemeT
Posts: 312
Joined: Wed 21 Oct 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7, 10, 11
Location: Bayswater, Australia
Contact:

Re: Yearly Data Summary

Post by GraemeT »

Now you've gone and taken ALL the work out of it. :lol:

Thanks David.
Cheers,
Graeme.
Graham64
Posts: 74
Joined: Mon 23 Aug 2010 5:04 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows XP
Location: Cornwall, England
Contact:

Re: Yearly Data Summary

Post by Graham64 »

David

I wanted to add 'Bright sunshine hours' to the annual summary and because your program is so concise and easy to follow I have managed it, even with a very low knowledge of JS (see http://poundstockpacket.org.uk/datasummary.html)

My only problem now is to make the table narrower so that it fits with the rest of my website. I have altered the css and reduced widths and margins but do not understand one thing. How have you got the font for the Min/Max readings to be smaller than the other data sets? I can't see how the css does it.

Thanks for a brilliant addition to the software. I am finding it a great introduction to learning Javascript and PHP. My next task is to get the sun hours working in PHP.

Graham
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Yearly Data Summary

Post by daj »

Graham

Line 25 of your version of the CSS

#table_container .smallfont { font-size: 70%;}

I apply the 'smallfont' class to the data cells if I am showing two sets of figures (i.e. Max & Min) at once

I intend to offer more data sets on the table once version 1.9.1 of Cumulus comes out of beta. I tend not to develop anything for a beta version of Cumulus just in case anything changes
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
Graham64
Posts: 74
Joined: Mon 23 Aug 2010 5:04 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows XP
Location: Cornwall, England
Contact:

Re: Yearly Data Summary

Post by Graham64 »

David

Thanks for the css/JS explanation. I think I understand! I now need to look more closely at the reason for the different values of dayfilecol2 (perhaps tomorrow).

I did wonder if you were deliberately restricting values to those in 1.9.0. But I thought that it was a good opportunity for me to learn more about JS by including the sun hours.

Thanks for your help.

Graham
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: Yearly Data Summary

Post by Super-T »

Having a problem with the correct naming of the source of the dayfile.txt
Java works ok as var dayfile='/weather/data/dayfile.txt'; but PHP can't find the file as $dayfile='/weather/data/dayfile.txt';

http://www.janter.co.nz/weather/data/datasummary.php
DaveNZ
Posts: 373
Joined: Mon 07 Dec 2009 10:27 pm
Weather Station: Davis VP2
Operating System: Windows 7 64-bit
Location: Howick, Auckland, New Zealand
Contact:

Re: Yearly Data Summary

Post by DaveNZ »

Super-T wrote:Having a problem with the correct naming of the source of the dayfile.txt
Java works ok as var dayfile='/weather/data/dayfile.txt'; but PHP can't find the file as $dayfile='/weather/data/dayfile.txt';

http://www.janter.co.nz/weather/data/datasummary.php
Yeah, / at the beginning doesn't work as you would expect with PHP - as PHP is looking at the folder structure of the whole site, not just the public html folder.

I would use

Code: Select all

$dayfile= $_SERVER['DOCUMENT_ROOT'] . "/weather/data/dayfile.txt";
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Yearly Data Summary

Post by daj »

Terry

As Dave has said, the PHP path to dayfile.txt will be different for JS or PHP version.

Remember, PHP runs on the server so the path is relative to where the server finds the file, often it will start with public_html/ or /www, etc.

JS runs on the users browser so the path is relative to what the browser sees
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yearly Data Summary

Post by nitrx »

Well I don't understand what to fill out for the dayfile.txt the complte path is http://www.apeldoorn.tk/weer/realtime.txt but I don't get output http://www.apeldoorn.tk/weer/datasummary.php stupid paths :roll:
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Yearly Data Summary

Post by daj »

You need to know where you upload your files to. The 'directory' listed in the Cumulus Internet settings probably needs included.

Anyway, try this and the system should work it out...

$dayfile= $_SERVER['DOCUMENT_ROOT'] . "/weer/dayfile.txt";
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yearly Data Summary

Post by nitrx »

daj wrote:You need to know where you upload your files to. The 'directory' listed in the Cumulus Internet settings probably needs included.

Anyway, try this and the system should work it out...

$dayfile= $_SERVER['DOCUMENT_ROOT'] . "/weer/dayfile.txt";
Doen't work either already tried...
User avatar
nitrx
Posts: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Yearly Data Summary

Post by nitrx »

Oeps my fault filled out a wrong delimiter sorry , thanks , have some coffee :oops:
SouthUistWX
Posts: 12
Joined: Wed 08 Dec 2010 8:15 pm
Weather Station: Davis VP2
Operating System: Windows 7
Location: Isle of South Uist
Contact:

Re: Yearly Data Summary

Post by SouthUistWX »

I think i must be doing something wrong with this. The page seems to load up OK when i first navigate to it http://www.southuist-weather.info/datasummary.php but when i then choose one of the other options (Min temp, Av temp, Min/Max etc.) i keep getting an error message.

my readDayfile.php, datasummary.php, datasummary.css and my dayfile.txt are all in the same directory

Doesn't help matters much in that i don't really know what the heck i'm doing :lol:

Thanks, any help gratefully received!
---------------------------------------------------------------------------------------------
Image
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: Yearly Data Summary

Post by daj »

Sounds like your webserver may be on an old version of PHP

Create a text file with the following content

Code: Select all

<?php
echo 'Current PHP version: ' . phpversion();
?>
Save as version.php (or anything you wish with a .php at the end)
Upload the file to your webserver
In your webbrowser, open the file... http://www.southuist-weather.info/version.php

What version does it report?
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
SouthUistWX
Posts: 12
Joined: Wed 08 Dec 2010 8:15 pm
Weather Station: Davis VP2
Operating System: Windows 7
Location: Isle of South Uist
Contact:

Re: Yearly Data Summary

Post by SouthUistWX »

Hi David

Yes, i think you are right, I checked the php version on the server just a couple of days ago as there was something else i couldn't get to work - it says php version 4.4.9

Thanks

Yvonne
---------------------------------------------------------------------------------------------
Image
Locked