[arm-allstar] Set RC-210 clock from Allstar nodes
Mike Sullivan
kn4imu at gmail.com
Fri Nov 19 20:16:02 EST 2021
Larry, that's a pretty interesting script, I'll have to check it out. Mine
is a lot more basic. I have three separate scripts, unlock, program, and
lock, all set up with the appropriate commands ( /usr/bin/asterisk -rx "rpt
cmd *nodenumber* cop 48 *D,T,M,F*" ), then have a cron job set at 0359,
which sleeps for 40 seconds, runs the unlock script, sleeps for 5 seconds,
run the program script (setting the time for 0400) sleeps for 5 seconds,
then runs the lock script. This was the best way I could find it to do what
I wanted it to do, and keeps the time on the controller within 2-3 seconds
of the time set. (Ours is currently set to run every night but I might
change it to run once a week instead)
59 03 * * * (sleep 40 && /etc/asterisk/local/time_unlock.sh && sleep 10 &&
/etc/asterisk/local/time_program.sh && sleep 10 &&
/etc/asterisk/local/time_lock.sh)
Mike
On Fri, Nov 19, 2021 at 6:37 PM "larry via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:
> Sorry for that blank page. it was supposed to read as follows
>
> An Allstar Discussion Group reply message from Ken at Arcom
> Deals with how to set the RC-210 clock from your Allstar node by sending
> DTMF.
> The php script included below will generate the DTMF commands heard by
> you RC-210 Controller and set the controllers date and time.
>
> Comment-Example Notes edited by N7FM
>
> Chris
> You might find this useful.
>
> I run 5 private nodes, each one is connected to an RC210 controller. I
> use the following PHP script to set the clock/calendar and the script is
> called by a cronjob.
>
> It should show you how to pass DTMF to your controller using
> “on-the-fly” digits whereas the Wiki only shows predefined digits to be
> sent
>
> Notes: Node # is 1100
> Unlock Code shown is default for this display
>
> // Notes: Addition
> // Example Node # is 1100 - change ALL references to node "1100" in this
> script to your Allstar node number running this script:
> // Unlock Code shown is default for this display - change the numbers
> after "48" to the unlock numbers assigned to port 1 on your controller.
> // The letter D at the end needs to remain.
> ------------------------
>
> <?php
> //Get ID out of the way by kerchunking and waiting for ID to
> finish:
> exec("/usr/sbin/asterisk -rx 'susb key'");
> exec("/usr/sbin/asterisk -rx 'susb unkey'");
> Sleep(10);
>
> // Change the "1100" node number as well as the numbers after "48"
> to
> the unlock numbers assigned to port 1 on your controller.
> // The letter D at the end needs to remain.
> print "Sending Unlock\r\n";
> exec("/usr/sbin/asterisk -rx 'rpt cmd 28162 cop 48
> 0,1,2,7,4,2,D'");
> sleep(5.0);
>
> $senddata = "*5100" . date("His");
> $senddata= str_split($senddata);
> $senddata = implode(",",$senddata);
> $senddata = $senddata . ",D";
> print "Setting Clock\r\n";
> exec("/usr/sbin/asterisk -rx 'rpt cmd 28162 cop 48 $senddata'");
>
> $senddata ="*5101" . date("mdy");
> $senddata = str_split($senddata);
> $senddata = implode(",",$senddata);
> $senddata = $senddata . ",D";
> sleep(5.0);
> print "Setting Calendar\r\n";
> exec("/usr/sbin/asterisk -rx 'rpt cmd 28162 cop 48 $senddata'");
>
> sleep(5.0);
>
> print "Sending Lock\r\n";
> exec("/usr/sbin/asterisk -rx 'rpt cmd 28162 cop 48 #,D'");
> ?>
>
>
> On 11/19/21 1:11 PM, "larry via ARM-allstar" wrote:
> _______________________________________________
>
> 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