Script and TCP/IP Interface Specification for the ISONAS Access Control System
September 2012
ISONAS Security Systems 303-567-6516
www.ISONAS.com
1
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
Table of Contents Revision History ................................................................................................................. 8 Introduction ....................................................................................................................... 11 Architecture....................................................................................................................... 11 Connecting to the TCP/IP Server...................................................................................... 12 Restart Interval .............................................................................................................. 12 Encrypt and Encryption Key......................................................................................... 12 LOGON Process ........................................................................................................... 13 Syntax: ...................................................................................................................... 13 Response: .................................................................................................................. 13 Command Access Levels: ......................................................................................... 13 Connecting to External Systems via TCP/IP .................................................................... 14 Defining a New External Connection ........................................................................... 14 Editing Existing Connection Definitions ...................................................................... 16 Deleting an Existing Connection .................................................................................. 17 EVENT Notification ......................................................................................................... 17 Summary of Command Functional Capabilities ............................................................... 18 Format/Syntax ............................................................................................................... 20 Command parameter validation restrictions ................................................................. 20 COMMENTS .................................................................................................................... 22 Description: ................................................................................................................... 22 Syntax: .......................................................................................................................... 22 SUPERVISOR .................................................................................................................. 22 Description: ................................................................................................................... 22 Syntax: .......................................................................................................................... 22 Response: ...................................................................................................................... 23 CONNECTION................................................................................................................. 24 Description: ................................................................................................................... 24 Syntax: .......................................................................................................................... 24 Response: ...................................................................................................................... 24 DOORS ............................................................................................................................. 24 Description: ................................................................................................................... 24 Syntax: .......................................................................................................................... 24 Response: ...................................................................................................................... 26 DOORGROUP.................................................................................................................. 26 Description: ................................................................................................................... 26 Syntax: .......................................................................................................................... 26 Response: ...................................................................................................................... 26 DOORGROUPMEMBER ................................................................................................ 26 Description: ................................................................................................................... 26 Syntax: .......................................................................................................................... 26 Response: ...................................................................................................................... 27 ISONAS Security Systems 303-567-6516
www.ISONAS.com
2
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
GROUPNAME ................................................................................................................. 27 Description: ................................................................................................................... 27 Syntax: .......................................................................................................................... 27 Response: ...................................................................................................................... 27 HOLIDAYS ...................................................................................................................... 27 Description: ................................................................................................................... 27 Syntax: .......................................................................................................................... 27 Response: ...................................................................................................................... 27 IDFILE .............................................................................................................................. 28 Description: ................................................................................................................... 28 Syntax: .......................................................................................................................... 28 Response: ...................................................................................................................... 28 IDFILE Image Files .......................................................................................................... 28 Description: ................................................................................................................... 28 Syntax: .......................................................................................................................... 29 Response: ...................................................................................................................... 29 GROUPS ........................................................................................................................... 30 Description: ................................................................................................................... 30 Syntax: .......................................................................................................................... 30 Response: ...................................................................................................................... 30 BADGES........................................................................................................................... 31 Description: ................................................................................................................... 31 Syntax: .......................................................................................................................... 31 Response: ...................................................................................................................... 31 GUIDs Associated with BADGES ................................................................................... 31 Description: ................................................................................................................... 31 Syntax: .......................................................................................................................... 31 Response: ...................................................................................................................... 32 SHIFTS ............................................................................................................................. 33 Description: ................................................................................................................... 33 Syntax: .......................................................................................................................... 33 Response: ...................................................................................................................... 33 PERMISSION ................................................................................................................... 34 Description: ................................................................................................................... 34 Syntax: .......................................................................................................................... 34 Response: ...................................................................................................................... 34 PERMISSIONGROUP ..................................................................................................... 34 Description: ................................................................................................................... 34 Syntax: .......................................................................................................................... 34 APPLY .............................................................................................................................. 35 Description: ................................................................................................................... 35 Syntax: .......................................................................................................................... 35 Response: ...................................................................................................................... 36 ADMIT ............................................................................................................................. 36 Description: ................................................................................................................... 36 ISONAS Security Systems 303-567-6516
www.ISONAS.com
3
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
Syntax: .......................................................................................................................... 36 Response: ...................................................................................................................... 36 UNLOCK .......................................................................................................................... 37 Description: ................................................................................................................... 37 Syntax: .......................................................................................................................... 37 Response: ...................................................................................................................... 37 LOCKDOWN ................................................................................................................... 37 Description: ................................................................................................................... 37 Syntax: .......................................................................................................................... 37 Response: ...................................................................................................................... 38 RESETNORMAL ............................................................................................................. 38 Description: ................................................................................................................... 38 Syntax: .......................................................................................................................... 38 Response: ...................................................................................................................... 38 SETHOSTOVERRIDE ..................................................................................................... 38 Description: ................................................................................................................... 38 Syntax: .......................................................................................................................... 38 Response: ...................................................................................................................... 39 SETLOCAL ...................................................................................................................... 39 Description: ................................................................................................................... 39 Syntax: .......................................................................................................................... 39 Response: ...................................................................................................................... 39 PRESENTBADGE ........................................................................................................... 39 Description: ................................................................................................................... 39 Syntax: .......................................................................................................................... 39 Response: ...................................................................................................................... 40 PRESENTGUID ............................................................................................................... 40 Description: ................................................................................................................... 40 Syntax: .......................................................................................................................... 40 Response: ...................................................................................................................... 40 QUEUE EMAIL ............................................................................................................... 41 Description: ........................................................................................................... 41 Syntax: .................................................................................................................. 41 Response: .............................................................................................................. 41 QUERY ............................................................................................................................. 42 Description: ................................................................................................................... 42 BADGE ..................................................................................................................... 42 Description: ........................................................................................................... 42 Syntax: .................................................................................................................. 42 Response: .............................................................................................................. 42 ALL DOORS ............................................................................................................ 42 Description: ........................................................................................................... 42 Syntax: .................................................................................................................. 42 Response: .............................................................................................................. 42 DOORS ..................................................................................................................... 44 ISONAS Security Systems 303-567-6516
www.ISONAS.com
4
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
Description: ........................................................................................................... 44 Syntax: .................................................................................................................. 44 Response: .............................................................................................................. 44 ALL DOORGROUPS ............................................................................................... 45 Description: ........................................................................................................... 45 Syntax: .................................................................................................................. 45 Response: .............................................................................................................. 45 DOORGROUP.......................................................................................................... 45 Description: ........................................................................................................... 45 Syntax: .................................................................................................................. 45 Response: .............................................................................................................. 45 GROUPNAMES ....................................................................................................... 46 Description: ........................................................................................................... 46 Syntax: .................................................................................................................. 46 Response: .............................................................................................................. 46 GROUP ..................................................................................................................... 46 Description: ........................................................................................................... 46 Syntax: .................................................................................................................. 46 Response: .............................................................................................................. 46 ALL GROUPS .......................................................................................................... 47 Description: ........................................................................................................... 47 Syntax: .................................................................................................................. 47 Response: .............................................................................................................. 47 ALL SHIFTS ............................................................................................................ 47 Description: ........................................................................................................... 47 Syntax: .................................................................................................................. 47 Response: .............................................................................................................. 47 SHIFT ....................................................................................................................... 48 Description: ........................................................................................................... 48 Syntax: .................................................................................................................. 48 Response: .............................................................................................................. 48 ALL HOLIDAYS ..................................................................................................... 49 Description: ........................................................................................................... 49 Syntax: .................................................................................................................. 49 Response: .............................................................................................................. 49 ALL IDFILE ............................................................................................................. 49 Description: ........................................................................................................... 49 Syntax: .................................................................................................................. 49 Response: .............................................................................................................. 49 IDFILE ...................................................................................................................... 50 Description: ........................................................................................................... 50 Syntax: .................................................................................................................. 50 Response: .............................................................................................................. 50 IDFILE IMAGES...................................................................................................... 50 Description: ........................................................................................................... 50 ISONAS Security Systems 303-567-6516
www.ISONAS.com
5
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
Syntax: .................................................................................................................. 50 Response: .............................................................................................................. 50 ALL BADGES .......................................................................................................... 51 Description: ........................................................................................................... 51 Syntax: .................................................................................................................. 51 Response: .............................................................................................................. 51 BADGE BADGEID .................................................................................................. 52 Description: ........................................................................................................... 52 Syntax: .................................................................................................................. 52 Response: .............................................................................................................. 52 BADGE UNIQUEID ................................................................................................ 53 Description: ........................................................................................................... 53 Syntax: .................................................................................................................. 53 Response: .............................................................................................................. 53 BADGE GUID .......................................................................................................... 54 Description: ........................................................................................................... 54 Syntax: .................................................................................................................. 54 Response: .............................................................................................................. 54 PERMISSIONS......................................................................................................... 55 Description: ........................................................................................................... 55 Syntax: .................................................................................................................. 55 Response: .............................................................................................................. 55 HISTORY ................................................................................................................. 56 Description: ........................................................................................................... 56 Syntax: .................................................................................................................. 56 Response: .............................................................................................................. 56 IO MODULES .......................................................................................................... 58 Description: ........................................................................................................... 58 Syntax: .................................................................................................................. 58 Response: .............................................................................................................. 58 IOMODULE ............................................................................................................. 60 Description: ........................................................................................................... 60 Syntax: .................................................................................................................. 60 Response: .............................................................................................................. 60 Response: .............................................................................................................. 60 STATUS ................................................................................................................... 61 Description: ........................................................................................................... 61 Syntax: .................................................................................................................. 61 Response: .............................................................................................................. 61 ACTIVE ALARMS .................................................................................................. 63 Description: ........................................................................................................... 63 Syntax: .................................................................................................................. 63 Response: .............................................................................................................. 63 CLEAR ALARMS ............................................................................................................ 63 Description: ................................................................................................................... 63 ISONAS Security Systems 303-567-6516
www.ISONAS.com
6
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
Syntax: .......................................................................................................................... 63 SET IOMODULE ............................................................................................................. 64 Description: ................................................................................................................... 64 Syntax: .......................................................................................................................... 64 Response: ...................................................................................................................... 65 SETLOGGING ................................................................................................................. 66 Description: ................................................................................................................... 66 Syntax: .......................................................................................................................... 66 Response: ...................................................................................................................... 66 ENABLE ........................................................................................................................... 66 Description: ................................................................................................................... 66 Syntax: .......................................................................................................................... 66 Response: ...................................................................................................................... 66 DISABLE .......................................................................................................................... 67 Description: ................................................................................................................... 67 Syntax: .......................................................................................................................... 67 Response: ...................................................................................................................... 67 ARM ................................................................................................................................. 67 Description: ................................................................................................................... 67 Syntax: .......................................................................................................................... 67 Response: ...................................................................................................................... 68 DISARM ........................................................................................................................... 68 Description: ................................................................................................................... 68 Syntax: .......................................................................................................................... 68 Response: ...................................................................................................................... 68 SET TTL ........................................................................................................................... 69 Description: ................................................................................................................... 69 Syntax: .......................................................................................................................... 69 Response: ...................................................................................................................... 69 QUEUE SCRIPT .............................................................................................................. 69 Description: ................................................................................................................... 69 Syntax: .......................................................................................................................... 69 Response: ...................................................................................................................... 69 DEQUEUE SCRIPT ......................................................................................................... 70 Description: ................................................................................................................... 70 Syntax: .......................................................................................................................... 70 Response: ...................................................................................................................... 70 Error Table ........................................................................................................................ 70 APPENDIX A – AES Encryption Library........................................................................ 72 LOGON Process with encryption enabled.................................................................... 73
ISONAS Security Systems 303-567-6516
www.ISONAS.com
7
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
Revision History Revision Date 7/16/2008
Author Roger Matsumoto
8/4/2008
Roger Matsumoto
9/11/2008
Rmb
10/6/2008
Rmb
10/13/2008
Rmb
10/21/2008 11/04/2008
Rmb Rmb
1/9/2009
Rmb
2/9/2009
Roger Matsumoto
5/4/2009
Rmb
ISONAS Security Systems 303-567-6516
Description Initial revision entry – added command parameter requirements table; enhanced command descriptions; clarified parameter descriptions. Formatting changes; Added Syntax table of commands in new appendix; Updated/corrected descriptive statements of command parameters; Delete Supervisor – rmv supervisor name and port Add Doors – dual auth values 0-3 Delete Doors – rms Servername and Port as cmd parameters Updated other commands to reflect the parameter requirements specified within the INRServ code . Added commands to add and delete door groups and to add and delete doors from door groups Updated command response to include IOSupervisors. Updated to include option Added events and errors associated with IO Points going True/False/Changing and clearing IO Alarms, added Query Active Alarms and Clear Alarms, modified several other Query responses. Added multiple commands per tcp/ip message. Modified and added errors to the error table. Modified SET IOMODULE to include priorities Clarified partial compile options (APPLY). Corrected ADD DOORGROUP documentation to show AREA option Added command Updated field description for start and end date of QUERY HISTORY command Updated Event to include Disable/Enable Input and Output Points . Added disable status to QUERY IOMODULE commands. Modified UNLOCK, LOCKDOWN, RESET NORMAL and CLEAR ALARM event reports to show BadgeID or “none” www.ISONAS.com
8
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
5/20/2009
Rmb
6/12/09
Rmb
7/17/2009
Roger Matsumoto
7/26/2009
Dick Burkley
8/06/2009
Dick Burkley
9/09/2009
Dick Burkley
10/05/2010
Dick Burkley
3/28/2011
Roger Matsumoto
5/27/2011 6/23/2011 7/26/2011 8/25/2011
Dick Burkley Dick Burkley Dick Burkley Dick Burkley
12/28/2011
Dick Burkley
8/29/2012
Roger Matsumoto
ISONAS Security Systems 303-567-6516
Added commands ARM,DISARM,ENABLE and DISABLE. Changed content of responses to several QUERY commands associated with IOMODULES to include additional information about the DISARM and DISABLE state. Added compile type for Resend to the APPLY command 1. ADD DOORS – the “connection” argument should be “subnet” and needs to be in the description table of the command 2. ADD HOLIDAYS – “allareaflag” default value is 0(zero) not 1(one). 3. APPLY – changed the syntax to indicate the “compiletype” flag is required and the “scope” could be optional 4. QUERY ACTIVE ALARMS – Changed response to indicate whether the “point” is an input point or an output point, and if indicated, whether the point went true or false. Added SETLOCAL command. Updated section on restart interval. Added note to PRESENT BADGE command concerning LOCAL mode Added permission group name to Add Permission command. Clarified event notification for REX and AUX alarms. Added optional specification of a doorname to the SET IOMODULE command to support the Thyssen Krupp elevator interface. Modified DOORS add command and associated error and response information. Updated RESETNORMAL description Updated SETLOCAL description Corrected ISONAS address Added List OPENED and CLOSED event as event reports and history records Added GUID to the cmd. Updated the following Event Notifications with GUID data: , , , www.ISONAS.com
9
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
9/27/2012
Dick Burkley
ISONAS Security Systems 303-567-6516
, , , , , , , Updated responses from the following commands with GUID: , , , . Updated the following response types of the command: , , , , , , , , , . The following New commands have been added: , , , , . Corrections made to the following commands: , , Added SetHostOverride command
www.ISONAS.com
10
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
Introduction This interface provides facilities to configure the Isonas Access Control database and command specific reader controller and I/O module actions by: 1. Sending TCP/IP message to the INRServ.exe (Isonas Notification Request Server) interface program 2. Writing script commands which the system executes when specified conditions are met by events that take place within the access control system. The functions in this interface that change the state of the reader controllers (Admit, Unlock, Lockdown, Reset Normal) require that the standard Isonas Access Control System Controller Supervisor program(s) (CSUP.exe) be up and running providing access control to a number of Isonas IP, WirelessIP or serial reader controllers. Other functions provided by this interface interact directly with the database tables and do not require the existence of a running controller supervisor program.
Architecture The diagram below shows the architecture of the system. Both the TCP/IP interface and the ScriptRunner are included within the INRServ application.
The TCP/IP interface sends notification of all events which occur within the access control system to all of the client programs that have connected to it, including the Script Runner program. The Script Runner program compares these events to the event filters that have been specified. When an event matches the specified criteria the script itself is processed, sending commands to the TCP/IP interface for execution.
ISONAS Security Systems 303-567-6516
www.ISONAS.com
11
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
Connecting to the TCP/IP Server
Here is the INRServ screen used to configure the TCP/IP interface. The IP address, Port and logfile name are set using the controls shown. The meaning of the connection timeout is explained below under the Logon process description.
Restart Interval An earlier version of the INRServ process had a minor resource leak associated with the client connection process that would eventually cause the system to fail due to lack of system resources if the client connects/disconnected frequently. As an interim workaround we provided a mechanism that shut the process down after a specified number of seconds. Setting the restart interval to zero disabled the restart process. By configuring the INRServ process to run as a windows service and setting the service to automatically restart on abnormal termination the INRServ could be continuously available and avoid the resource problem. The resource leak has been corrected in later versions and this restart interval is no longer needed.
Encrypt and Encryption Key The TCP/IP server can be configured to use AES (Advanced Encryption Standard – sometimes called Rijndael ) Encryption. If set, the system uses 256 bit encryption. You must set the 32 byte key by specifying the 32 hex bytes. (E.g., 000102030405060708090A0B0C0D0E0F101112131415161718911A1B1C1D1E1F) This same encryption mechanism is used by the ISONAS reader controllers if you configure them to do so. We have included the dll library that provides the encryption as part of the ISONAS system code, and you can use this library if you wish to do so. You may also use any other encryption software that conforms to the AES standard. Appendix 1 describes the library functions. ISONAS Security Systems 303-567-6516
www.ISONAS.com
12
4720 Walnut St, Suite 200 Boulder, CO. 80301 USA
LOGON Process When the client program connects to the server, it will immediately send the following message back to the client: