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

Realtime extra program not firing

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

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

Realtime extra program not firing

Post by weathersoft »

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

Re: Realtime extra program not firing

Post by steve »

I'm no expert at this, but have you tried /bin/bash as the command and your script as the parameter?
Steve
weathersoft
Posts: 4
Joined: Thu 29 Jun 2017 12:13 pm
Weather Station: Davis Vantage Pro2
Operating System: Raspbian

Re: Realtime extra program not firing

Post by weathersoft »

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: 22
Joined: Sat 29 Mar 2014 7:33 am
Weather Station: WH2650
Operating System: Debian 9
Location: Steeple Claydon
Contact:

Re: Realtime extra program not firing

Post by Steepleian »

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: 4
Joined: Thu 29 Jun 2017 12:13 pm
Weather Station: Davis Vantage Pro2
Operating System: Raspbian

Re: Realtime extra program not firing

Post by weathersoft »

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.
Locked