How to Create your own Custom Door Template

Introduction

Intelli-M Access uses a Door Template methodology for creating configurations of door wiring. The purpose for a Door Template is to save you the time and hassle of having to set every single input and output setting for every controller. While this method is definitely a time saver, it has the drawback of requiring a custom Door Template for configurations not "built in" to Intelli-M Access.

We strongly recommend that you ensure that you have the latest version of Intelli-M Access installed. You can always find the latest version on our website,

This document describes how to modify an existing door template to create your own custom Door Template configurations.

Door Template Script File

A Door Template is really a Microsoft SQL Server script file ("SQL Script") that injects eIDC configuration data into the Intelli-M Access database. This configuration data appears as a Door Type on the Doors Page when you are creating a new Door or modifying an existing Door. You do not need to have experience with Microsoft SQL Server to create or modify a Door Template script.

The contents of a Door Template consists of SQL script lines that include a large XML data packet. Almost all of the changes you will make to the Door Template script will actually involve XML data, so any experience you may have using XML data will also he helpful.

Door Template Creation Process

This document will guide you through creating a custom Door Template by working through the following steps:

1)Copy the SampleDoorTemplate.sql file

2)Edit the Copied SQL Script file

3)Execute the SQL script

Copy the SampleDoorTemplate.sql File

Open an Explorer Window to your C: drive and navigate to "C:\Program Files (x86)\infinias\Intelli-M Access\Door Templates". If your C: drive does not contain a "Program Files (x86)" folder, then navigate to "C:\Program Files\infinias\Intelli-M Access\Door Templates".

You'll find a file named SampleDoorTemplate.sql. Make a copy of that file and give the copied file a name that reflects the type of Door Template you are creating. For example, if you want to change the default Door Unlock time from 4 seconds to 10 seconds, you could name the file "CustomDoor10Seconds.sql" or something similar to that. Intelli-M Access doesn't care what name you give the file - the name is for you to be able to easily know what changes exist in that file.

Edit the Copied SQL Script File

Double-click on the new file, and the Microsoft SQL Server Management Studioapplication will automatically launch. A popup message box may appear, informing you that the file you launched has very long lines in it, as shown in Figure 1:

Figure 1 - Door Template Open Warning Message Box

This warning is expected and is does not indicate a real problem, so simply click the 'Yes' button to continue.

Next, you may get another dialog box that appears and wants you to login, as shown in Figure 2 below:

Figure 2 - SQL Server Login Box

This dialog box is also expected. Usually the default login credentials displayed in the dialog box will work, so press the 'Connect' button to login. If this fails to connect, please contact your IT Administrator or contact infinias Technical Support for assistance.

Important Note: Sometimes Microsoft SQL Server Management Studio will appear and not prompt you with either of the windows shown above. If this occurs, simply drag and drop the file you double-clicked into the SQL Server Management Studio window. You will then see the box from Figure 1 appear. Now click 'File/Connect Object Explorer...' to see the login dialog box from Figure 2.

The main window in SQL Server Management Studio will show the SQL Script file contents, mostly in red text. In addition to the modifications you wish to make to the configuration, you'll need to also change the Door Template's visible name and its internal name. Before you make changes specific to your needs, first change the two names.

Change the Door Template's Visible Name

Line 4 of the script file looks something like this:

set @name ='Sample Door IN1 Normally Closed'

The sentence in red text contained in the quotes is the phrase that will show as the Door Type name when you create or edit a Door. The name in this example describes a Door Type where input 1 expects a normally-closed door sensor. No other implications are made about the Door Type from this name.

You'll need to change the name of the text in red to something that is unique, makes sense to you, and summarizes the kind of Door Type it represents. Using the example from before, you could change the name to appear like this:

set @name ='Custom Door IN1 NC 10 Seconds'

This example shortened the "IN1 Normally Closed"to"IN1 NC"in order to make room for adding the "10 Seconds". Again, you can choose your own wording to fit your needs, but note that the list box that displays these names 30 to 35 characters.

Be sure to change only the string inside the single quotes after the '=' sign. If you make other modifications, the script will probably not execute properly.

Change the Door Template's Internal Name

The database uses a different name to keep track of the Door Template internally. You can find that name on line 7 of the script file, and looks something like this:

<Device Type="Intelli-M eIDC" Id="1" Name="SAMPLE IN1 NC">

The task for modifying the internal name is similar to modifying the visible name, except that you won't see this name. Simply change the text so that it is unique, for example you could change it to show this:

<Device Type="Intelli-M eIDC" Id="1" Name="CUSTOM IN1 NC 10SEC">

Be sure to change only the string inside the double quotes after the 'Name' field.If you make other modifications, the script will probably not execute properly.

Now would be a good time to save your changes. Press CTRL-S or click the 'File/Save CustomTemplate.sql' menu item to save the file.

Adding Your Custom Changes

There number of modifications you could make to the Door Template script file is theoretically endless, so this section will describe only the most common requests for custom Door Templates.

Change an Input's Default State

The standard Door Types that you choose when creating or editing a Door default the four major inputs to the following states:

Input 1 - Normally Closed (for "Common 1 or 2 Reader IN-1 Normally Closed")

Input 1 - Normally Open (for "Common 1 or 2 Reader IN-1 Normally Open")

Input 2 - Normally Open

Input 3 - Normally Open

Input 4 - Normally Closed

