Page 1 of 1

Realtime.txt ftp and External Programs

Posted: Wed 22 Feb 2012 3:32 pm
by david3
I'd like to use the built-in Cumulus ftp function to ftp the realtime.txt file every 10 seconds, but use an external program to do the 5 minute updates (for CUtags.php and graphs). Do you know if this is possible?

Under Internet Settings -> Web Settings, there's:

Interval 5 mins
Enable Realtime
Enable Realtime FTP
Realtime.txt FTP
Realtime interval 10 secs

Then there's External Programs:

Program
Realtime Program
Daily

Do you know what the difference is between "Enable Realtime FTP" and "Realtime.txt FTP"?

I've got an external ftp script under "Program" for the 5 minute update, but it seems Cumulus also tries to do an ftp every 5 minutes, too.

The reason I'm trying to use an external script for the 5 minute update is so I can check the time to limit the graph uploads to once an hour, and only the images I'm using instead of all of them.

Thanks.

Re: Realtime.txt ftp and External Programs

Posted: Wed 22 Feb 2012 3:45 pm
by steve
david3 wrote:Do you know what the difference is between "Enable Realtime FTP" and "Realtime.txt FTP"?
From the help:

Enable Realtime: If you tick this box, Cumulus will start a timer at the interval specified by Realtime Interval (see below). Each time the timer expires, Cumulus will create a realtime.txt file, containing various weather parameters and is used by the CumulusRealtime.swf real time wind gauges (as on the supplied 'gauges' web page) and the separate Cumulus Realtime Silverlight web application. If you don't have this option selected, but do have the 'auto update' option set (and a suitable interval configured), Cumulus will still create the realtime.txt file at the specified Interval (not the Realtime Interval) so that you can specify it as an extra file to upload during the 'normal' upload, or use it for any other purpose on your PC.

Enable Realtime FTP: If you tick this box, Cumulus will establish an FTP connection to your web site, so that the realtime.txt file, and any other files you specify, can be uploaded when realtime processing takes place. The 'Enable Realtime' box must be ticked for this setting to have any effect.

Realtime.txt FTP: If you tick this box, Cumulus will upload the realtime.txt to your web site during realtime processing. The 'Enable Realtime' and 'Enable Realtime FTP' boxes must both be ticked for this setting to have any effect.
I've got an external ftp script under "Program" for the 5 minute update, but it seems Cumulus also tries to do an ftp every 5 minutes, too.
The easiest way to stop it uploading the standard files and images is to untick 'Include standard files' and 'Include standard images' boxes on the files tab of the internet settings. It will still log in to the ftp server, though.

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 4:56 am
by david3
Thanks, I think I understand.

I'm using external programs for all of the transfers now, so I'll probably just keep doing that (ncftpput). It just seems that the built-in ftp utility is a little faster, so it would be nice to use, too.

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 5:16 am
by beteljuice
So why not just untick include standard images, and use your external ftp prog to just upload those at the slower interval ?

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 9:25 am
by david3
If I uncheck "Include Standard Images" will the images/graphs still get created on a regular basis, though?

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 9:29 am
by steve
david3 wrote:If I uncheck "Include Standard Images" will the images/graphs still get created on a regular basis, though?
Yes. The setting controls whether or not they are uploaded.

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 10:44 am
by david3
steve wrote:Yes. The setting controls whether or not they are uploaded.
Thanks, it's working with Cumulus doing the ftp for everything except the images, and then the external script uploads the images every hour.

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 10:51 am
by steve
Hopefully at some point I'll improve the ftp scheduling options to make the sort of thing you want to do a bit easier.

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 12:08 pm
by david3
That's cool. This is the .bat file script I'm using to upload just the images I need every hour via ncftpput:

Code: Select all

set currmin=%TIME:~3,2%
if not %currmin% LEQ 4 goto end
ncftpput -t 15 -u Username -p Password -P Port# -S TEMP WebsiteDomain.com /upload/directory/path C:\Cumulus\web\images\temp.png C:\Cumulus\web\images\hum.png C:\Cumulus\web\images\wind.png C:\Cumulus\web\images\windd.png C:\Cumulus\web\images\press.png C:\Cumulus\web\images\raint.png C:\Cumulus\web\images\rain.png
:end

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 12:57 pm
by beteljuice
That list does not include the thumbnails for the graphs, windguage, windrose, compass nor moon.bmp ;)

Although windguage, windrose, compass would be rather meaningless once an hour !

Re: Realtime.txt ftp and External Programs

Posted: Thu 23 Feb 2012 2:27 pm
by david3
I'm using the Saratoga Weather AJAX scripts, so I'm just uploading the graphs here:

http://www.sfcweather.com/wxgraphs.php