Sandaysoft

Support forum for Cumulus weather station software
It is currently Wed May 22, 2013 11:05 am
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  [ 246 posts ]  Go to page 1, 2, 3, 4, 5 ... 17  Next
Author Message
 Post subject: Cumulus RealTime Data Grabber - Tool
PostPosted: Sun Feb 19, 2012 4:27 pm 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 344
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
After I had my hard drive die on me 7 years ago. Loosing years of load of Visual Basic 6 code and
programs that I had written, I decided to stop my hobby of programming, and took up Photography
instead.

But now I have decided to start a fresh and try my hand at VB.NET to see if I can get myself back
into the groove.

So I downloaded a copy of Visual Basic 2010 Express on Friday night and have spent all Saturday
and most of today (Sunday) immersing myself in code, and finding my way around.

I wanted to create a program that would be of some use, to keep me motivated. ;) So I decided to
see if I could write a program that would grab a realtime.txt file and display it's contents at a
specific time interval. Which is what I have hopefully managed to achieve :)

Hopefully some of you may be interested in using it? and I could do with any feedback / comments
/ bug reports or suggestions, that I could update / add in future updates.

FYI.
I know about the rouge Label2 I have left on the "Setup interval screen" ;) I have already
shut down my other machine which I have VB on and need to give my eyes a rest :shock: so I
will have to remove it when I next go back into the code.

Download:
HTTP://www.wokinghamweather.co.uk/downloads/CRTDGv101.zip

Screen Shot:
Image

Mark

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Sun Feb 19, 2012 4:56 pm 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
So far so good but the windrun has the good number but it's in km by me and not miles

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Sun Feb 19, 2012 4:58 pm 
Offline

Joined: Sat Aug 13, 2011 9:33 am
Posts: 395
Location: Somerset, UK
Weather Station: WH1081
Operating System: Windows XP SP3 / W7
Works fine for me.

_________________
David
http://www.dmjsystems.co.uk/weather/

Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Sun Feb 19, 2012 6:40 pm 
Offline
User avatar

Joined: Thu Jan 07, 2010 9:44 pm
Posts: 2512
Location: Wilmslow, Cheshire, UK
Weather Station: Davis VP2
Operating System: XP SP3, Win 7
Mark, just a suggestion, but why not learn C# rather than VB.net? If you know VB it isn't too hard to convert, and C# is a much better language imho.

_________________
Mark
Wilmslow Astro Weather


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Mon Feb 20, 2012 4:24 am 
Offline

Joined: Thu Feb 09, 2012 5:51 am
Posts: 13
Location: DeBary, Fl
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
My software does just exactly what yours does, but mine also does a forecast... Wish I would have found this before I started. Take a look at this thread http://sandaysoft.com/forum/viewtopic.php?f=18&t=7017 I saw that you commented on it... Maybe you would like to work with me and help make it look/work better it is coded in VB.NET. I can send you a copy of the code, but beware I have not cleaned it up or commented on it yet, it can be confusing.

_________________
My Site: http://tropwx.com/
My Sourceforge: http://sourceforge.net/users/tobol7


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Mon Feb 20, 2012 1:23 pm 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 344
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
cgwx1 wrote:
My software does just exactly what yours does, but mine also does a forecast... Wish I would have found this before I started. Take a look at this thread http://sandaysoft.com/forum/viewtopic.php?f=18&t=7017 I saw that you commented on it... Maybe you would like to work with me and help make it look/work better it is coded in VB.NET. I can send you a copy of the code, but beware I have not cleaned it up or commented on it yet, it can be confusing.


Hi, Thanks for the offer to collaborate with you on your project, at the moment I am still very rusty on my programming and really need to
get my head back into it before I would be comfortable in joining forces, as I would not want to mess up what you have done so
far, by me doing something wrong ;)

Hopefully if I carry on with a few more additions to my program, which I have not as yet decided upon, I will be able to learn
some more VB and when I am comfortable, we could then look at pooling all the features into one program :)

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Mon Feb 20, 2012 1:48 pm 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 344
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
I have just noticed that if you try to save the realtime.txt file, it will throw up an error:

Unhandled exception has occured in your application ...... ... ..
Access tio the path 'c:\CumulusRealTimeLocalCopy.txt' is denied.


Which after looking on the net, is because the program needs to be
"run as administrator" by right clicking on the program on launch and selected the
aforementioned option, which will then allow you to save the file to the disk.

Does anyone know how a way around this problem? i.e. that I can code into
my program to automatically allow it to run as administrator and allow the
file to be saved?

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Mon Feb 20, 2012 2:40 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 02, 2008 6:49 pm
Posts: 17567
Location: Sanday, Orkney
Weather Station: Davis VP2
Operating System: Windows Home Server 2011
It requires permission to save the file in your example because it's trying to save to the root of the C: drive. I suggest that you set the save location to somewhere else, rather than requiring your application to run as administrator.

_________________
Steve
Sanday Weather
----------------------------------------------------------------------------------------------------------------------------------
Like Cumulus and want to support it? Please donate! Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Mon Feb 20, 2012 5:09 pm 
Offline
User avatar

Joined: Tue Jun 28, 2011 2:06 pm
Posts: 249
Location: Harwich, Essex
Weather Station: Technoline WS-2350
Operating System: Windows XP SP3,
Working great for me Mark :clap:

_________________
Regards,

Geoff


Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Mon Feb 20, 2012 8:41 pm 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 344
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
steve wrote:
It requires permission to save the file in your example because it's trying to save to the root of the C: drive. I suggest that you set the save location to somewhere else, rather than requiring your application to run as administrator.


