Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Cumulus RealTime Data Grabber - Tool

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

Cumulus RealTime Data Grabber - Tool

Post by Solorize »

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/downl ... DGv101.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: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by nitrx »

So far so good but the windrun has the good number but it's in km by me and not miles
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by water01 »

Works fine for me.
David
Image
User avatar
mcrossley
Posts: 12695
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by mcrossley »

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 09 Feb 2012 5:51 am
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
Location: DeBary, Fl
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by cgwx1 »

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 https://cumulus.hosiene.co.uk/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: 497
Joined: Tue 01 Feb 2011 8:22 am
Weather Station: WH1081
Operating System: Win 10, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by Solorize »

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 https://cumulus.hosiene.co.uk/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: 497
Joined: Tue 01 Feb 2011 8:22 am
Weather Station: WH1081
Operating System: Win 10, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by Solorize »

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: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by steve »

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

Re: Cumulus RealTime Data Grabber - Tool

Post by geoffp »

Working great for me Mark :clap:
Regards,

Geoff

WOW Site No. 147808
User avatar
Solorize
Posts: 497
Joined: Tue 01 Feb 2011 8:22 am
Weather Station: WH1081
Operating System: Win 10, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by Solorize »

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: 497
Joined: Tue 01 Feb 2011 8:22 am
Weather Station: WH1081
Operating System: Win 10, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by Solorize »

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: 497
Joined: Tue 01 Feb 2011 8:22 am
Weather Station: WH1081
Operating System: Win 10, XP, Xubuntu, Linux Mint
Location: Wokingham, Berkshire, UK
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by Solorize »

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/downl ... DGv102.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 09 Feb 2012 5:51 am
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
Location: DeBary, Fl
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by cgwx1 »

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 09 Feb 2012 5:51 am
Weather Station: WH1080PC
Operating System: Windows 7 and Windows XP
Location: DeBary, Fl
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by cgwx1 »

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: 1297
Joined: Sun 13 Dec 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

Re: Cumulus RealTime Data Grabber - Tool

Post by nitrx »

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/downl ... DGv102.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
Post Reply