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 4018) - 28 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 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
Top 10 Records Page
Moderator: daj
- rogerthn
- Posts: 489
- Joined: Thu 11 Apr 2013 6:31 pm
- Weather Station: Ecowitt GW1000/GW1003
- Operating System: Raspberry Pi OS bullseye aarch64
- Location: Trollhättan Sweden
- Contact:
Re: Top 10 Records Page
No idea why but I guess that my php file shouldn't be used as it is.mcrossley wrote:Same here, response header = Content-Length: 0N0BGS wrote: the source link returns a blank page.
--Kurt
Edit: Opera do show the source for me.
- mikechristelow
- Posts: 165
- Joined: Wed 01 Feb 2012 9:33 pm
- Weather Station: Watson W8681 (solar)
- Operating System: Windows XP SP3
- Location: Crewe, Cheshire
- Contact:
Re: Top 10 Records Page
Ha! Is this do-able with javascript?
http://www.christelow.co.uk
“It's snowing still," said Eeyore gloomily.
"So it is."
"And freezing."
"Is it?"
"Yes," said Eeyore. "However," he said, brightening up a little, "we haven't had an earthquake lately.”
“It's snowing still," said Eeyore gloomily.
"So it is."
"And freezing."
"Is it?"
"Yes," said Eeyore. "However," he said, brightening up a little, "we haven't had an earthquake lately.”
- mcrossley
- Posts: 12695
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
Sure, but it wouldn't be easy! You would have to download the dayfile.txt file and parse it in the browser to extract the data you want.mikechristelow wrote:Ha! Is this do-able with javascript?
- mcrossley
- Posts: 12695
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
Slight update to my page, I have added the highlighting of entries within the last 7 days, this month, or this year.
http://weather.wilmslowastro.com/top10s.php
http://weather.wilmslowastro.com/top10s.php
-
- Posts: 60
- Joined: Fri 01 Jun 2012 4:58 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 11 Home
- Location: New Forest. UK
- Contact:
Re: Top 10 Records Page
I now have a Top10s page working on my local server - thanks for the code, Mark.
However, due to a transmitter battery failure in November when I was away from home (Sod's Law!) and a seized anemometer this time last year, some of the recorded data for these periods didn't change and is now filling up some of the Top 10 "Smallest" tables eg. Daily Temp Range, Daily Humidity Range, Lowest Max Wind Gust & Min Daily Wind Run. Screen shot attached.
Is there any way I can remove the relevant data in the log files for the affected days? Are spaces allowed in the data fields and if so, what effect might any changes have when writing to or reading from the SQL database?
Thanks .......... Peter
However, due to a transmitter battery failure in November when I was away from home (Sod's Law!) and a seized anemometer this time last year, some of the recorded data for these periods didn't change and is now filling up some of the Top 10 "Smallest" tables eg. Daily Temp Range, Daily Humidity Range, Lowest Max Wind Gust & Min Daily Wind Run. Screen shot attached.
Is there any way I can remove the relevant data in the log files for the affected days? Are spaces allowed in the data fields and if so, what effect might any changes have when writing to or reading from the SQL database?
Thanks .......... Peter
You do not have the required permissions to view the files attached to this post.
- mcrossley
- Posts: 12695
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
Peter, I would have said that easiset way would be to set the relevant field values for those days to 'null', they will then be ignored by the queries. However the table structure I have inherited is such that the first 17 fields have a null values not allowed flag set. The affected fields are (excluding LogDate which has to be present) HighWindGust HWindGBear THWindG MinTemp TMinTemp MaxTemp TMaxTemp MinPress TMinPress MaxPress TMaxPress MaxRainRate TMaxRR TotRainFall AvgTemp TotWindRun
So if you have invalid data in any of those fields, I can only suggest that you change the table structure to allow nulls on the affected fields, then null out bad values.
To change a field to null, either use the phpMyAdmin console, or run the following command on each column (I have used TotWindRun as an example, you will have to get the data type for each affected column).
ALTER TABLE `TABLENAME` CHANGE `TotWindRun` `TotWindRun` DECIMAL( 5, 1 ) NULL
So if you have invalid data in any of those fields, I can only suggest that you change the table structure to allow nulls on the affected fields, then null out bad values.
To change a field to null, either use the phpMyAdmin console, or run the following command on each column (I have used TotWindRun as an example, you will have to get the data type for each affected column).
ALTER TABLE `TABLENAME` CHANGE `TotWindRun` `TotWindRun` DECIMAL( 5, 1 ) NULL
-
- Posts: 60
- Joined: Fri 01 Jun 2012 4:58 pm
- Weather Station: Davis Vantage Vue
- Operating System: Windows 11 Home
- Location: New Forest. UK
- Contact:
Re: Top 10 Records Page
That seems to have worked a treat Mark, thanks.
While I am testing I am not using ImportCumulusFile on my local server - just imported my web database one time- so cannot check the dayfile upload yet.
I am not very familiar with SQL so this is probably a very basic question - Is it the case that, when the field is set to Null it will not be overwritten by the dayfile uploads?
Peter
While I am testing I am not using ImportCumulusFile on my local server - just imported my web database one time- so cannot check the dayfile upload yet.
I am not very familiar with SQL so this is probably a very basic question - Is it the case that, when the field is set to Null it will not be overwritten by the dayfile uploads?
Peter
- mcrossley
- Posts: 12695
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
Only data for missing days will be inserted into the table. If you want to replace data you have to delete those rows before running the import again.
-
- Posts: 3
- Joined: Sun 05 Jan 2014 2:10 pm
- Weather Station: Fine Offset
- Operating System: Windows 8.1
- Location: Woodhall Spa, Lincolnshire
- Contact:
Re: Top 10 Records Page
Would love to add this to my site, Is there an idiots guide on how to do it, or have I missed one somewhere. Or just a few pointers
I'm quite happy faffing about with web stuff, but this one has left me stumbling around in the dark a bit
Cheers
Richard
I'm quite happy faffing about with web stuff, but this one has left me stumbling around in the dark a bit
Cheers
Richard
-
- Posts: 4
- Joined: Mon 11 Nov 2013 8:19 pm
- Weather Station: Davis vantage vue
- Operating System: windows 7
- Location: Menaldum
Re: Top 10 Records Page
I m also very interesting implanting this top10 script into my website.
Could someone please make guide?
Thanks
Could someone please make guide?
Thanks
- mcrossley
- Posts: 12695
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Top 10 Records Page
I don't have a guide, but some pointers...
1. Setup your MySQL instance on your web server.
2. Schedule uploads of the dayfile to your web server.
3. Create the dayfile data SQL table and import your data from Cumulus using the PHP scripts in the Wiki
4. Schedule daily imports of the dayfile into MySQL on your web server.
5. Use the Top10 PHP script in this thread to create your new records page.
[6. Think of all the other possible things you can do with the data now you have it in an easily queried form!]
1. Setup your MySQL instance on your web server.
2. Schedule uploads of the dayfile to your web server.
3. Create the dayfile data SQL table and import your data from Cumulus using the PHP scripts in the Wiki
4. Schedule daily imports of the dayfile into MySQL on your web server.
5. Use the Top10 PHP script in this thread to create your new records page.
[6. Think of all the other possible things you can do with the data now you have it in an easily queried form!]
-
- Posts: 4
- Joined: Mon 11 Nov 2013 8:19 pm
- Weather Station: Davis vantage vue
- Operating System: windows 7
- Location: Menaldum
Re: Top 10 Records Page
Thank you very much for this information, very happy with this.
I m gonna try this tonight en will let you of its works.
I m gonna try this tonight en will let you of its works.
-
- Posts: 4
- Joined: Mon 11 Nov 2013 8:19 pm
- Weather Station: Davis vantage vue
- Operating System: windows 7
- Location: Menaldum
Re: Top 10 Records Page
Almost work.
Only in the top10s.php i have to put some info for connection with the database but don't know how:
---------------------------------------------------------------------------------
<?php
// Connect to the database
$con = @mysql_connect($dbhost, $dbuser, $dbpassword);
if (!$con) {
die('Failed to connect to the database server - ' . mysql_error());
}
if (!mysql_select_db($database, $con))
{
die('Failed to connect to the database on the server - ' . mysql_error());
}
----------------------------------------------------------------------------------
Someone a sample for me?
With beste regards
KLaas
Only in the top10s.php i have to put some info for connection with the database but don't know how:
---------------------------------------------------------------------------------
<?php
// Connect to the database
$con = @mysql_connect($dbhost, $dbuser, $dbpassword);
if (!$con) {
die('Failed to connect to the database server - ' . mysql_error());
}
if (!mysql_select_db($database, $con))
{
die('Failed to connect to the database on the server - ' . mysql_error());
}
----------------------------------------------------------------------------------
Someone a sample for me?
With beste regards
KLaas
- rogerthn
- Posts: 489
- Joined: Thu 11 Apr 2013 6:31 pm
- Weather Station: Ecowitt GW1000/GW1003
- Operating System: Raspberry Pi OS bullseye aarch64
- Location: Trollhättan Sweden
- Contact:
Re: Top 10 Records Page
Have a look at page 1 in this thread, reply 2 and 3.