Weather-Watch.com
September 02, 2010, 05:27:35 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Members: 8,509  Posts: 362,030  Topics: 40,113
Please welcome lawrencerebeiro, our newest member.

Latest versions: WD - 10.37P  WDL - 6.05  MML - 1.03
 News:
Check out the new FAQs (Frequently Asked Questions) board for a growing list of hints, tips and diagnostic suggestions.
  Advanced Search
   Home   Bug Tracker Photo Gallery Wiki Chat Calendar Search Login Register Help  
Pages: [1]
  Print  |  « previous  |  next »  |  Go Down  
Author Topic: MySQL Database construct SQL  (Read 678 times)
0 Members and 1 Guest are viewing this topic.
Smitty_kiwi
Senior Watcher
***
Offline Offline

Location: Clyde - NZ
Station Type: 1 Wire
Posts: 26
Local Time: Thursday 17:27


Cheers - John S


WWW
« on: July 31, 2009, 02:06:12 AM »

Is there a MySQL database construct sql floating about. In the config txt it says see the read me for the database design, but I must have missed something in the reading there, as there is no mention of the MySQL design in the read me with WDConsole.

Addendum 21:22
I also need to know the order that wdconsole parse's the oww log file, so that I can get that part right, for the 1 wire station here.
« Last Edit: July 31, 2009, 08:23:01 AM by Smitty_kiwi » Logged
Smitty_kiwi
Senior Watcher
***
Offline Offline

Location: Clyde - NZ
Station Type: 1 Wire
Posts: 26
Local Time: Thursday 17:27


Cheers - John S


WWW
« Reply #1 on: September 05, 2009, 09:51:27 PM »

Is there a MySQL database construct sql floating about. In the config txt it says see the read me for the database design, but I must have missed something in the reading there, as there is no mention of the MySQL design in the read me with WDConsole.

Addendum 21:22
I also need to know the order that wdconsole parse's the oww log file, so that I can get that part right, for the 1 wire station here.
I have commented this question to bring it up the list.
What I was wondering is there a table description somewhere to create the table for wdconsole to feed data too.
I would also like to know a bit about changing the log file input from oww, so that it could include extra sensors, like solar etc ... this all in relation to wdconsole, in cohorts with owww on a 1 wire system.
Logged
niko
syzygy
Junior Climate Controller
**
Offline Offline

Location: Northern California, U.S.A.
Station Type: 2 x Davis VP2 Wireless / Win 2000
Posts: 18,782
Local Time: Thursday 11:27


Crystal Ball broken! Please post the URL.


WWW
« Reply #2 on: September 05, 2009, 11:05:25 PM »

Doesn't the download include a script that creates the MySQL database?
Logged

n7dq
Weather Guru
**
Offline Offline

Location: Windsor, CO
Station Type: Davis VP - Linux
Posts: 523
Local Time: Thursday 12:27



WWW
« Reply #3 on: September 06, 2009, 01:49:39 PM »

I think this is the most current table definition.

#
# Table structure for table `wx_data`
#

