You are visiting:Home arrow TE Systems Tuesday, 19 August 2008
Time Announcer PDF Print
Written by Administrator   
Friday, 08 February 2008
Add this simple script to your node for readback of local time.  It can be called by a cron job for hourly time announcements, or via a DTMF command for, "on demand" time announcements.  The script is available here:
http://rob.pectol.com/irlp/scripts/time_announce

It uses a text to speech engine (Festival) to report back, in voice, the local time.  To make this work on your node, simply install Festival (do, "yum install festival" as root, without quotes) and then place my time announcer script (time_announce) in your /home/irlp/custom directory. It supports AUX line PTT for those nodes that are configured to use it. Simply open time_announce in a text editor and modify the, "user configurable settings" near the top of it. Then, make sure it is owned by user repeater and in group repeater. Also make sure it is set executable (chmod 750 time_announce). At this point, you should be able to run it from the command line and have it announce the local time!  If you want to be able to call this script from your DTMF keypad, simply add the following to your /home/irlp/custom/custom_decode file:

 

 # report the local time
if [ "$1" = "AA" ]; then
    $CUSTOM/time_announce & >&/dev/null 2>&1
    exit 1
fi

 

That would cause the DTMF sequence, "AA" to call the time_announce script.  To have your node announce the time on the hour, between the hours of 0700 and 2200, add the following line to your /home/irlp/custom/custom.crons file:

00 07-22 * * * (/home/irlp/custom/time_announce & >/dev/null 2>&1)

Make sure that is all on one line.  Then do, "update files" as user repeater to have the new crontab entry take affect.  Enjoy!   Wink

Last Updated ( Saturday, 09 February 2008 )
 
< Prev   Next >
  • JoomlaWorks AJAX Header Rotator
  • JoomlaWorks AJAX Header Rotator
Search My Site
Misc. Scripts
Connectivity Checker
PTT Timeout Override
IRLP Watchdog Timer
Uptime Announcer
Time Announcer
Send Serial Data
Node Rebooter
Connection Status
Audio Data Sensor
Star69