Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Cumulus RealTime Data Grabber - Tool

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
User avatar
Solorize
Posts: 489
Joined: Tue Feb 01, 2011 8:22 am
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Cumulus RealTime Data Grabber - Tool

Postby Solorize » Sun Feb 19, 2012 4:27 pm

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

CGM UKScene Radio (pi)
http://cgmuksceneradio-pi.noip.me/

Image

User avatar
nitrx
Posts: 1300
Joined: Sun Dec 13, 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby nitrx » Sun Feb 19, 2012 4:56 pm

So far so good but the windrun has the good number but it's in km by me and not miles

water01
Posts: 1401
Joined: Sat Aug 13, 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby water01 » Sun Feb 19, 2012 4:58 pm

Works fine for me.

User avatar
mcrossley
Posts: 4979
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby mcrossley » Sun Feb 19, 2012 6:40 pm

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.

cgwx1
Posts: 13
Joined: Thu Feb 09, 2012 5:51 am
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
Location: DeBary, Fl
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby cgwx1 » Mon Feb 20, 2012 4:24 am

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.

User avatar
Solorize
Posts: 489
Joined: Tue Feb 01, 2011 8:22 am
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby Solorize » Mon Feb 20, 2012 1:23 pm

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

CGM UKScene Radio (pi)
http://cgmuksceneradio-pi.noip.me/

Image

User avatar
Solorize
Posts: 489
Joined: Tue Feb 01, 2011 8:22 am
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby Solorize » Mon Feb 20, 2012 1:48 pm

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

CGM UKScene Radio (pi)
http://cgmuksceneradio-pi.noip.me/

Image

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

Re: Cumulus RealTime Data Grabber - Tool

Postby steve » Mon Feb 20, 2012 2:40 pm

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

User avatar
geoffp
Posts: 322
Joined: Tue Jun 28, 2011 2:06 pm
Weather Station: Oregon Scientific WMR 200
Operating System: Windows 7
Location: Harwich, Essex
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby geoffp » Mon Feb 20, 2012 5:09 pm

Working great for me Mark :clap:
Regards,

Geoff

WOW Site No. 147808

User avatar
Solorize
Posts: 489
Joined: Tue Feb 01, 2011 8:22 am
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby Solorize » Mon Feb 20, 2012 8:41 pm

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

CGM UKScene Radio (pi)
http://cgmuksceneradio-pi.noip.me/

Image

User avatar
Solorize
Posts: 489
Joined: Tue Feb 01, 2011 8:22 am
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby Solorize » Mon Feb 20, 2012 8:54 pm

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

CGM UKScene Radio (pi)
http://cgmuksceneradio-pi.noip.me/

Image

User avatar
Solorize
Posts: 489
Joined: Tue Feb 01, 2011 8:22 am
Weather Station: WH1081
Operating System: Win 7, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby Solorize » Mon Feb 20, 2012 10:30 pm

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

CGM UKScene Radio (pi)
http://cgmuksceneradio-pi.noip.me/

Image

cgwx1
Posts: 13
Joined: Thu Feb 09, 2012 5:51 am
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
Location: DeBary, Fl
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby cgwx1 » Tue Feb 21, 2012 5:57 am

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: Select all

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:

cgwx1
Posts: 13
Joined: Thu Feb 09, 2012 5:51 am
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
Location: DeBary, Fl
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby cgwx1 » Tue Feb 21, 2012 6:13 am

Here is a bit of code I have used previously to start a process as an Administrator.

Code: Select all

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: Select all

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.

User avatar
nitrx
Posts: 1300
Joined: Sun Dec 13, 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Postby nitrx » Tue Feb 21, 2012 10:01 am

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


Return to “3rd Party Tools”

Who is online

Users browsing this forum: No registered users and 1 guest