[arm-allstar] Turn Scheduler On and Off with * code

David McGough kb4fxc at inttek.net
Tue Mar 7 22:49:30 EST 2023


BTW, since some e-mail software might clobber the formatting of the
copy-and-paste scripts, you can directly copy them from this web page, as
viewed in your web browser and then paste into bash.

http://lists.hamvoip.org/pipermail/arm-allstar/2023-March/018517.html

73, David K4FXC



On Tue, 7 Mar 2023, David McGough via ARM-allstar wrote:

> 
> Hi Earl,
> 
> This is simple to do, and there are probably at least a dozen ways to 
> accomplish this task.  Here is on way, using a small script running from 
> the system cron daemon.  There are 3 steps in setting this up.
> 
> ......First, place this bash script in the /etc/asterisk/local folder.  
> The location is arbitrary, the reasoning behind placing in this folder is
> that it'll probably get backed up.  Here is the script.  Note that the
> script is named "runsched" and is wrapped in the "cat" command, so that
> you can copy-and-paste the whole sequence into the bash shell to
> automatically create the script:
> 
> 
> ########## Start copy-paste into bash shell at this line  #############
> cat <<'EOF' > /etc/asterisk/local/runsched
> #!/bin/bash
> 
> source /usr/local/etc/allstar.env
> SA=$(find /tmp -name SWAEnabled -mmin +10)
> 
> if [ -f "$SA" ] ; then
> 	/sbin/asterisk -rx "rpt localplay $NODE1 /etc/asterisk/local/SkywarnActivation"
> 	/bin/touch $SA
> fi
> EOF
> chmod 755 /etc/asterisk/local/runsched
> ########## Stop copy-paste at this line  #############
> 
> 
> ......The second step is to add these commands to your rpt.conf file, in
> the proper [functions] stanza, just at the current 925 command:
> 
> ; rpt.conf DTMF macros
> 980=cmd,/bin/touch -t 0001011111 /tmp/SWAEnabled
> 981=cmd,/bin/rm /tmp/SWAEnabled
> ;
> 
> 
> ......The final step is to add this line to your root crontab file.  This 
> can be accomplished by running the "crontab -e" command from the bash 
> prompt.  Here is the line to add:
> 
> # Crontab entry for Skywarn Scheduler
> * * * * * /etc/asterisk/local/runsched
> 
> 
> ......That's it! Save this updated crontab file (control-X) and then 
> restart asterisk (or just run "rpt reload" from the asterisk CLI).  You 
> should now be able to activate the Skywarn announcement, having it play 
> every 10 minutes.
> 
> 
> 73, David K4FXC
> 
> 
> 
> On Mon, 6 Mar 2023, Earl Hassemer via ARM-allstar wrote:
> 
> > David
> > 
> > I am running Hamvoip but not Autosky as we do not have internet at the 
> > repeater site so I am working on adding a ds-1307 clk module so that this 
> > can work at a repeater site.
> > 
> > I have all of the messages that are getting run for all of the different 
> > items that the site needs to run from hour to hour, day to day and week to 
> > week. but if there is a skyward activation because of the weather I need to 
> > have some one on the repeater send a * code like *980 to activate the 
> > message that we can do by hand now with the *925 but would like to be able 
> > to do something like *980 and cause the *925 play every 10 minutes until 
> > some one does a code like *981 to stop the *925 message.
> > 
> > This is the path to the recording that is getting played now when we do a 
> > *925 and that is the name of the recording SkywarnActivation.ul
> > rtp.conf file has this.
> > 925=localplay,/etc/asterisk/local/SkywarnActivation
> > 
> > 
> > Earl
> > W9EJH
> > -----Original Message----- 
> > From: David McGough
> > Sent: Monday, March 06, 2023 3:04 AM
> > To: Earl Hassemer via ARM-allstar
> > Cc: Earl Hassemer
> > Subject: Re: [arm-allstar] Turn Scheduler On and Off with * code
> > 
> > 
> > Hi Earl,
> > 
> > There are several easy ways to accomplish what you're wanting to do.
> > First, a few questions:
> > 
> > ...Are you running the hamvoip-autosky package?
> > 
> > ...What is the whole command (from rpt.conf) that get run when you
> > initiate a *925 sequence?
> > 
> > 
> > 73, David K4FXC
> > 
> > 
> > 
> > 
> > On Sun, 5 Mar 2023, Earl Hassemer via ARM-allstar wrote:
> > 
> > > I have setup a *925 to play a skywarn activated message and that works 
> > > good in Hamvoip software.
> > >
> > > Now I would like to setup a schedule to play the skywarn activated message 
> > > when I activate it with a *980 and play once every 10 minutes until I 
> > > enter another *981 to stop the skywarn is activated message.
> > >
> > > I am not sure how to use Scheduler Enable COP 15 and Scheduler Disable COP 
> > > 16 and have not been able to find much in searching the forum for the past 
> > > years that I did the search in.
> > >
> > > Maybe that is not even the best way to do it but I have been able to setup 
> > > a macro 33 to play the message and I also was able to setup a schedule 33 
> > > to play at a certain time but not able to turn the schedule 33 on or off 
> > > as I do not know how.
> > >
> > > Is there anyone out there that knows how I can get this done.
> > >
> > > Earl
> > > W9EJH
> > > _______________________________________________
> > >
> > > ARM-allstar mailing list
> > > ARM-allstar at hamvoip.org
> > > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> > >
> > > Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> > >
> > 
> > Earl
> > W9EJH
> > _______________________________________________
> > 
> > ARM-allstar mailing list
> > ARM-allstar at hamvoip.org
> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> > 
> > Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> > 
> 
> _______________________________________________
> 
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> 
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> 



More information about the ARM-allstar mailing list