-
Notifications
You must be signed in to change notification settings - Fork 131
Items DSC_Alarm
See original
$DSC_Alarm = new DSC_Alarm;
if (my $log = said $DSC_Alarm) {
print_log "Alarm system data = $log\n";
}
DSC_Alarm:2_serial_port=com5
$DSC_test = new DSC_Alarm('DSC_Alarm:2');
if (my $state = state $DSC_test) {
print_log "Alarm system state change, state = $state\n";
}
DSC_Alarm
module supports the DSC PC5400 serial printer interface. This allows MisterHouse to be aware of events that DSC alarm systems log to their event buffers
The PC5400 works with: PC5010, PC1555, PC580, PC5015, and PC1575 main panels.
DSC programming location 801 subsection 01 set to:
1-3---78
1 = Printer Enabled
2 = Handshake from printer (DTR)
3 = 80 Column Printer (off = 40 Column)
4 = 300 Baud Enabled
5 = 1200 Baud Enabled
6 = 2400 Baud Enabled
7 = 4800 Baud Enabled
8 = Local clock displays 24hr time
DSC programming location 801 subsection 02 set to: 01 = English
Logging: The internal support module for DSC_Alarm (DSC_Alarm.pm
) maintains a log of all serial data received from the DSC PC5400 interface. This log is placed in /mh.ini parm data_dir/logs/$port_name.YYYY_MM.log;
for example, the log entries shown below would be in file '/mh/data/logs/DSC_Alarm.2000_10.log'
. This implies a new log will be started each month.
DSC User Codes:
40 = Master code (can arm/disarm, change codes, any keypad function)
41 = Supervisor code (can arm/disarm, change codes)
42 = Supervisor code (can arm/disarm, change codes)
01-32 = User codes (can arm/disarm, can be associated to individual wireless keys)
33 = Duress code (can arm/disarm + sends duress code to master station)
34 = Duress code (can arm/disarm + sends duress code to master station)
The above information derived from PC1555 master panel; please see the installer manual for your particular panel for further information.
Duress code reporting is NOT reflected via states as of December 2000. Coming soon...
Examples of typical DSC alarm system event/log entries:
Mon 10/09/00 17:09:00 DSC_Alarm.pm Initialized
Mon 10/09/00 17:10:16 17:10 10/09/00 System [*1] Access by User
Mon 10/09/00 17:12:28 17:12 10/09/00 System Partial Closing
Mon 10/09/00 17:12:28 17:12 10/09/00 System Bypass Zone 1
Mon 10/09/00 17:12:28 17:12 10/09/00 System Bypass Zone 2
Mon 10/09/00 17:12:28 17:12 10/09/00 System Bypass Zone 4
Mon 10/09/00 17:12:29 17:12 10/09/00 System Closing by User Code 40
Mon 10/09/00 17:12:29 17:12 10/09/00 System Armed in Away Mode
Mon 10/09/00 17:12:45 17:12 10/09/00 System Opening by User Code 2
Mon 10/09/00 17:14:42 17:14 10/09/00 System Closing by User Code 40
Mon 10/09/00 17:14:43 17:14 10/09/00 System Armed in Away Mode
Mon 10/09/00 17:14:47 17:14 10/09/00 System Opening by User Code 40
Mon 10/09/00 17:22:28 17:22 10/09/00 System [*1] Access by User
Mon 10/09/00 17:33:39 DSC_Alarm.pm Initialized
Tue 10/10/00 09:47:38 09:47 10/10/00 System Closing by User Code 40
Tue 10/10/00 09:47:38 09:47 10/10/00 System Armed in Away Mode
Tue 10/10/00 17:48:42 17:48 10/10/00 System Opening by User Code 40
Tue 10/10/00 23:37:33 23:37 10/10/00 System Closing by User Code 40
Tue 10/10/00 23:37:33 23:37 10/10/00 System Armed in Away Mode
Wed 10/11/00 07:38:11 07:38 10/11/00 System Opening by User Code 40
Method | Description |
---|---|
serial_startup |
Create serial port(s) according to mh.ini Register hooks if any ports created. |
new('alarm-name') |
Where 'alarm-name' is the prefix used in the mh.ini entry 'DSC_Alarm_serial_port=xyz' . The 'alarm-name'argument defaults to 'DSC_Alarm'` if not specified. |
said |
Returns the last serial data received. Valid for 1 pass only. Important Note: Due to MisterHouse internals, the "said" method and the "state" method (and all "state" derived methods) lag each other's values by 1 pass through the user scripts. As such, any given script should use "said" or "state", but should NOT mix the two! |
user |
User number of last code used to arm/disarm system. If present, mh.ini parm DSC_Alarm_user_nn=xyz will cause "user" to return string "xyz" from the parm. |
alarm_now |
True when system enters Alarm state. Valid for 1 pass only. |
zone |
Zone number that caused Alarm. Valid only when alarm_now is true. |
mode |
Returns arming mode. Valid only when state = Armed. Stay = System armed in stay mode; User pressed F1 key before arming. Away = System armed in away mode; User pressed F2 key (or nothing) before arming Note: Most DSC systems will not arm in "Stay" mode unless at least one zone is defined as a "Stay/Away" zone. Also, even when "Away" mode is requested system will be in "Stay" mode unless a delay zone is violated during the exit delay. |
Method | Description |
---|---|
state |
Returns last state of alarm system from following values: Armed = System is closed and armed. Disarmed = System is opened. Alarm = System is alarming. |
state_now |
Same as state, but valid for 1 pass only. |
DSC_Alarm_serial_port=com2
DSC_Alarm_serial_port=COM1 or /dev/ttys0
DSC_Alarm_baudrate=4800
Multiple instances may be supported by adding instance numbers to the parms as in:
DSC_Alarm:1_serial_port=COMx or /dev/ttysX
DSC_Alarm:1_baudrate=4800
DSC_Alarm:2_serial_port=COMy or /dev/ttysY
DSC_Alarm:2_baudrate=4800
Optional mh.ini entries:
DSC_Alarm_user_40=Jane Doe
DSC_Alarm_user_1=Bob Smith
By: Danal Estes, N5SVV E-Mail: [email protected]
Based on original code by Bill Sobel: [email protected]
See mh/code/public/Danal/DSC_Alarm.pl
for more info/examples