Author Topic: 2.0 Request: SQL Export  (Read 2885 times)

Tornado Tim

  • Strong Breeze
  • ***
  • Posts: 125
    • Matangi Weather
  • Station Details: Davis VP2 with Solar and WLIP Datalogger (via VVP)
2.0 Request: SQL Export
« on: February 27, 2012, 09:08:09 AM »
I would love in version 2.0 of Weathercat to export to MYSQL, I use MYSQL using other weather software and makes the data collection process heaps easier and unified.

Please consider adding this to Weathercat v2.0 Stu :)

Thanks

Tim

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: 2.0 Request: SQL Export
« Reply #1 on: February 27, 2012, 04:44:33 PM »
Thanks for the suggestion Tim, I've added it to the things to look at list.

Cheers,
Stu.

TWSheppard

  • Gentle Breeze
  • **
  • Posts: 21
    • EW2262
    • IONSTITT1
    • Stittsville Weather
  • Station Details: Davis Vantage Pro 2, MacBook, 1 additional Temp/Hum sensor
Re: 2.0 Request: SQL Export
« Reply #2 on: March 09, 2013, 03:52:40 PM »
Add my vote for export to MySQL (not SQLite). That would include all data from extra sensors too.

I created a database schema for MySQL and used the Custom CGI option to invoke a PHP page to insert records into the database. Quite simple. The huge downside is that it floods my web logs even though I'm only using a 60 second timer. For large web sites, that would get lost in the noise. For a home web site, it's the dominant entry.

Since the Custom CGI also uses GET instead of POST, each log entry is huge. I suppose I could figure out how to configure Apache to have a separate virtual web server with its own custom log file, and I may still do that, but having native support for MySQL would be much preferable. If weather monitoring isn't perfectly suited for data gathering and retrieval, I don't know what is.

One of the main reasons I want a searchable database is that the current web page creation does not allow PHP, or AJAX to query the data. We have to hardcode the date ranges of values in the PHP page, it gets variable substitution by WC and then the PHP executes. Too late to dynamically calculate and request a range of data.

I want to build an AJAX web page that allows me to view data using a JQuery slider to dynamically display ranges of data. I simply can't do that without a searchable database.

Anyway, if you do embark upon this task then there should probably be a public discussion on the data schema. While I'm no database expert, I have become somewhat opinionated over the years.  :)

Thanks for listening.

WCDev

  • WeatherCat Developer
  • Administrator
  • Storm
  • *****
  • Posts: 2911
    • CW9739
    • ISCOTLAN25
    • Trixology
  • Station Details: Main Station: Vantage Pro-2, 24hr fars, solar, soil/leaf station, extra temp stations, no U.V. WeatherLink IP.
Re: 2.0 Request: SQL Export
« Reply #3 on: March 09, 2013, 09:52:23 PM »
Yep, this one is on the feature request list.

If you're into a bit of hacking, the WeatherCat SDK offers an example plug-in that periodically reads a file, replaces some keywords in the file with weather data then uploads it to your custom web site. It wouldn't be too difficult to modify it to send the data of to a database instead:
http://resources.trixology.com/downloads/WeatherCatSDK100d2.zip

Cheers,
Stu.