CREATE TABLE `wx_data` (
`station_id` varchar(10) NOT NULL default ' ',
`date` date NOT NULL default '0000-00-00',
`time` time NOT NULL default '00:00:00',
`average_windspeed` float NOT NULL default '0',
`wind_direction` smallint(3) NOT NULL default '0',
`gust_windspeed` float NOT NULL default '0',
`temperature` float NOT NULL default '0',
`outdoor_humidity` float NOT NULL default '0',
`barometer` float NOT NULL default '0',
`daily_rainfall` float NOT NULL default '0',
`monthly_rainfall` float NOT NULL default '0',
`yearly_rainfall` float NOT NULL default '0',
`rain_rate` float NOT NULL default '0',
`max_rain_rate_curent_day` float NOT NULL default '0',
`indoor_temperature` float NOT NULL default '0',
`indoor_humidity` float NOT NULL default '0',
`soil_temperature` float NOT NULL default '0',
`forecast_icon` int(3) NOT NULL default '0',
`wmr968_extra_temperature` float NOT NULL default '0',
`wmr968_extra_humidity` float NOT NULL default '0',
`wmr968_extra_sensor_number` smallint(2) NOT NULL default '0',
`yesterday_rainfall` float NOT NULL default '0',
`extra_temperature_sensor_2` float NOT NULL default '0',
`extra_temperature_sensor_3` float NOT NULL default '0',
`extra_temperature_sensor_4` float NOT NULL default '0',
`extra_temperature_sensor_5` float NOT NULL default '0',
`extra_temperature_sensor_6` float NOT NULL default '0',
`extra_temperature_sensor_7` float NOT NULL default '0',
`extra_humidity_2` float NOT NULL default '0',
`extra_humidity_3` float NOT NULL default '0',
`extra_humidity_4` float NOT NULL default '0',
`hour` smallint(2) NOT NULL default '0',
`minute` smallint(2) NOT NULL default '0',
`second` smallint(2) NOT NULL default '0',
`station_name` varchar(100) NOT NULL default '',
`dallas_1_wire_lightning_count` int(11) NOT NULL default '0',
`actual_solar_reading` int(11) NOT NULL default '0',
`day` smallint(2) NOT NULL default '0',
`month` smallint(2) NOT NULL default '0',
`wmr968_battery_level_1` smallint(3) NOT NULL default '0',
`wmr968_battery_level_2` smallint(3) NOT NULL default '0',
`wmr968_battery_level_3` smallint(3) NOT NULL default '0',
`wmr968_battery_level_4` smallint(3) NOT NULL default '0',
`wmr968_battery_level_5` smallint(3) NOT NULL default '0',
`wmr968_battery_level_6` smallint(3) NOT NULL default '0',
`wmr968_battery_level_7` smallint(3) NOT NULL default '0',
`current_windchill` float NOT NULL default '0',
`current_humidex` float NOT NULL default '0',
`max_daily_temperature` float NOT NULL default '0',
`min_daily_temperature` float NOT NULL default '0',
`icon_type` smallint(3) NOT NULL default '0',
`current_weather_desc` varchar(20) NOT NULL default '',
`barometer_trend_last_hour` float NOT NULL default '0',
`max_gust_current_day` float NOT NULL default '0',
`dew_point_temperature` float NOT NULL default '0',
`cloud_height` float NOT NULL default '0',
`max_humidex` float NOT NULL default '0',
`min_humidex` float NOT NULL default '0',
`max_windchill` float NOT NULL default '0',
`min_windchill` float NOT NULL default '0',
`davis_vp_uv` float NOT NULL default '0',
`max_heat_index` float NOT NULL default '0',
`min_heat_index` float NOT NULL default '0',
`heat_index` float NOT NULL default '0',
`max_average_windspeed_day` float NOT NULL default '0',
UNIQUE KEY `station_id` (`station_id`,`date`,`time`)
) TYPE=MyISAM COMMENT='wx_data from Weather Display';


Mike - N7DQ
Logged

Mike - N7DQ
----------------------------
http://www.n7dq.com/weather
CWOP: AT059
WeatherUnderground: KCOWINDS8
[
Smitty_kiwi
Senior Watcher
***
Offline Offline

Location: Clyde - NZ
Station Type: 1 Wire
Posts: 26
Local Time: Thursday 17:27


Cheers - John S


WWW
« Reply #4 on: September 09, 2009, 09:48:14 PM »

Thanks Mike,
This will give me a base start, what I am not sure about is the mysql part of wdconsole, does it maintain all the data fields in the above tables. I wonder, and indeed, does wdconsole manage to obtain all the necessary data from the OWW logfile. Some of the above fields would be a challenge to construct queries for extracting from the log file I am thinking.
Any Hoo, I am stuffed full of the flu oink oink, so I might have time to make this happen in the next few days ... as long as I can stop my nose dripping on dunhh keyboard ..  Laughing
Logged
Pages: [1]
  Print  |  « previous  |  next »  |  Go Up  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!