Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed Jun 19, 2013 8:23 pm
Please click here before posting. Help me to help you!
Useful Links: Cumulus FAQ • Enhancement requests • Wiki (documentation)
Please put your approximate location into your profile
Add your web site to the Cumulus user map
Vantage Pro2 users with firmware 3.00 should upgrade to fw 3.12 and Cumulus 1.9.4

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: MS SQL Server Import
PostPosted: Wed Feb 23, 2011 6:16 am 
Offline

Joined: Tue Aug 17, 2010 5:25 am
Posts: 25
Location: Johannesburg, South Africa
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows 7
I've hashed a small VB.NET app together to extract the data from Cumulus and import it into SQL for data manipulation with something like Excel, Crystal Reports etc.

It runs on a timer and imports the live data every minute.

Anybody interested in the source code?


Top
 Profile  
 
 Post subject: Re: MS SQL Server Import
PostPosted: Wed Feb 23, 2011 1:33 pm 
Offline

Joined: Tue Aug 17, 2010 5:25 am
Posts: 25
Location: Johannesburg, South Africa
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows 7
Ok, attached is the source project. I'm no programmer but it seems to do the trick.

The only tags I was interested in was;
Code:
<#date>;<#hour>:<#minute>;<#temp>;<#hum>;<#dew>;<#wspeed>;<#wgust>;<#bearing>;<#rrate>;<#rfall>;<#press>;<#ryear>;<#intemp>;<#inhum>;<#wlatest>;<#wchill>;<#heatindex>;<#battery>


Because my console is not connected to a power supply I wanted to chart the battery voltage to see how long a set of batteries will last.

Installation

I created a a text file webtags.txt, containing only the tags I'm interested in, and have Cumulus process the file and upload it to my web server.

My app process this webtags.htm file and parses the data and imports it into SQL. The SQL script to create the table is included in the RAR file.
Because the webtags.htm file is residing on my web server my app can process the data remotely.
I have plans to convert it to a windows service so will post the update here when complete.

Please remember to change the URL of the webtags.htm file and the connection string in the app.config file.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: MS SQL Server Import
PostPosted: Wed Feb 23, 2011 2:23 pm 
Offline
User avatar

Joined: Tue Jul 29, 2008 8:00 pm
Posts: 2001
Location: Thornhill, Dumfries, UK
Weather Station: WH1081
Operating System: Mac OSx & Win 7
You could use the local copy of the processed webtag file rather than pulling it back down from the webserver each time.

Once Cumulus processes a file it leaves a tmp with all the processed data. So if it was processing webtag.txt there will be a webtag.txttmp in the same folder on the PC

_________________
David
Contact Me


Top
 Profile  
 
 Post subject: Re: MS SQL Server Import
PostPosted: Wed Feb 23, 2011 3:26 pm 
Offline

Joined: Tue Aug 17, 2010 5:25 am
Posts: 25
Location: Johannesburg, South Africa
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows 7
Yes, but that is the whole purpose of this app, to be able to pull the data over the internet from one site to another.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group