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 4019) - 03 April 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
SQL dayfile data Viewer
Moderator: daj
- PaulMy
- Posts: 3846
- 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: SQL dayfile data Viewer
Hi Kocher,
I changed my webserver at GoDaddy to cPanel a couple weeks ago and that included changing my MySQL database. Everything seemed to have worked eventually, except that http://www.komokaweather.com/mysql/dayf ... le-sql.php only goes back to Dec 10. The previous database Dayfile table has data up to Dec 10. The new database Dayfile table is populated to current (Dec 18) so it appears the script is looking in the old database Dayfile table. I've looked in the various files that make up dayfile-sql but have not found where I might need to edit. Any suggestion?
Thanks,
Paul
I changed my webserver at GoDaddy to cPanel a couple weeks ago and that included changing my MySQL database. Everything seemed to have worked eventually, except that http://www.komokaweather.com/mysql/dayf ... le-sql.php only goes back to Dec 10. The previous database Dayfile table has data up to Dec 10. The new database Dayfile table is populated to current (Dec 18) so it appears the script is looking in the old database Dayfile table. I've looked in the various files that make up dayfile-sql but have not found where I might need to edit. Any suggestion?
Thanks,
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
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
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: SQL dayfile data Viewer
Paul
In server_processing.php, presumably you have changed the database reference in this code found near the end of that file?
I'm busy doing a massive rewrite of my METAR decoder to try to speed it up at the moment, so I have not looked through other scripts making up dayfile-sql but I think this is what you were unable to find. I did notice on your page that a couple of entries in the summary line are not showing figures, I solved that when I implemented the dayfile-sql script on my PC, I think it was something to do with whether units are added or not, but I can't recall exactly. Maybe I will have a look later.
I note that the download in the first post of this thread is no longer available, but fortuently I use the script so have it on my PC.
This is my 350th post, I hope that means I have made a small but significant contribution to the community on this forum!
In server_processing.php, presumably you have changed the database reference in this code found near the end of that file?
Code: Select all
// SQL server connection information
$sql_details = array(
'user' => $dbuser,
'pass' => $dbpassword,
'db' => theDatabase,
'host' => $dbhost
);
I note that the download in the first post of this thread is no longer available, but fortuently I use the script so have it on my PC.
This is my 350th post, I hope that means I have made a small but significant contribution to the community on this forum!
- PaulMy
- Posts: 3846
- 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: SQL dayfile data Viewer
Thanks sfws, I had not gone in that folder or file. After editing now the table shows to current http://www.komokaweather.com/mysql/dayf ... le-sql.php.Paul
In server_processing.php, presumably you have changed the database reference in this code found near the end of that file?
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
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
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: SQL dayfile data Viewer
Paul
I have now checked, and find I amended "dayfile-sql.???" file where the original had
My amendment was to add to the list of units in line 255 so it also included the units for the columns where the max/min/average/total was not appearing. From a very quick inspection, it appears that is all I changed to add the missing figures to my footer, the equivalent of your
If I am correct, then you are missing the \hPa and \km/H units (or for you latter is Km/h apparently). You may have problems with '/' as it appears that character is used as start and end delimiter outside the square brackets. I believe you also need to escape the '/' i.e. '//'. As I said, I am a novice with these expressions, and just starting to learn the PERL ones used with PHP, and the javascript ones might be different.
It is possible I also amended the code snippet dealing with reading from the database and adding the figures to the table but I can't at a quick glance see any other relevant changes.
I have now checked, and find I amended "dayfile-sql.???" file where the original had
Code: Select all
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
i.replace(/[\mm,\Km,\hPa,]/g, '')*1 :
typeof i === 'number' ?
i : 0;
};
Put as simply as I can that is a pattern replacement instruction within the demiiters, it looks for any one of the expressions separated by a comma in the square brackets and replaces it by an empty string (delimited by the pair of single quotes). I'm very new to pattern specifying and had to look up the significance of the 'g' flag for javascript, apparently it gives the expression a global applicability.Date -19.5 °C 34.0 °C 12.2 °C 263.0 mm Bmin Bmax Wgust 5827 Km
If I am correct, then you are missing the \hPa and \km/H units (or for you latter is Km/h apparently). You may have problems with '/' as it appears that character is used as start and end delimiter outside the square brackets. I believe you also need to escape the '/' i.e. '//'. As I said, I am a novice with these expressions, and just starting to learn the PERL ones used with PHP, and the javascript ones might be different.
It is possible I also amended the code snippet dealing with reading from the database and adding the figures to the table but I can't at a quick glance see any other relevant changes.
- kocher
- Posts: 233
- Joined: Sat 19 Apr 2014 7:57 pm
- Weather Station: Davis Vantage Pro2+
- Operating System: Windows 10
- Location: San Sebastian - Spain
- Contact:
Re: SQL dayfile data Viewer
Greetings to all.
The download link for this script is already working again:
http://kocher.es/cajon/DataTables-cumulus-dayfile.rar
You can see the installation instructions at:
https://cumulus.hosiene.co.uk/viewtopic.p ... 83#p122552
Saludos desde San Sebastian
The download link for this script is already working again:
http://kocher.es/cajon/DataTables-cumulus-dayfile.rar
You can see the installation instructions at:
https://cumulus.hosiene.co.uk/viewtopic.p ... 83#p122552
Saludos desde San Sebastian
- vpokroglo
- Posts: 101
- Joined: Thu 24 Feb 2011 7:45 pm
- Weather Station: WS-2350
- Operating System: Raspberry Pi 2
- Location: Slovenija
- Contact:
Re: SQL dayfile data Viewer
Great script!
Do anyone know some script to show data from monthly files- monthly mysql?
Do anyone know some script to show data from monthly files- monthly mysql?
-
- Posts: 1183
- Joined: Fri 27 Jul 2012 11:29 am
- Weather Station: Chas O, Maplin N96FY, N25FR
- Operating System: rPi 3B+ with Buster (full)
Re: SQL dayfile data Viewer
What you ringed in red is supposed to show summary for column. I have just quoted an extract from my earlier post where I mention for my own version I tried to sort out that output line. I will leave it to the author of the script to add any further comment.sfws wrote:where the max/min/average/total was
- kocher
- Posts: 233
- Joined: Sat 19 Apr 2014 7:57 pm
- Weather Station: Davis Vantage Pro2+
- Operating System: Windows 10
- Location: San Sebastian - Spain
- Contact:
Re: SQL dayfile data Viewer
Effectively
The foot of the table, contains the summary of each column after conducting a search;
1): Get the minimum temperature of all filtered dates
2): Get the maximum temperature all of the filtered dates.
3): Get the mean value of the average temperature of all the filtered dates.
4): Obtain the sum of the precipitation of the filtered dates.
And so on: Minimum pressure, Maximum pressure, Maximum windgust and the Total kilometers traveled by the wind:
http://kocher.es/central.php
Saludos desde San Sebastian, Spain
The foot of the table, contains the summary of each column after conducting a search;
1): Get the minimum temperature of all filtered dates
2): Get the maximum temperature all of the filtered dates.
3): Get the mean value of the average temperature of all the filtered dates.
4): Obtain the sum of the precipitation of the filtered dates.
And so on: Minimum pressure, Maximum pressure, Maximum windgust and the Total kilometers traveled by the wind:
http://kocher.es/central.php
Saludos desde San Sebastian, Spain
- vpokroglo
- Posts: 101
- Joined: Thu 24 Feb 2011 7:45 pm
- Weather Station: WS-2350
- Operating System: Raspberry Pi 2
- Location: Slovenija
- Contact:
Re: SQL dayfile data Viewer
kocher wrote:Effectively
The foot of the table, contains the summary of each column after conducting a search;
1): Get the minimum temperature of all filtered dates
2): Get the maximum temperature all of the filtered dates.
3): Get the mean value of the average temperature of all the filtered dates.
4): Obtain the sum of the precipitation of the filtered dates.
And so on: Minimum pressure, Maximum pressure, Maximum windgust and the Total kilometers traveled by the wind:
http://kocher.es/central.php
Saludos desde San Sebastian, Spain
I am not sure if this is correct,
If I set filter to 2017 (year only), I get different values when scrolling down, so data shown in the bottom row is unusable in this way.
If I set year and month, it is OK.
- ConligWX
- Posts: 1629
- Joined: Mon 19 May 2014 10:45 pm
- Weather Station: Davis vPro2+ w/DFARS + AirLink
- Operating System: Ubuntu 22.04 LTS
- Location: Bangor, NI
- Contact:
Re: SQL dayfile data Viewer
Does anyone have the full archive handy to download? links provided are dead.
Regards Simon
https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0
https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0
-
- Posts: 12
- Joined: Thu 21 Sep 2017 9:21 pm
- Weather Station: aercus WS2083
- Operating System: RPI stretch
Re: SQL dayfile data Viewer
Hi any chance of a working link to the file thanks.
- dazza1223
- Posts: 867
- Joined: Sun 25 Jan 2015 8:41 pm
- Weather Station: Davis Vantage Pro 2 plus
- Operating System: Raspberry pi 4 (4gb)
- Location: Worthing
- Contact:
Re: SQL dayfile data Viewer
i cant zip one up for you
-
- Posts: 12
- Joined: Thu 21 Sep 2017 9:21 pm
- Weather Station: aercus WS2083
- Operating System: RPI stretch
Re: SQL dayfile data Viewer
Hello dazza that would be great if you could.