Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.4.6 (build 3070) - 23 March 2020
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

External program

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
PaulMy
Posts: 2062
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

External program

Post by PaulMy » Sat 16 Nov 2019 4:14 pm

I currently run Cumulusutils in the External program Daily program with the parameter as pwsFWI and this works great www.komokaweather.com/komokaweather-ca/wxFWI.php
In the settings this appears to be for a single run/parameter. How can I run this with additional parameters - i.e. maps so that this can also be updated once a day www.komokaweather.com/komokaweather-ca/wxMap.php

Thanks,
Paul
Davis Vantage Pro 2 - Windows 8 - Cumulus v1.9.4 b.1099 - CumulusMX/WiFiLogger
www.komokaweather.com
www.komokaweather.com/cumulusmx
www.komokaweather.ca
www.komokaweather.com/pws
Image

User avatar
meteosangonera
Posts: 23
Joined: Thu 07 Jun 2018 2:17 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Contact:

Re: External program

Post by meteosangonera » Sat 16 Nov 2019 5:56 pm

PaulMy wrote:
Sat 16 Nov 2019 4:14 pm
I currently run Cumulusutils in the External program Daily program with the parameter as pwsFWI and this works great www.komokaweather.com/komokaweather-ca/wxFWI.php
In the settings this appears to be for a single run/parameter. How can I run this with additional parameters - i.e. maps so that this can also be updated once a day www.komokaweather.com/komokaweather-ca/wxMap.php

Thanks,
Paul
You can use multiple parameter at the same time. You have to let a space between each parameter.

User avatar
PaulMy
Posts: 2062
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: External program

Post by PaulMy » Sat 16 Nov 2019 7:05 pm

Thank you, I will add the other parameters.

Enjoy,
Paul
Davis Vantage Pro 2 - Windows 8 - Cumulus v1.9.4 b.1099 - CumulusMX/WiFiLogger
www.komokaweather.com
www.komokaweather.com/cumulusmx
www.komokaweather.ca
www.komokaweather.com/pws
Image

Phil23
Posts: 408
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: External program

Post by Phil23 » Tue 19 Nov 2019 3:07 am

I only have one external program run at end of day.

C:\CumulusMX\Scripts\DayEnd.bat

Then do all the stuff I want in that batch file.

Code: Select all

@echo off
echo Waiting a few seconds for End of Day to complete.

ping localhost -n 5 > nul

copy "\\WEATHER-PC\Cumulus\data\dayfile.txt" + "\\WEATHER-PC\CumulusMX\data\dayfile.txt" "\\WEATHER-PC\CumulusMX\Scripts\dayfile-merged.txt" /b /y

cd \cumulusmx
cumulusutils Top10 pwsFWI SysInfo Graphs MapsOn

ftp -s:"\\WEATHER-PC\CumulusMX\Scripts\ftp.txt"

Ping localhost -n 5 > nul
CD\

The FTP in Windows is fed by the command file ftp.txt

Code: Select all

open weather.inverellit.com
Username
Password
cd /public_html/weather/historic
put \\WEATHER-PC\CumulusMX\Scripts\dayfile-merged.txt dayfile.txt
cd /public_html/weather
put \\WEATHER-PC\CumulusMX\utils\pwsFWI.txt pwsFWI.txt
put \\WEATHER-PC\CumulusMX\utils\top10Table.txt top10Table.txt
put \\WEATHER-PC\CumulusMX\utils\graphs.txt graphs.txt
put \\WEATHER-PC\CumulusMX\utils\maps.txt maps.txt
put \\WEATHER-PC\CumulusMX\utils\pwsFWIanalyse.csv pwsFWIanalyse.csv
quit
Lets me run more than one command & a bit easier to manage.

Phil.

User avatar
PaulMy
Posts: 2062
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: External program

Post by PaulMy » Tue 19 Nov 2019 5:56 am

I've tried the multi parameters and that works as each of pwsFWI, graphs, MapOn, SysInfo and Top10 were executed and the results files placed in the \utils folder, thanks for that suggestion.
However the timing of the external program execution and the End of Day FTP of the files are not in sync so the FTP was done before the cumulusutils.exe were executed causing the previous days files to be FTP.

I've looked at Phil's batch file which he indicates has a delay to wait a few seconds, but so far beyond my understanding how to put that together and use it.
I could have the files FTP at the Cumulus 5 min interval (all except maps) instead at end of day but that would be overkill.


Edit: just thought of a way, instead of CumulusMX Extra web files to FTP at End of day, use Cumulus Toolbox to FTP at a time after 12:00 am.

Enjoy,
Paul
Davis Vantage Pro 2 - Windows 8 - Cumulus v1.9.4 b.1099 - CumulusMX/WiFiLogger
www.komokaweather.com
www.komokaweather.com/cumulusmx
www.komokaweather.ca
www.komokaweather.com/pws
Image

Phil23
Posts: 408
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: External program

Post by Phil23 » Wed 20 Nov 2019 6:05 am

PaulMy wrote:
Tue 19 Nov 2019 5:56 am
I've looked at Phil's batch file which he indicates has a delay to wait a few seconds, but so far beyond my understanding how to put that together and use it.
It's pretty simple really.

Code: Select all

@echo off
That just stops the commands showing in the dos box.

Code: Select all

echo Waiting a few seconds for End of Day to complete.
Puts that message in the dos box. Like print...

Code: Select all

ping localhost -n 5 > nul
Just makes the PC ping it's self to create the delay

Code: Select all

cd \cumulusmx
cumulusutils Top10 pwsFWI SysInfo Graphs MapsOn
Changes to the MX folder & runs the cumulusutils

Code: Select all

ftp -s:"\\WEATHER-PC\CumulusMX\Scripts\ftp.txt"
Runs the windows FTP command with the commands in the FTP.txt file shown above.

You don't need a lot of the rest & you can see in my FTP.txt file above the list of files I am transferring.

User avatar
HansR
Posts: 619
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: External program

Post by HansR » Wed 20 Nov 2019 8:37 am

What happened to the sleep command? eg:

Code: Select all

Sleep 10
for a 10 second delay?
Gives more control and precision.
https://meteo-wagenborgen.nl / Cumulus (3.4.3 b3067)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster) / 4.19.97-v7+ armv7l
Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:51:48 UTC 2020)

Phil23
Posts: 408
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: External program

Post by Phil23 » Wed 20 Nov 2019 4:46 pm

HansR wrote:
Wed 20 Nov 2019 8:37 am
What happened to the sleep command?
Hmmm
The simple things we forget.....

That one must have long slipped out of my DOS command memory bank.

I do recall though that I had left the > NUL off initially for feedback during debugging.

Phil23
Posts: 408
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: External program

Post by Phil23 » Wed 20 Nov 2019 7:58 pm

Just tried to refresh my brain a bit on a few dos commands.

Appears Sleep does not exist as an internal or default installed external command.

Apparently it was distributed in some Win Resource kits.

Win 7 & above include Timeout.

Timeout /t 10 [/nobreak]

It can be aborted with CTRL-C & in that case it will return an Errorlevel=1

Useful for jumping over bits.

Phil.

User avatar
HansR
Posts: 619
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: External program

Post by HansR » Wed 20 Nov 2019 9:35 pm

Mmm... Must have been win10 too long :)
https://meteo-wagenborgen.nl / Cumulus (3.4.3 b3067)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian GNU/Linux 10 (buster) / 4.19.97-v7+ armv7l
Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:51:48 UTC 2020)

User avatar
PaulMy
Posts: 2062
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: External program

Post by PaulMy » Wed 20 Nov 2019 9:52 pm

Using CumulusMX External programs Daily program works great with the 5 parameters. Cumulus Toolbox with FTP at shortly after midnight then updates on webserver for all 8 files. The only obstacle is the processing of the systeminfoTable.txt file before the FTP. Hoping my sequence order allows for processing before FTP. I will know after midnight.

As you can detect, I am hesitate :oops: to implement a Windows scheduler and DOS batch file.

Enjoy,
Paul
Davis Vantage Pro 2 - Windows 8 - Cumulus v1.9.4 b.1099 - CumulusMX/WiFiLogger
www.komokaweather.com
www.komokaweather.com/cumulusmx
www.komokaweather.ca
www.komokaweather.com/pws
Image

Phil23
Posts: 408
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
Location: Australia

Re: External program

Post by Phil23 » Thu 21 Nov 2019 9:34 pm

PaulMy wrote:
Wed 20 Nov 2019 9:52 pm
As you can detect, I am hesitate :oops: to implement a Windows scheduler and DOS batch file.
In that case why not experiment a bit with some simple stuff to try.

Stuff that won't impact your data.

Start out with a batch file like this....
(Call it Test.bat)

Code: Select all

pause
Echo Hello
Dir C:\
pause
Then work out how to schedule it & set it to run a minute of two from the time when you are testing.

As you get the hang try adding other things that will not use your data until you get confident.

Phil

Post Reply