Hi Steve, Thanks for the info, I will try and set it to either save to the application folder or allow the
user to select where to save the file. Time to read up some more on the net to remind myself how to
do it. :)

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Mon Feb 20, 2012 8:54 pm 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 344
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
mcrossley wrote:
Mark, just a suggestion, but why not learn C# rather than VB.net? If you know VB it isn't too hard to convert, and C# is a much better language imho.


Hi Mark,
I had thought about learning C++ years ago but stayed with VB as I had a copy of
VB 6 and was already learning that. I may at somepoint have a go at C# , but want
to get back into the swing of programming, and I feel that it would be better for me
to reserect my VB knowledge first before I try my hand at another language :)

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Mon Feb 20, 2012 10:30 pm 
Offline
User avatar

Joined: Tue Feb 01, 2011 8:22 am
Posts: 344
Location: Wokingham, Berkshire, UK
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
nitrx wrote:
So far so good but the windrun has the good number but it's in km by me and not miles


Hi Ron,

I think I have managed to sort out the incorrect Wind Run units so it should now display the
correct unit discription based upon which wind units are being used.

i.e.

Wind unit: m/s = km
Wind unit: mph = miles
Wind unit: km/h = km
Wind unit: kts = nm

If you get time could you download my updated version: 1.0.2 below, and tell me if
it now correctly displays the Wind Run units for your data.

Download version 1.0.2 : http://www.wokinghamweather.co.uk/downloads/CRTDGv102.zip

FYI.
These are the following bug fixes and additiona I have done in this latest release version 1.0.2

1.0.2 - bug fixes (20.02.2012)

1. Corrected wind run units.
2. Removed rouge label on set update interval screen.
3. Added force update button.
4. Save button now saves to the same folder as application is running from.

Mark

_________________
Cumulus Real Time Data Grabber
http://bit.ly/WjBh5z

Wokingham Berkshire - weather station
http://www.wokinghamweather.co.uk

MRD Photography
http://www.mrdphotography.co.uk

Image


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Tue Feb 21, 2012 5:57 am 
Offline

Joined: Thu Feb 09, 2012 5:51 am
Posts: 13
Location: DeBary, Fl
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
Solorize wrote:
I have just noticed that if you try to save the realtime.txt file, it will throw up an error:

Unhandled exception has occured in your application ...... ... ..
Access tio the path 'c:\CumulusRealTimeLocalCopy.txt' is denied.


Which after looking on the net, is because the program needs to be
"run as administrator" by right clicking on the program on launch and selected the
aforementioned option, which will then allow you to save the file to the disk.

Does anyone know how a way around this problem? i.e. that I can code into
my program to automatically allow it to run as administrator and allow the
file to be saved?


Here is how I do it in my program, there is really no reason to save the actual text file to the local disk, just use a web client...
Code:
Dim txtRead As WebClient = New WebClient
stringValue = txtRead.DownloadString("URL TO REALTIME.TXT")
txtRead.Dispose()


You could also use a web request and process the stream, but that is much more difficult.
Hope this helps! :lol:

_________________
My Site: http://tropwx.com/
My Sourceforge: http://sourceforge.net/users/tobol7


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Tue Feb 21, 2012 6:13 am 
Offline

Joined: Thu Feb 09, 2012 5:51 am
Posts: 13
Location: DeBary, Fl
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
Here is a bit of code I have used previously to start a process as an Administrator.
Code:
Dim updstatrt As New Diagnostics.ProcessStartInfo()
                updstatrt.FileName = "Update.exe"
                If Environment.OSVersion.Version.Major >= 6 Then
                    updstatrt.Verb = "runas"
                End If
                updstatrt.UseShellExecute = True
                Process.Start(updstatrt)

I don't think it is possible to automatically start the program as an administrator. The only thing I can think of is something like this...
Code:
private sub load() handles form1.onload
Try

'try to write to a place that needs admin rights

Catch

'if we cannot write to that place this will run.
'use the code above to execute the program as an administrator
Application.Exit 'close this non-administrative instance

End Try
End Sub


It is dirty, but will probably work, I would only use this if the program absolutely must run as an administrator. There is another way to do it in the manifest file that is much cleaner, but you are only distributing the ".exe" so that will not work for you.

_________________
My Site: http://tropwx.com/
My Sourceforge: http://sourceforge.net/users/tobol7


Top
 Profile  
 
 Post subject: Re: Cumulus RealTime Data Grabber - Tool
PostPosted: Tue Feb 21, 2012 10:01 am 
Offline

Joined: Sun Dec 13, 2009 1:21 pm
Posts: 867
Location: Apeldoorn The Netherlands
Weather Station: WH1080 / WS 4000
Operating System: Windows 7 / Ubuntu
Solorize wrote:
nitrx wrote:
So far so good but the windrun has the good number but it's in km by me and not miles


Hi Ron,

I think I have managed to sort out the incorrect Wind Run units so it should now display the
correct unit discription based upon which wind units are being used.

i.e.

Wind unit: m/s = km
Wind unit: mph = miles
Wind unit: km/h = km
Wind unit: kts = nm

If you get time could you download my updated version: 1.0.2 below, and tell me if
it now correctly displays the Wind Run units for your data.

Download version 1.0.2 : http://www.wokinghamweather.co.uk/downloads/CRTDGv102.zip

FYI.
These are the following bug fixes and additiona I have done in this latest release version 1.0.2

1.0.2 - bug fixes (20.02.2012)

1. Corrected wind run units.
2. Removed rouge label on set update interval screen.
3. Added force update button.
4. Save button now saves to the same folder as application is running from.

Mark


Windrun is now in the units as used in my cumulus and realtime saves local without errors.

Well done

_________________
Ron

Image

Apeldoorn, The Netherlands


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 246 posts ]  Go to page 1, 2, 3, 4, 5 ... 17  Next

All times are UTC


Who is online

Users browsing this forum: gixxer.sw and 0 guests


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:  

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