Note that only Input 1's default is different between the standard Door Templates. You can customer this behavior to any default state you wish. To modify one or more input default states, press CTRL-G and a "Go To Line" Popup Box will appear. Enter 44 and press OK. The cursor will move to line 44 in the script file, which looks like this:

<Resource Id="7" Name="3e113adb-f0dd-4723-a979-deb9c2eb95cd" Type="eIDCDigitalInput">

There are four of these XML chucks, at lines 44, 53, 62, and 71. Each XML Chuck has a "ResourceId", a Name, and a Type. All four lines should have a type of "eIDCDigitalInput". These describe the behavior of the four inputs.

All of the lines from 44 to 52 describe the behavior for Input 1, lines 53 to 61 describe the behavior for Input 2, lines 62 to 70 describe the behavior for Input 3, and lines 71 to 79 describe the behavior for Input 4.

Each of these 9-line sections have the same attribute names, the only differences are the values. For example, all four input sections has a name called "Input Point Number", and you can see that the section for Input 1 has the value 1 for "Input Point Number". The section for Input 2 has the value 2 for the "Input Point Number", the section for Input 3 has the value 3 for "Input Point Number", and the section for Input 4 has the value 4 for the "Input Point Number". You can always refer to the "Input Point Number" value to know which of the four digital inputs to help you know which input to modify.

In addition, each 9-line section has a "Resource Id" value which is used internally by the XML file. It will be useful to know these values if you need to make other changes to the Door Template. Note that at line 44, the "Resource Id" for Input 1 is 7. At line 53, the "Resource Id" for Input 2 is 8, the "Resource Id" for Input 3 (line 62) is 9, and the "Resource Id" for Input 4 (line 71) is 10. In summary, Input's 1, 2, 3, 4 use the Resource Id's 7, 8, 9 and 10, respectively. It will be very helpful to memorize that association.

To change an Input's default state to Normally Open or Normally Closed, refer to the "Operation Mode" line in each of the four sections. Change the value to a 1 for Normally Closed, and 0 for Normally Open. For example, to change Input 4 from Normally Closed to Normally Open, find the "eIDCDigitalInput" XML section whose "Input Point Number" is "4". Then find the "Operation Mode" line in that section and change the value from 1 to a 0. Below is an example of the line before the change and after the change:

Before:

<Attribute Name="Operation Mode" Type="int">1</Attribute>

After:

<Attribute Name="Operation Mode" Type="int">0</Attribute>

You can repeat these steps to change any of the four eIDC Input's default states.

As with all changes to the script file, be careful to change only the value between the "" and "" characters to avoid having the script fail to properly execute.

Press CTRL-S or click the 'File/Save CustomTemplate.sql' menu item to save the file.

Change the Default Unlock Duration

To change the lock's default time that it will stay unlocked during a card swipe or REX operation, press CTRL-G, enter 145 and click the OK button. The cursor will move to a line in the script file that looks like this:

<Resource Id="26" Name="1c82ee02-7bd4-45a4-9a78-690fd1d087e1" Type="eIDCServiceTrigger" DeployedTo="8">

Line 145 shows two important attributes in the XML line: the "Type" and the "DeployedTo" attributes. The "Type" attribute shows "eIDCServiceTrigger" (which is analogous to the Triggers tab of the Access Service for you Supervisor Plus users). The "DeployedTo" attribute defines which Input is associated with this XML section. At line 145, the "DeployedTo" value is 8. Recall that "Resource Id"8 is Input 2 (see above as a reminder). Therefore, the XML section starting at line 145 defines a Trigger using Input 2 that will unlock the Door when activated.

Below that section, starting at line 152, is another Trigger definition, defining Input 3 as a Trigger that will also unlock the Door when activated. The "DeployedTo" value is 9, which is the Resource Id for Input 3. And also above those sections, at lines 131 and 138 are two more XML sections that define the Card Reader 1 (line 131, DeployedTo="18") and Card Reader 2 (line 138, DeployedTo="19") as also being Triggers that will unlock the Door when activated.

All four of these sections contain the same attribute names, but the values may differ. One of those attributes is the "Activation Time" attribute, which defines how long the Door is to stay unlocked during a valid card swipe or REX operation. That value is in tenths of seconds, meaning a value of 10 means the door will be unlocked for 1 second (10 tenths of a second).

To change the duration of the Door's lock for Input 2, find the section for Input 2 (DeployedTo="8") and modify the "Activation Time" attribute, as shown below:

Before:

<Attribute Name="Activation Time" Type="int">40</Attribute>

After:

<Attribute Name="Activation Time" Type="int">100</Attribute>

The above change will cause Input 2 to unlock the Door for 10 seconds.

Important Note: Because each input has its own unlock time, you must set all inputs' "ActivationTime" values unless you want each input to have its own unique unlock duration.

Modify each XML section's "Activation Time" attribute to match the value you need. As with all changes to the script file, be careful to change only the value between the "" and "" characters to avoid having the script fail to properly execute.

Press CTRL-S or click the 'File/Save CustomTemplate.sql' menu item to save the file.

Execute the SQL Script

Once you have made your changes and saved the script, you can execute the script so it will appear on the Create/Edit Door page in Intelli-M Access. Click the 'Execute' button, which can be found in the toolbar. A split window will appear with the following output:

(1 row(s) affected)

If you do not see this line, or if errors are displayed instead, please contact infinias Technical Support for assistance.

You should now be able to choose this Door Type when you Create or Edit a Door.