[arm-allstar] Set RC-210 clock from Allstar nodes
larry
larry at n7fm.com
Fri Nov 19 18:28:05 EST 2021
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:
More information about the ARM-allstar
mailing list