If you use Cumulus, please donate Image

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

Realtime extra program not firing

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.
weathersoft
Posts: 7
Joined: Thu Jun 29, 2017 12:13 pm
Weather Station: Davis Vantage Pro2
Operating System: Raspbian

Realtime extra program not firing

Postby weathersoft » Thu Jul 20, 2017 5:20 am

I have been trying to get an extra script to fire when the Realtime processing runs in Cumulus MX, but I can't get it to work.

In the Web/FTP Settings I have the options Enable Realtime, Enable realtime FTP and Realtime.txt FTP all checked. The realtime.txt file is successfully being uploaded to the FTP server, so I know the standard realtime processing is firing. Under External programs I have entered the following in Realtime program: "/home/pi/cumulusFTP.sh". When I check in Cumulus.ini it has the following line:

Code: Select all

RealtimeProgram=/home/pi/cumulusFTP.sh

I have my script cumulusFTP.sh set up in /home/pi and with execute rights to everyone. I can run it by entering "/home/pi/cumulusFTP.sh" at the command line and it executes. I know it has executed because I have the following as the first line of the script:

Code: Select all

echo "Sending realtime file to remote server" >/tmp/temp.tmp

When I execute the script manually the file /tmp/temp.tmp is updated as expected. But it never gets updated at any other time, so I know that it is not getting executed by Cumulus. I have tried restarting Cumulus MX but that doesn't help either. What could be going wrong? Why is Cumulus not executing the script?

I am running Cumulus MX 3.0.0 b3043 under mono v3.2.8 on Raspberry PI Raspbian Linux.

Can anyone assist?

User avatar
steve
Cumulus Author
Posts: 26074
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: Davis VP2
Operating System: Raspbian
Location: Sanday, Orkney
Contact:

Re: Realtime extra program not firing

Postby steve » Thu Jul 20, 2017 7:01 am

I'm no expert at this, but have you tried /bin/bash as the command and your script as the parameter?
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Like Cumulus and want to support it? Please donate! Image

weathersoft
Posts: 7
Joined: Thu Jun 29, 2017 12:13 pm
Weather Station: Davis Vantage Pro2
Operating System: Raspbian

Re: Realtime extra program not firing

Postby weathersoft » Fri Jul 21, 2017 1:25 am

Steve, apparently you are an expert at this! I did as you suggested and it started working straight away.

I think the Cumulus doc could do with a bit of updating in this area. It suggests that the field should contain a "program or command to be run", but it seems that at least in the Unix case a shell script doesn't count as a "program", which is odd since I believe people with .BAT/.CMD scripts on Windows are executing these directly. Anyway, I should have tried using /bin/bash ... silly me. And this forum topic will serve to alert anyone else who is trying this in future so all good.

For reference for anyone else doing something similar, I now have this in the Cumulus.ini and is working:

Code: Select all

RealtimeProgram=/bin/bash
RealtimeParams=/home/pi/cumulusFTP.sh

Thanks for the help!

Steepleian
Posts: 40
Joined: Sat Mar 29, 2014 7:33 am
Weather Station: Ambient WS-1001
Operating System: Raspbian Stretch
Location: Steeple Claydon
Contact:

Re: Realtime extra program not firing

Postby Steepleian » Sat Jul 22, 2017 8:49 am

weathersoft wrote:Steve, apparently you are an expert at this! I did as you suggested and it started working straight away.

I think the Cumulus doc could do with a bit of updating in this area. It suggests that the field should contain a "program or command to be run", but it seems that at least in the Unix case a shell script doesn't count as a "program", which is odd since I believe people with .BAT/.CMD scripts on Windows are executing these directly. Anyway, I should have tried using /bin/bash ... silly me. And this forum topic will serve to alert anyone else who is trying this in future so all good.

For reference for anyone else doing something similar, I now have this in the Cumulus.ini and is working:

Code: Select all

RealtimeProgram=/bin/bash
RealtimeParams=/home/pi/cumulusFTP.sh

Thanks for the help!


Did you make the shell script executable using chmod +x ?

weathersoft
Posts: 7
Joined: Thu Jun 29, 2017 12:13 pm
Weather Station: Davis Vantage Pro2
Operating System: Raspbian

Re: Realtime extra program not firing

Postby weathersoft » Sun Jul 23, 2017 8:02 am

Did you make the shell script executable using chmod +x ?

Oh yes, it was definitely executable. chmod 755 was done right after the script was created. Directory listing as shown here:

Code: Select all

pi@raspberrypi:~ $ ls -l cumulusFTP.sh
-rwxr-xr-x 1 pi pi 259 Jul 21 11:28 cumulusFTP.sh

I could also verify that by executing it from the command line as "/home/pi/cumulusFTP.sh", which wouldn't have worked if it was not executable.


Return to “Cumulus MX”

Who is online

Users browsing this forum: No registered users and 5 guests