Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.2.4 build 3060 - 10 December 2019.
    Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

    See the Wiki for downloading either version.

    Question aboute MySQL and WU-Graphs

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

    Moderator: daj

    User avatar
    actioman
    Posts: 118
    Joined: Sat 20 Mar 2010 1:01 am
    Weather Station: Davis Vantage Pro2 Plus
    Operating System: Windows XP SP3
    Location: Elvas, Portugal
    Contact:

    Question aboute MySQL and WU-Graphs

    Post by actioman » Thu 11 Apr 2013 2:48 am

    Anyone here managed to use the WU-Graphs with a MySQL database using Cumulus files?

    I have been trying to contact the author of the WU-Charts, but he seems to have left this project... at least he did not answer me, and some time ago that he does not appear in the usual places

    Is that graphs that are generated with the MySQL database are based on tables created by Weather Display program and the tables that I created using the "ImportCumulusFile" script (http://wiki.sandaysoft.com/a/ImportCumulusFile) have other structure and give error.
    Kind Regards, Manuel.

    Image

    gemini06720
    Posts: 1700
    Joined: Mon 10 Aug 2009 10:16 pm
    Weather Station: No weather station
    Operating System: No operating system
    Location: World...

    Re: Question aboute MySQL and WU-Graphs

    Post by gemini06720 » Thu 11 Apr 2013 3:09 am

    Manuel, I have been running the WU Graphs on my Cumulus pages: [link removed].

    The script is getting it data from both Weather Underground and the MySQL database ... but from data produced and saved (directly into the database) by Weather Display... :(

    I looked at adapting the scripts to the Cumulus data but gave up when I could not get the required historical data.
    Last edited by gemini06720 on Sun 09 Jun 2013 9:50 am, edited 1 time in total.

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by steve » Thu 11 Apr 2013 7:03 am

    gemini06720 wrote:I looked at adapting the scripts to the Cumulus data but gave up when I could not get the required historical data.
    Which historical data is still unavailable? And if it's being saved to a database, why does it need to be 'historical' anyway? Isn't that the point of the database, to retrieve past data, stored when it's still current?

    I installed WU-Graphs here: http://sanday.org.uk/weather/wugraphs/wugraphs.php

    It seems to be working OK. What am I missing by not having access to data from WD? I can't see any difference between mine and yours, apart from the styling.
    Steve

    User avatar
    actioman
    Posts: 118
    Joined: Sat 20 Mar 2010 1:01 am
    Weather Station: Davis Vantage Pro2 Plus
    Operating System: Windows XP SP3
    Location: Elvas, Portugal
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by actioman » Fri 12 Apr 2013 3:45 pm

    Ok. But your data is from wunderground or from a mySQL database Steve?

    And if is from a mySQL database how could you do it? Can you share your method?

    Since whenever I use Cumulus software (for me is a great software) and will not be now that I'm going to change.

    And Ray with the "ImportCumulusFile" script I managed to send all data to the MySQL database, month by month since I started having data.

    Thanks in advance. ;)
    Kind Regards, Manuel.

    Image

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by steve » Fri 12 Apr 2013 3:58 pm

    It's from Wunderground. That's why I'm wondering what benefit I would get from having it in a database, and what data it is that Cumulus doesn't provide that stops that being possible.
    Steve

    User avatar
    actioman
    Posts: 118
    Joined: Sat 20 Mar 2010 1:01 am
    Weather Station: Davis Vantage Pro2 Plus
    Operating System: Windows XP SP3
    Location: Elvas, Portugal
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by actioman » Fri 12 Apr 2013 4:43 pm

    steve wrote:It's from Wunderground. That's why I'm wondering what benefit I would get from having it in a database, and what data it is that Cumulus doesn't provide that stops that being possible.
    In my case I prefer a database for two reasons.
    The first is that I just started sending data to Wunderground many months after the weather station up and running. And the second is because it allows me to use the UV data.
    And there also have some inconsistencies in the wunderground website that were never corrected, although I have insisted on a correction.
    Kind Regards, Manuel.

    Image

    User avatar
    duke
    Posts: 840
    Joined: Sun 03 Jul 2011 6:23 pm
    Weather Station: Davis VP2 Plus - 24hr FARS
    Operating System: Windows 10 - 64 bit
    Location: Eastleigh, Hampshire, UK
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by duke » Fri 12 Apr 2013 5:08 pm

    Also, Cumulus (AFIK) cannot produce the 1 hour graphs.
    Duke

    Nightingale Weather
    Eastleigh, Hampshire, UK
    ------------------------------------------------------
    Validate your pages - often!

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by steve » Fri 12 Apr 2013 5:41 pm

    duke wrote:Also, Cumulus (AFIK) cannot produce the 1 hour graphs.
    Presumably for those the data would have to be in a MySQL database, in the format expected by the script, so it's the same issue. Cumulus has web tags for most of the data once a minute going back seven days, and it has web tags for all of the current data. So it's quite possible to write something to update a MySQL database from those.

    I can't see much if anything in those graphs that isn't already produced by Cumulus both as 'live' data and in the log files. This all depends on what format the database needs to be, and which fields in the database the script actually uses.

    But in any case, isn't all of this quite similar to the Highcharts graphs that Mark has been producing?
    Steve

    User avatar
    duke
    Posts: 840
    Joined: Sun 03 Jul 2011 6:23 pm
    Weather Station: Davis VP2 Plus - 24hr FARS
    Operating System: Windows 10 - 64 bit
    Location: Eastleigh, Hampshire, UK
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by duke » Fri 12 Apr 2013 6:02 pm

    Presumably for those the data would have to be in a MySQL database,
    Or the required WD file.
    Duke

    Nightingale Weather
    Eastleigh, Hampshire, UK
    ------------------------------------------------------
    Validate your pages - often!

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by steve » Fri 12 Apr 2013 6:07 pm

    duke wrote:Or the required WD file.
    That just demonstrates how little I understand about these graphs. I thought they worked either from WU data or from a MySQL database, not from any 'ordinary' files.
    Steve

    User avatar
    actioman
    Posts: 118
    Joined: Sat 20 Mar 2010 1:01 am
    Weather Station: Davis Vantage Pro2 Plus
    Operating System: Windows XP SP3
    Location: Elvas, Portugal
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by actioman » Fri 12 Apr 2013 6:09 pm

    steve wrote:
    duke wrote:Also, Cumulus (AFIK) cannot produce the 1 hour graphs.
    Presumably for those the data would have to be in a MySQL database, in the format expected by the script, so it's the same issue. Cumulus has web tags for most of the data once a minute going back seven days, and it has web tags for all of the current data. So it's quite possible to write something to update a MySQL database from those.

    I can't see much if anything in those graphs that isn't already produced by Cumulus both as 'live' data and in the log files. This all depends on what format the database needs to be, and which fields in the database the script actually uses.

    But in any case, isn't all of this quite similar to the Highcharts graphs that Mark has been producing?
    Yes is quite similar! And the Highcharts graphs from Mark to me seem nicer! But since no one knows when he will have time to devote to it, I thought I'd explore the wu-graphs.
    Kind Regards, Manuel.

    Image

    BCJKiwi
    Posts: 885
    Joined: Mon 09 Jul 2012 8:40 pm
    Weather Station: Davis VP2 Cabled with Solar
    Operating System: Windows 10 Pro
    Location: Auckland, New Zealand
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by BCJKiwi » Fri 12 Apr 2013 9:25 pm

    Hi,
    I also have been interested in the highchart style graphs but not implemented them as many examples seem slow to load and complicated to set up.
    However since reading this thread I have tried installing the wugraphs setup.

    I have run into a number of problems - most now resolved in the simpler 'standalone' wugraphs.php version rather than the wxwugraphs.php version for the Saratoga scripts.

    @Steve - the WUG-settings.php file has the clue to the WU/WD/SQL variants here;

    Code: Select all

    $dataSource = 'wunderground'; // 'mysql' - weather display mysql database ; 'wunderground' - wunderground server ; 'wutowdmysql' - combined WU->WD MySQL
    My issue is that I have had to make some minor edits involving $_GET['lang']; and $_GET['theme']; in WUG-settings.php and relocating require_once('./wxwugraphs/WUG-settings.php'); above the location where the data in it was being used in wugraphs.php to get anything to display without a large number of 'undefined variables' error messages from my test server resulting in a partial chart background and no data.
    The cache folder does have a lot of data files.
    At present I have a chart with axes and the tool tips work in Chrome and Ie8/ie9 but not ie10.
    There are no traces so the chart has no data displayed but if you find the right spot, the tooltip displays the data point details.
    There is no Calendar at the bottom of the chart.

    Would appreciate anyone who has this working in either wugraph.php or wxwugraph.php mode posting or pm-ing a copy of WUG-settings.php so I can see what settings actually work.
    I have spent a considerable amount of time on this and tried all the setting combinations that seem to be sensible (and a few others besides ;) ) to no avail.

    Thanks

    User avatar
    steve
    Cumulus Author
    Posts: 26717
    Joined: Mon 02 Jun 2008 6:49 pm
    Weather Station: None
    Operating System: None
    Location: Vienne, France
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by steve » Fri 12 Apr 2013 10:01 pm

    BCJKiwi wrote:@Steve - the WUG-settings.php file has the clue to the WU/WD/SQL variants here;

    Code: Select all

    $dataSource = 'wunderground'; // 'mysql' - weather display mysql database ; 'wunderground' - wunderground server ; 'wutowdmysql' - combined WU->WD MySQL
    That seems to be saying WU or WD MySQL or a combination of both; no mention of WD files.
    Steve

    BCJKiwi
    Posts: 885
    Joined: Mon 09 Jul 2012 8:40 pm
    Weather Station: Davis VP2 Cabled with Solar
    Operating System: Windows 10 Pro
    Location: Auckland, New Zealand
    Contact:

    Re: Question aboute MySQL and WU-Graphs

    Post by BCJKiwi » Sat 13 Apr 2013 2:03 am

    steve wrote:That just demonstrates how little I understand about these graphs. I thought they worked either from WU data or from a MySQL database, not from any 'ordinary' files.
    steve wrote:That seems to be saying WU or WD MySQL or a combination of both; no mention of WD files.
    I was trying to clarify your post with the first quoted line above. I agree that it would indicate that it will only work with WD if WD is in sql mode.
    1. 'mysql' WD delivering into MySQL
    2. 'wunderground' (only)
    3. 'wutowdmysql' - combined WU->WD MySQL

    gemini06720
    Posts: 1700
    Joined: Mon 10 Aug 2009 10:16 pm
    Weather Station: No weather station
    Operating System: No operating system
    Location: World...

    Re: Question aboute MySQL and WU-Graphs

    Post by gemini06720 » Sat 13 Apr 2013 2:43 am

    steve wrote:Which historical data is still unavailable? And if it's being saved to a database, why does it need to be 'historical' anyway?
    OK, I have waited a few days t reply to your message ... so I could cool off somewhat.

    I really hate when you take such a defensive attitude when someone comments on your software or lack of functions (fortunately, the designer of the other weather software you seem to compare Cumulus to, has been requested and has accepted to take a more constructive approach)... :evil:

    All the data produced by Cumulus is in the flat file format - very inconvenient when trying to use that data with any types of modern charting scripts...

    There have been many discussions about the use of a database ... but, still, Cumulus does not offer 'direct' access to a database, that is without 'jumping through hoops' of PHP scripts and CRON jobs and other hack type of ways to get the data where it is needed, inside an online database - fortunately, Weather Display has a small utility called 'wdmysql.exe' which, once setup (access to the database, data to include in the database, etc.), will automatically upload, at programmable schedules, all the data to an online database - oh, that small utility is automatically started a few seconds after Weather Display has started and without any additional action required of the user.

    With that said/written, using the data from a database that contains data from a personal weather station is much more accurate than getting the 'regurgitated' data from Weather Underground - that is the main benefit!

    As Manuel pointed out, a database can also contain a lot more valuable data (such as UV, solar, etc.) than the limited data Weather Underground can (and will ever) provide and the database data is available/produced in a much more timely manner.

    As Duke pointed out, no hourly historical data file is 'directly' produced by Cumulus.

    You indicated that webtags can be used to produced all the data need - again, this is not the 'direct' way - it is a hack (a way around the absence of a 'direct' access to a database) where most people are very uncomfortable in using PHP, judging by the number of requests for assistance when someone tries to deal with the creation, production and updating of a database.

    The 'WU-Graphs' are using data from Weather Underground and/or data from the Weather Display produced database as well as one flat file produced by Weather Display ... for the hourly results - if that option is not activated or if the required flat file is not available then the hourly graphics are not displayed.

    A few years back, after many hours of modifications (to eradicate as many as possible the error and warning messages) I was able to adapt the WU-Graphs script to fit within one of my Cumulus web pages - the '[link removed]' script has been using the data from both Weather Underground and the Weather Display produced database (although the database is not updated on a regular basis) as well as the data from the the Weather Display hourly produced flat file.

    Note: It has been my understanding (from reading previous posts) that adding code to access a MySQL database would require the purchase of a distribution license. As I recommended/suggested so many times, the support for the free version (or what you call the donation version) of Cumulus has long passed - what would be needed now would be for your to concentrate on a shareware (paid for) version of Cumulus where facilities such as access to a MySQL database would be built into Cumulus (or as a companion utility).
    Last edited by gemini06720 on Wed 22 May 2013 8:28 pm, edited 1 time in total.

    Post Reply