NAV
lua

License, Copyright, and Trademark

The content contained in this repository is the intellectual property of Snap One, LLC, (formerly known as Wirepath Home Systems, LLC), and use without a valid license from Snap One is strictly prohibited. The user of this repository shall keep all content contained herein confidential and shall protect this content in whole or in part from disclosure to any and all third parties except as specifically authorized in writing by Snap One.

License and Intellectual Property Disclaimer

The content in this repository is provided in connection with Snap One products. No license, express or implied, by estoppal or otherwise, to any intellectual property rights is granted by this document or in this repository. Except as provided in Snap Oneʼs terms and conditions for the license of such products, Snap One and its affiliates assume no liability whatsoever and disclaim any express or implied warranty, relating to the sale and/or use of Snap One products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Snap One products are not intended for use in medical, lifesaving, or life sustaining applications.

Information regarding third-party products is provided solely for educational purposes. Snap One is not responsible for the performance or support of third-party products and does not make any representations or warranties whatsoever regarding the quality, reliability, functionality or compatibility of these products. The reader is advised that third parties can have intellectual property rights that can be relevant to this repository and the technologies discussed herein, and is advised to seek the advice of competent legal counsel regarding the intellectual property rights of third parties, without obligation of Snap One.

Snap One retains the right make changes to this repository or related product specifications and descriptions in this repository, at any time, without notice. Snap One makes no warranty for the use of this repository and assumes no responsibility for any errors that can appear in the repository nor does it make a commitment to update the content contained herein.

Copyright

Copyright 2024 Snap One, LLC. All rights reserved.

The above copyright notice applies to all content in this repository unless otherwise stated explicitly herein that a third-party’s copyright applies.

No part of this publication may be reproduced, photocopied, stored on a retrieval system, or transmitted without the express written consent of the publisher.

Trademarks

Snap One and Snap One Logo, Control4 and the Control4 logo, and DriverWorks are trademarks or registered trademarks of Snap One, LLC. Other product and company names mentioned in this repository may be the trademarks or registered trademarks of their respective owners.

 Derivative Works

To the extent that you create any “Derivative Work” (meaning any work that is based upon one or more preexisting versions of the work provided to you in this repository, such as an enhancement or modification, revision, translation, abridgement, condensation, expansion, collection, compilation or any other form in which such preexisting works may be recast, modified, transformed or adapted, explicitly including without limitation, any updates or changes to Snap One, LLC’s software code or intellectual property) such Derivative Work shall be owned by Snap One, LLC and all right, title and interest in and to each such Derivative Work shall automatically vest in Snap One, LLC. To the extent any Derivative Work does not automatically vest in Snap One, LLC by operation of law, you hereby assign such Derivative Work to Snap One, LLC with full title guarantee. Snap One, LLC shall have no obligation to grant you any right in any such Derivative Work.

Contact Us

Snap One, LLC 11734 S. Election Road Salt Lake City, UT 84020 USA

http://www.control4.com

Introduction

This documentation includes content that details the functions that make up the Security System Control Proxy which is supported in the DriverWorks Software Development Kit.

Additional driver development documentation supporting security controller driver development can be found in the DriverWorks Fundamentals Guide. This includes:

Security Sensor Type Information

Proxies (Commands)

A proxy driver is an interface to the Control4 system for a set of devices that share common functionality. For instance, most DVD disc changers have common controls such as SET ZONE INFO, GET PANEL SETUP and ARM INFO.  The Security System Control proxy allows for a common user interface to control all security systems.  The Control4 system (Director) sends information to and receives information from the proxy drivers.  The proxy drivers send information to and receives information from the protocol drivers. Remember, your DriverWorks driver interacts with the proxy driver which then interacts with the system.  As a driver developer you will be relying on this proxy to provide status (notification) to the Control4 system for the device you are controlling.  You will also receive commands from the system that you will act on to control the device.  These commands and notifications are at the heart of what you will be implementing in your driver.  Essentially your driver is becoming the go-between from the Control4 system and your device with the proxy driver giving structure to the commands and notifications which you will be implementing. Your driver can facilitate communications with multiple types of proxies for a single device. As an example, a Security System driver will utilize both the Security proxy and the Contacts proxy. These additional proxies are configured in the <connections> section of the .c4z.

Protocol (Notifications)

Two similar devices may have the same functionality but utilize a very different command set.  A protocol driver provides the device-specific information needed to communicate with the Control4 system.  In the case of DriverWorks, the DriverWorks driver is the protocol driver.  When combined with the device-specific.c4Z file it provides the custom code necessary to implement the 2-way device driver. In the case of DriverWorks, the DriverWorks driver is the protocol driver. When combined with the device-specific.c4Z file it provides the custom code necessary to implement the 2-way device driver.

What’s New

What’s New in 3.4.2

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.4.2.

What’s New in 3.4.1

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.4.1.

What’s New in 3.4.0

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.4.0.

What’s New in 3.3.2

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.3.2.

What’s New in 3.3.1

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.3.1.

What’s New in 3.3.0

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.3.0.

What’s New in 3.2.3

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.2.3.

What’s New in 3.2.2

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.2.2.

What’s New in 3.2.1

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.2.1.

What’s New in 3.2.0

Security Proxy The REQUEST_DEFAULT_USER_CODE partition notification was added as a mechanism for the protocol driver to initiate the communication to get that default user code upon driver update.

The following Security Protocol Notifications were deprecated from the SDK: ALARM, ALARM_CLEAR, AWAY, DISARM, HOME, TROUBLE. Please see the Security Panel Notification and Security Partition Notification areas for the latest list of Notifies.

What was New in 3.1.2

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.1.2.

What was New in 3.1.0

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.1.0.

What was New in O.S.3

There were no modifications to the Security System Control Proxy in conjunction with O.S. Release 3.0.0.

Security Capabilities

The following Capabilities are supported by the Security Proxy:

button_list

Defines buttons to be displayed on UI panel along with IDs for Keypad. locCode defines button's column (A...Z) and row (1...9). For example, A3 indicates column 1 row 3. Width defines button width (in columns).

Parameter
True/False

display_type

Define GUI display location and width.

Parameter Description
locCode location code
width

Example

<location>locCode</location> <width>nWidth</width>

has_alrm_cleared_event

Alarm capable of generating an event when alarm is cleared.

Parameter
True/False

has_alrm_event

Alarm capable of generating an event when activated

Parameter
True/False

has_trouble_event

Alarm capable of generating an event when alarm trouble is detected.

Parameter
True/False

Security Panel Commands

ADDITIONAL_PANEL_INFO

Command from the UI to the Proxy and then forwarded on to the Protocol. Has no Return values. This command will only be sent after having received a REQUEST_ADDITIONAL_INFO notification from the protocol driver.  The protocol driver will send the notification to the proxy driver, which will send a request_additional_info DataToUI command to the UIs.  The UIs will then prompt the user for additional info. After the information is entered, the UI will generate this command to send back to the protocol driver. See the REQUEST_ADDITIONAL_INFO notification.

Parameter Type Description
Info STR A copy of the info_string parameter that was passed with the request_additional_info request. The protocol driver will need this to know what actions to return to when it gets the new info.
FunctionName STR A copy of the function_name parameter that was passed with the request_additional_info request. The protocol driver may need this to know what actions to return to when it gets the new info.
NewInfo STR The new info provided by the UI in response to the Request_additional_info request.
InterfaceID STR A unique (str) to identify which interface is sending this command.

Returns

None

GET_ALL_PGM_INFO

Request to return information about each PGM active on the panel. The information consists of its id and a flag indicating if it is currently opened.

Parameters

None

Return Description Description
PGM ID INT PGM ID
BOOL True, False: True if PGM is Open.

GET_ALL_PARTITION_INFO

Request to return information to the panel proxy about each of its partitions. The information consists of its id, if it’s enabled, its binding id, and its current state.

Parameters

None

Return Type Description
Partition ID INT Partition ID
BOOL True, False: True if this partition is Open.
Binding ID INT Binding ID
State STR State

GET_ALL_ZONE_INFO

Request to return information about each zone on the panel. The information consists of its id, name, type_id, and a list of partitions the zone is included in, a flag indicating if it can be bypassed, and a flag indicating if it is currently opened.

Parameters

None

Return Type Description
ZONE ID INT Zone ID
ZONE NAME STR Zone Name
ZONE TYPE INT Zone Type ID
TABLE Partitions the Zone is included in.
BOOL True, False: True if Zone can be bypassed.
TBOOL True, False: True if Zone is currently Open.
State STR State

GET_PANEL_SETUP

Calls [GET_ALL_PARTITION_INFO\]1

PGM_CLOSE

Sends an ‘close’ command to the targeted PGM.

Parameter Description Description
PGM ID PINT The id of the targeted PGM.

PGM_OPEN

Sends an ‘open’ command to the targeted PGM.

Parameter Type Description
PGM ID INT The id of the targeted PGM.

PGM_TOGGLE

Sends an ‘toggle’ command to the targeted PGM.

Parameter Type Description
PGM ID INT The id of the targeted PGM.

PGM_TRIGGER

Sends an ‘trigger’ command to the targeted PGM.

Parameter Description Description
PGM ID INT The id of the targeted PGM.

READ_PANEL_INFO

Send a command to the panel to read its partition and zone information.

SET_PANEL_TIME_DATE

Set the current date and time on the panel. This command is only available if the ‘can_set_time’ capability is set to ‘true’.

Parameter Type Description
YEAR INT The current year (4 digits)
MONTH INT The current month (2 digits 01-12)
DAY INT The current day of the month (2 digits 01-31)
HOUR: INT The current hour in 24-hour time (2 digits 00-23)
MINUTE INT The current minute in the hour (2 digits 00-59)
SECOND INT The current second in the minute (2 digits 00-59)
INTERFACE ID: STR Unique string ID indicating from where the command originated.

SET_PARTITION_ENABLED

Set a flag to designate whether or not the specified partition is currently enabled. This command is only available if the ‘can_activate_partitions’ capability is set to ‘true’.

Parameter Type Description
PARTITION ID STR PARTITION ID: The id number of the targeted partition.
ENABLED BOOL ENABLED ‘True’ if this partition should now be enabled, False if not.

SEND_PGM_COMMAND

Send a command to a PGM on the panel.

Parameter Type Description
PGM ID INT The id of the targeted PGM.
ENABLED BOOL ‘True’ if this partition should now be enabled, False if not.
COMMAND STR Possible commands are: ‘open’, ‘close’, ‘toggle’, and ‘trigger’.

SET_ZONE_INFO

Set the information about a specified zone in the driver.

Parameter Description
int ZONE_ID: The id of the targeted zone.
str NAME: The name by which we will now refer to this zone.
str TYPE_ID: The type of zone that the Control4 project will consider this zone. This will determine which icons will show up when it is referenced. Valid values are:
”CONTACT_SENSOR"
”EXTERIOR_DOOR"
“EXTERIOR_WINDOW"
“INTERIOR_DOOR"
"MOTION_SENSOR"
"FIRE"
"GAS"
"CARBON_MONOXIDE"
"HEAT"
"WATER"
"SMOKE"
"PRESSURE"
"GLASS_BREAK"
"GATE"
"GARAGE_DOOR"
bool DATA_GUARDED: ‘True’ if these new settings should be protected so that information from the panel doesn’t overwrite them.
str INTERFACE_ID: Unique string ID indicating from where the command originated.

Security Panel Capabilities

The following Capabilities are supported with the Security System Controller Panel:

<can_set_time></can_set_time> Defaults to true.

<can_activate_partitions></can_activate_partitions> Defaults to true.

Security Panel Conditionals

The following Conditionals are supported with the Security System Controller Panel. System programming conditionals are handled by the proxy and return a true or false:

IN_TROUBLE: Returns True if the system is currently in a TROUBLE state.

Security Panel Events

The following Events are supported with the Security System Controller Panel.

TROUBLE: Fired when the security panel receives a TROUBLE notification.

TROUBLE_CLEAR: Fired when the TROUBLE state is cleared.

Security Panel Notifications

Overview

Sending Protocol Notifications requires the use of the SendToProxy API.

The first parameter for C4:SendToProxy is a binding id. The API doesn't not recognize Partition Ids. The assumption is made that the panel binding defined in driver.xml is on binding id 5001. Then partition 1 is on binding id 5002, partition 2 on 5003, etc.

The second parameter is the text of the particular notification being sent. The Proxy knows the information being sent based off of this text. For example, when the parameter "PARTITION_ENABLED" is sent through SendtoProxy, the Camera proxy knows parameter type information that "PARTITION_ENABLED" should contain.

The third parameter is a table of the parameters for the particular notification. In this case, the PARTITION_ENABLED notification takes one parameter named "ENABLED". Its value is either "true" or "false". Note that the third parameter could also be sent as a string rather than a table. In this case the are no parameter names. The whole string is just interpreted as data for the notification. This usage is mostly deprecated, but some notifications (such as DISPLAY_TEXT) started out doing this and have never been changed so they don't break backward compatibility.

The fourth parameter is just the word "NOTIFY". This is just some extra information for BindingManager so it won't try to make assumptions about the type of message based on binding ids. It is recommended that it is included in C4:SendToProxy.

To the right are an examples fully formed PANEL_ZONE_STATE and ALL_ZONES_INFO Notifications being sent using the SendToProxy API.

-- PANEL_ZONE_STATE Example

function SendZoneState(ZoneId, IsOpen, AreInitializing)
    C4:SendToProxy( 5001,
                    "PANEL_ZONE_STATE",
                    {   ZONE_ID = ZoneId,
                        ZONE_OPEN = IsOpen,
                        INITIALIZING = AreInitializing
                    },
                    "NOTIFY"
                  )
end



-- ALL_ZONES Example

function SendAllZoneInfo()

    local ZoneInfoXMLStr =
    [[<zones>
        <zone>
            <id>1</id>
            <name>Back Door</name>
            <type_id>2</type_id>
            <partitions></partitions>
            <can_bypass>false</can_bypass>
            <is_open>false</is_open>
        </zone>
        <zone>
            <id>2</id>
            <name>Front Door</name>
            <type_id>2</type_id>
            <partitions></partitions>
            <can_bypass>false</can_bypass>
            <is_open>false</is_open>
        </zone>
        <zone>
            <id>3</id>
            <name>Back Window</name>
            <type_id>3</type_id>
            <partitions></partitions>
            <can_bypass>true</can_bypass>
            <is_open>true</is_open>
        </zone>
        <zone>
            <id>4</id>
            <name>Zone 4</name>
            <type_id>5</type_id>
            <partitions></partitions>
            <can_bypass>true</can_bypass>
            <is_open>false</is_open>
        </zone>
    </zones>]]

    C4:SendToProxy( 5001,
                    "ALL_ZONES_INFO",
                    ZoneInfoXMLStr,
                    "NOTIFY"
                  )
end

ALL_PGMS_INFO

Sends and XML string of all PGMs (relays) and respective PGM information.

Parameter Description
xml XML data. See example.

Example

<pgms>
        <pgm>
            <id>1</id>
            <is_open>true</is_open>
        </pgm>
        <pgm>
            <id>2</id>
            <is_open>false</is_open>
        </pgm>
        <pgm>
            <id>3</id>
            <is_open>false</is_open>
        </pgm>
</pgms>

ALL_ZONES_INFO

Sends and XML string of all zones and respective zone information.

Parameter Description
xml XML data. See example.

Example

<zones>
        <zone>
            <id>1</id>
            <name>Back Door</name>
            <type_id>2</type_id>
            <partitions></partitions>
            <can_bypass>false</can_bypass>
            <is_open>false</is_open>
        </zone>
        <zone>
            <id>2</id>
            <name>Front Door</name>
            <type_id>2</type_id>
            <partitions></partitions>
            <can_bypass>false</can_bypass>
            <is_open>false</is_open>
        </zone>
        <zone>
            <id>3</id>
            <name>Back Window</name>
            <type_id>3</type_id>
            <partitions></partitions>
            <can_bypass>true</can_bypass>
            <is_open>true</is_open>
        </zone>
        <zone>
            <id>4</id>
            <name>Zone 4</name>
            <type_id>5</type_id>
            <partitions></partitions>
            <can_bypass>true</can_bypass>
            <is_open>false</is_open>
        </zone>
</zones>

PANEL_ADD_PGM

Add a PGM (relay) to the panel.

Parameter Description Description
PGM ID NUM ID of the new PGM

Example

C4:SendToProxy(TargetBindingID, "PANEL_ADD_PGM", { PGM_ID = 1 }, "NOTIFY")

SYNC_PANEL_INFO

Tells the Panel proxy that the hardware has been initialized and is ready to function.

Parameters

None

Example

C4:SendToProxy(TargetBindingID, "PANEL_INITIALIZED", {}, "NOTIFY")

PANEL_PARTITION_STATE

Lets the panel know the state of the given partition. This is used in the Properties display in ComposerPro.

Parameter Type Description
PARTITION ID NUM ID of the target partition.
STATE STR A string listing its state. Supported values include: "ARMED" "ALARM" "OFFLINE" "EXIT_DELAY" "ENTRY_DELAY" "DISARMED_READY" "DISARMED_NOT_READY" "CONFIRMATION_REQUIRED"
TYPE STR Further information on the state. For example, it could be "Stay" for a type of ARMED. It could be "Burglary" for a type of ALARM. Can be "" if not needed.

Example

C4:SendToProxy(5001, "PANEL_PARTITION_STATE", {PARTITION_ID = 2, STATE = "ARMED", TYPE = "Stay"}, "NOTIFY")

PANEL_PGM_STATE

Current status of a PGM (relay): open or closed

Parameter Type Description
PGM ID NUM ID of the target PGM
PGM OPEN BOOL "true" if the PGM is opened. "false" if it is closed.
INITIALIZING BOOL "true" if the PGM is initializing. This will prevent programming from firing.

Example

C4:SendToProxy(TargetBindingID, "PANEL_PGM_STATE", { PGM_ID = 1, PGM_OPEN = true, INITIALIZING = false }, "NOTIFY")

PANEL_REMOVE_PGM

Remove a PGM (relay) from the panel.

Parameter Type Description
PGM ID NUM ID of the PGM being removed

Example

C4:SendToProxy(TargetBindingID, "PANEL_REMOVE_PGM", { PGM_ID = 1 }, "NOTIFY")

PANEL_REMOVE_ ZONE

Remove a zone from the panel.

Parameter Description Description
ID NUM ID of the target zone.

Example

C4:SendToProxy(TargetBindingID, "PANEL_REMOVE_ZONE", { ID = 2}, "NOTIFY")

PANEL_ZONE_INFO

Information about a given zone that Navigator or Composer can display.

Parameter Description
num ID: ID of the target zone.
str NAME: The zone's name either read from the panel or assigned by the user. Will default to "Zone NN"
num TYPE ID: The type of zone so that the Control4 system can map its sensor binding to a type of sensor. Current valid types with their ids are:
UNKNOWN = 0
CONTACT SENSOR= 1
EXTERIOR DOOR= 2
EXTERIOR WINDOW= 3
INTERIOR DOOR = 4
MOTION SENSOR = 5
FIRE = 6
GAS = 7
CARBON MONOXIDE = 8
HEAT = 9
WATER = 10
SMOKE = 11
PRESSURE = 12
GLASSBREAK= 13
GATE = 14
GARAGE DOOR = 15
str PARTITIONS: Comma-delimited string of numbers indicating which partitions this zone is a member of. For example, if this zone is included in both partitions 1 and 3, the string would be "1,3"
bool IS\_OPEN: "true" = open. "false" = closed.

Example

C4:SendToProxy(TargetBindingID, "PANEL_ZONE_INFO", { ID = 2, NAME = "ENTRYWAY", TYPE_ID = 5, PARTITIONS = "1,3", IS_OPEN = true}, "NOTIFY")

PANEL_ZONE_STATE

Sends the current status of a zone: open or closed.

Parameter Type Description
ZONE ID NUM ID of the target zone
ZONE OPEN BOOL "true" if the zone is opened. "false" if it is closed.
INITIALIZING BOOL "true" if the zone is initializing. This will prevent programming from firing.

Example

C4:SendToProxy(TargetBindingID, "PANEL_ZONE_STATE", { ZONE_ID = 1, ZONE_OPEN = true, INITIALIZING = false }, "NOTIFY")

REQUEST_ADDITIONAL_PANEL_INFO

This is a notification that can allow two-way communication with the keypad. This command will cause Navigator to bring up the keypad screen with the prompt string. After the user types in something on the keypad, it will be returned to our driver through the ADDITIONAL_PANEL_INFO command.

Parameter Description
str PROMPT: The prompt string that will show up above the keypad on the Navigator string.
str INFO_STRING: This is a string that will not be shown to the user, but will be returned with the ADDITIONAL_INFO command. It is a way that information can be built up through multiple iterations of calls to REQUEST_ADDITIONAL_PANEL_INFO
str FUNCTION_NAME: This will not be shown to the user but will also be returned with the ADDITIONAL_INFO command. It is the function name of the handler in the driver code that should be called when the new information arrives.
bool MASK_DATA: “true" if the information being entered on the screen (such as a user code) should not be readable. If the flag is true, then each character will show up on the Navigator screen as a dot.
str INTERFACE_ID: Unique identification string for one of the UIs that the prompt will appear on.

Example

C4:SendToProxy(TargetBindingID, "REQUEST_ADDITIONAL_PANEL_INFO", { PROMPT =
promptstring, INFO_STRING = infostring, FUNCTION_NAME = functionstring, MASK_DATA = true, INTERFACE_ID = interfaceid }, "NOTIFY")

SYNC_PANEL_INFO

This is a request to the proxy driver to re-send all of the information it has about the panel to ensure synchronization.

Parameters

None

Example

C4:SendToProxy(TargetBindingID, "SYNC_PANEL_INFO", {},  "NOTIFY")

TROUBLE_CLEAR

Clear the trouble flag.

Parameter Type Description
IDENTIFIER NUM Unique number for the trouble instance that has been resolved.

Example

C4:SendToProxy(TargetBindingID, "TROUBLE_CLEAR", { IDENTIFIER = 10 }, "NOTIFY")

TROUBLE_START

List trouble that the panel is having on the Composer Property Page and on each of the Navigator partition screens.

Parameter Type Description
TROUBLE TEXT STR Text listing the type of trouble. “For example: “Battery", "Communication", etc.)
DENTIFIER NUM Unique number for this instance of trouble.

Example

C4:SendToProxy(TargetBindingID, "TROUBLE_START", { TROUBLE_TEXT = "Battery", IDENTIFIER = 10 }, "NOTIFY")

Security Panel Variables

The Security System Controller Panel supports the following variable:

TROUBLE_TEXT String representing the text which will be displayed.

Security Partition Capabilities

The following Capabilities are supported with the Security System Controller Partition:

ui_version Integer. Defaults to 2. A value of 2 means that the new user interface is used. If the interface changes in the future, this number may increase again.

arm_states Comma Delimited String. A comma delimited string containing the possible arm states this system supports.

has_fire Boolean. Defaults to false. True if this partition supports the “Fire” emergency button. If True, Navigator will show a fire emergency icon.

has_medical Boolean. Defaults to false. True if this partition supports the “Medical” emergency button. If True, Navigator will show a medical emergency icon.

has_police Boolean. Defaults to false. True if this partition supports the “Police” emergency button. If True, Navigator will show a police emergency icon.

has_panic Boolean. Defaults to false. True if this partition supports the “Panic” emergency button. If True, Navigator will show a fire emergency icon.

functions Comma Delimited String. Default to "" A comma delimited string containing the functions supported by the protocol driver. Navigator will show these under its 'Functions' button on the main screen. When one of the functions are selected a command will be sent to the driver with the function name. It is up to the driver writer to implement that function.

star_label string Default to * The text that will be shown on the * button on the keypad.

pound_label string Default to “#” The text that will be shown on the # button on the keypad.  

button_A xml string <visible\>true\</visible\> Designates whether button “A” will be visible on the UI keypad. <label>This is Button A</label> The text that will appear on button “A” on the UI keypad (if visible) Defaults to “A”  

button_B xml string <visible\>true\</visible> Designates whether button “B” will be visible on the UI keypad. <label>This is Button B</label> The text that will appear on button “B” on the UI keypad (if visible) Defaults to “B”  

button_C xml string <visible>true</visible> Designates whether button “C” will be visible on the UI keypad. <label>This is Button C</label> The text that will appear on button “C” on the UI keypad (if visible) Defaults to “C”  

button_D xml string <visible>true</visible> Designates whether button “D” will be visible on the UI keypad. <label>This is Button D</label> The text that will appear on button “D” on the UI keypad (if visible) Defaults to “D”

supports_virtual_keypad Boolean Defaults to true. True if the panel supports raw key presses being passed by the software directly to the hardware; usually used for panel programming or setup. Navigator will provide the user a page that has the keypad on it.

Security Partition Conditionals

The following Conditionals are supported with the Security System Controller Partition. System programming conditionals are handled by the proxy and return a true or false:

CURRENT_ARM_STATUS

Parameter Description
== equal
!= not equal
ARM STATE One of the possible arm states listed in the arm_states configuration entry. These values are defined in the partition driver’s capabilities XML. See arm_states for more information.

IS_ALARM Returns true if the current state is ALARM.

IS_ARMED Returns true if the current state is ARMED, ENTRY DELAY, EXIT DELAY or ALARM

IS_AWAY Returns true if the partition is armed for away. Note this has been deprecated and is present for backwards compatibility purposes.

IS_DISARMED Returns true if the partition is currently disarmed (states DISARMED READY or DISARMED NOT READY).

IS_HOME Returns true if the partition is armed for home (states HOME or Stay). Note this has been deprecated and is present for backwards compatibility purposes.

IS_IN_ENTRY_DELAY Returns true if the current state is ENTRY DELAY

IS_IN_EXIT_DELAY Returns true if the current state is EXIT DELAY

PREVIOUS_ARM_STATUS Same as CURRENT_ARM_STATUS but used to compares with the arm status before the last state change.

Parameter Description
== equal
!= not equal
ARM STATE One of the possible arm states listed in the arm_states configuration entry. These values are defined in the partition driver’s capabilities XML. See arm_states for more information._

Security Partition Events

The following Events are supported with the Security System Controller Partition.

ALARM Fired when the partition enters an alarm state.

ALARM_CLEAR Fired when the partition leaves an alarm state.

ARM_FAILED Fired when an attempt to arm the partition failed

ARMED Fired when the partition is armed.

AWAY Fired when the partition is armed for Away. Will be deprecated.

DISARMED Fired when the partition is disarmed.

DISARM_FAILED Fired when an attempt to disarm the partition failed

EMERGENCY_TRIGGERED Fired when an emergency is triggered that doesn't change the alarm state.

HOME Fired when the partition is armed for Home. Will be deprecated.

PARTITION_STATE_CHANGE Fired when the partition state changes

Security Partition Notifications

Overview

Sending Protocol Notifications requires the use of the SendToProxy API.

The first parameter for C4:SendToProxy is a binding id. The API doesn't not recognize Partion Ids. The assumption is made that the panel binding defined in driver.xml is on binding id 5001. Then partition 1 is on binding id 5002, partition 2 on 5003, etc.

The second parameter is the text of the particular notification being sent. The Proxy knows the information being sent based off of this text. For example, when the parameter "PARTITION_ENABLED" is sent through SendtoProxy, the Camera proxy knows parameter type information that "PARTITION_ENABLED" should contain.

The third parameter is a table of the parameters for the particular notification. In this case, the PARTITION_ENABLED notification takes one parameter named "ENABLED". Its value is either "true" or "false". Note that the third parameter could also be sent as a string rather than a table. In this case the are no parameter names. The whole string is just interpreted as data for the notification. This usage is mostly deprecated, but some notifications (such as DISPLAY_TEXT) started out doing this and have never been changed so they don't break backward compatibility.

The fourth parameter is just the word "NOTIFY". This is just some extra information for BindingManager so it won't try to make assumptions about the type of message based on binding ids. It is recommended that it is included in C4:SendToProxy.

To the right is an example of a fully formed Partition_Enabled Notifications being sent using the SendToProxy API.


-- Partition_Enabled Example

function SetPartitionEnabled(PartitionID, Enabled)
    local TargetBindingID = PartitionID + 5001
    C4:SendToProxy(TargetBindingID, "PARTITION_ENABLED", { ENABLED = tostring(Enabled) }, "NOTIFY")
end

ARM_FAILED

An attempt to arm the partition failed. The two most common reasons are because a user code is required to arm this partition or because one or more un-bypassed zones are open.

Parameter Type Description
ACTION STR Supported values include: “keypad”: Will cause Navigator to ask for a user code and then retry. “bypass”: Will cause Navigator to show a list of zones that are in fault and ask the user if they wish to continue. If continue chosen, the arm command will be resent. However, it will try to bypass each faulted zone before it tries to arm again. “NA”: Failed for some other reason. Navigator will take no further action on the arming.
INTERFACE ID STR Commands receiveD from Director will have an interface\_id string sent as one of the parameters. This is a unique string that identifies where the command originated. When a response such as a failure is sent, it should only display on the UI that originated the command. To support this, the INTERFACE ID string is sent back with the notification. Only the original UI will show the results of this notification.

Example

C4:SendToProxy(TargetBindingID, "ARM_FAILED", { ACTION = "bypass" }, "NOTIFY")

CLEAR_ZONE_LIST

Removes all the zones from a partition's list. Usually precedes new messages that will build that list back up.

Parameters

None

Example

C4:SendToProxy(TargetBindingID, "CLEAR_ZONE_LIST", {}, "NOTIFY")

CODE_REQUIRED

Sets a flag that Navigator will use when an arm command is attempted. If the flag is true, Navigator will ask for a user code before it sends the arm command.

Parameter Type Description
CODE REQUIRED TO ARM: BOOL “true" if the user code should be sent with the arm command.

Example

C4:SendToProxy(TargetBindingID, "CODE_REQUIRED", { CODE_REQUIRED_TO_ARM = true }, "NOTIFY")

DISARM_FAILED

Notification sent when an attempt to disarm the panel failed. This is typically due to an invalid user code.

Parameter Description Description
INTERFACE ID STR Commands receiveD from Director will have an interface id string sent as one of the parameters. This is a unique string that identifies where the command originated. When a response such as a failure is sent, it should only display on the UI that originated the command. To support this, the INTERFACE ID string is sent back with the notification. Only the original UI will show the results of this notification.

Example

C4:SendToProxy(TargetBindingID, "DISARM_FAILED", { INTERFACE_ID = ID }, "NOTIFY")

EMERGENCY_TRIGGERED

An emergency was triggered, either from a sensor or by the user hitting one of the emergency buttons.

Parameter Type Description
TYPE STR Specifies the type of emergency just triggered. It can be anything, but standard types that Navigator has icons for are: Fire, Medical, Police, and Panic.

Example

C4:SendToProxy(TargetBindingID, "EMERRGENCY_TRIGGERED", { TYPE = "Fire" }, "NOTIFY")

HAS_ZONE

Tells the proxy that a particular zone is part of this partition.

Parameter Type Description
ZONE ID: NUM The zone ID of the zone to be included in this partition's zone list.

Example

C4:SendToProxy(TargetBindingID, "HAS_ZONE", { ZONE_ID = 2 }, "NOTIFY")

PARTITION_ENABLED

It's possible to have partitions defined on a panel that aren't enabled. They still must have a proxy defined for them, but it is possible to specify whether they are currently in use or not.

Parameter Type Description
ENABLED BOOL "true" if this partition is enabled.

Example

C4:SendToProxy(TargetBindingID, "PARTITION_ENABLED", { ENABLED = tostring(Enabled) }, "NOTIFY")

PARTITION_STATE

Specifies which state the partition is currently in.

Parameter Description Description
STATE STR Supported values include: "ARMED" "ALARM" "OFFLINE" "EXIT_DELAY" "ENTRY_DELAY" "DISARMED_READY" "DISARMED_NOT\\\_READY" "CONFIRMATION_REQUIRED"
TYPE STR Further information on the state. For example, it could be "Stay" for a type of ARMED. It could be "Burglary" for a type of ALARM. Can be "" if not needed.
DELAY TIME TOTAL: NUM For Entry or Exit delays. The total time of the delay.
DELAY TIME REMAINING NUM For Entry or Exit delays, the time remaining in the delay.
CODE REQUIRED TO CLEAR BOOL "true" if a user code is now required from Navigator to change from the current state.

Example

C4:SendToProxy(TargetBindingID, "PARTITION_STATE", { STATE = "ALARM", TYPE = "BURGLARY", DELAY_TIME_TOTAL = 5, DELAY_TIME_REMAINING = 2, CODE_REQUIRED_TO_CLEAR = true }, "NOTIFY")

PARTITION_STATE_INIT

Specifies which state the partition is currently in but will not cause any of the programming to be fired.

Parameter Type Description
STATE STR Supported values include: "ARMED" "ALARM" "OFFLINE" "EXIT_DELAY" "ENTRY_DELAY" "DISARMED_READY" "DISARMED_NOT_READY" "CONFIRMATION_REQUIRED"
TYPE STR Further information on the state. For example, it could be "Stay" for a type of ARMED. It could be "Burglary" for a type of ALARM. Can be "" if not needed.
DELAY TIME TOTAL: NUM For Entry or Exit delays. The total time of the delay.
DELAY TIME REMAINING NUM For Entry or Exit delays, the time remaining in the delay.
CODE REQUIRED TO CLEAR BOOL "true" if a user code is now required from Navigator to change from the current state.

Example

C4:SendToProxy(TargetBindingID, "PARTITION_STATE_INIT", { STATE = "ALARM", TYPE = "BURGLARY", DELAY_TIME_TOTAL = 5, DELAY_TIME_REMAINING = 2, CODE_REQUIRED_TO_CLEAR = true}, "NOTIFY")

REQUEST_ADDITIONAL_INFO

This notification allowS two-way communication with the keypad. This command will cause Navigator to bring up the keypad screen with the prompt string. After the user types in something on the keypad, it will be returned to the driver through the ADDITIONAL_INFO command.

Parameter Type Description
INFO STRING STR This is a string that will not be shown to the user, but will be returned with the ADDITIONAL\_INFO command. It provides a way for information to be built up through multiple iterations of calls to REQUEST_ADDITIONAL_INFO
FUNCTION NAME STR This will not be shown to the user but will also be returned with the ADDITIONAL INFO command. It is the function name of the handler in the driver code that should be called when the new information arrives.
MASK\_DATA: STR “true" if the information being entered on the screen (such as a user code) should not be readable. If the flag is true, then each character will show up on the Navigator screen as a dot.
INTERFACE ID BOOL Commands received from Director will have an interface\_id string sent as one of the parameters. This is a unique string that identifies where the command originated. When a response such as a failure is sent, it should only display on the UI that originated the command. To support this, the INTERFACE ID string is sent back with the notification. Only the original UI will show the results of this notification.
INTERFACE ID STR Commands received from Director will have an interface\_id string sent as one of the parameters. This is a unique string that identifies where the command originated. When a response such as a failure is sent, it should only display on the UI that originated the command. To support this, the INTERFACE ID string is sent back with the notification. Only the original UI will show the results of this notification.

Example

C4:SendToProxy(TargetBindingID, "REQUEST_ADDITIONAL_INFO", { PROMPT =
promptstring, INFO_STRING = infostring, FUNCTION_NAME = functionstring, MASK_DATA = true, INTERFACE_ID = interfaceid }, "NOTIFY")

REQUEST_DEFAULT_USER_CODE_

The proxy code stores the default user code if it exists for the partition. When the proxy is first bound to the protocol driver, it will send that code to the protocol driver. However, we found that when a driver is updated, that call was not being made, so we added a mechanism for the protocol driver to initiate the communication to get that code. This is new in 3.2

Available from 3.2.0

Parameters

None

Example

C4:SendToProxy(TargetBindingID, "REQUEST_DEFAULT_USER_CODE", {}, "NOTIFY")

REMOVE_ZONE

Tells the proxy that a particular zone is no longer a part of this partition.

Parameter Type Description
ZONE ID NUM The zone ID of the zone to be removed from the partition's zone list.

Example

C4:SendToProxy(TargetBindingID, "REMOVE_ZONE", { ZONE_ID = 1 }, "NOTIFY")

ZONE_STATE

Reports if a specific zone is open/closed and bypassed/un-bypassed.

Parameter Description Description
ZONE ID NUM Number
ZONE OPEN BOOL "true" if the zone is opened. "false" if it is closed.
ZONE BYPASSED BOOL "true" if the zone is bypassed. "false" if it is not bypassed.

Example

C4:SendToProxy(TargetBindingID, "ZONE_STATE", { ZONE_ID = 1, ZONE_OPEN = true, ZONE_BYPASSSED = false }, "NOTIFY")

Security Partition Commands

ADDITIONAL_INFO

This command will only be sent after having received a REQUEST_ADDITIONAL_INFO notification from the protocol driver.  The protocol driver will send the notification to the proxy driver, which will send a request_additional_info DataToUI command to the UIs.  The UIs will then prompt the user for additional info. After the information is entered, the UI will generate this command to send back to the protocol driver. See the REQUEST_ADDITIONAL_INFO notification.

Parameter Description Description
Info STR A copy of the info_string parameter that was passed with the request_additional_info request. The protocol driver will need this to know what actions to return to when it gets the new info.
FunctionName STR A copy of the function_name parameter that was passed with the request_additional_info request. The protocol driver may need this to know what actions to return to when it gets the new info.
NewInfo STR The new info provided by the UI in response to the equest_additional_info request.
InterfaceID STR A unique (str) to identify which interface is sending this command.

ARM_CANCEL

Cancel an uncompleted arm command.

Parameter Type Description
InterfaceID STR A unique string to identify which interface is sending this command.

EXECUTE_EMERGENCY

Requests the partition to execute an emergency event of the type specified by the EmergencyType parameter. Valid values are: Fire, Medical, Police, and Panic.

Parameter Type Description
STR A unique string to identify which interface is sending this command.
Interface ID STR I Unique string ID indicating from where the command originated

EXECUTE_FUNCTION

Request the partition to execute a function event of the type listed in the functions capability. The function parameter would be one of the function strings listed in the <functions> capability

Parameter Description Description
Function STR Function string
InterfaceID STR A unique string to identify which interface is sending this command.

KEY_PRESS

Specifies that a key (button) was pressed on the UI interface. But different from BUTTON_PRESS, the actual key name is passed rather than its ID.

Parameter Description Description
Key Name STR The single key that we should emulate a press for.
InterfaceID STR A unique string to identify which interface is sending this command.

SET_DEFAULT_USER_CODE

The default user code that this driver should use when it receives arm and disarm commands that originated from programming.

Parameter Description
str Code

PARTITION_ARM

Specifies the user code to use with the arm command (if needed).

Parameter Type Description
ArmType STR Request the partition to arm.
UserCode STR Optional. Specifies the user code to use with the arm command (if needed).
Bypass BOOL Optional. Specify whether currently open zones should be bypassed.
InterfaceID STR A unique string to identify which interface is sending this command.

PARTITION_DISARM

Specifies the user code to use with the DISARM command (if needed).

Parameter Type Description
User Code: STR The user code needed for disarming.
InterfaceID STR A unique string to identify which interface is sending this command.

Security Partition States

SECURITY SYSTEM CONTROLLER PARTITION STATES

The following States are supported by the Security System Controller Partition. These states were added to the Proxy in operating system release 2.9.0.

ALARM

The partition is in an alarm state. A separate variable will indicate which type of alarm (Burglary, Fire, CO, etc.).

ARMED

The partition is armed. A separate variable would keep track of what type of armed state. HOME and AWAY would be the most common types, but the protocol driver could specify other types if desired.

CONFIRMATION REQUIRED

Some panels require an extra confirmation from the user after an alarm has been cleared before they will go back into DISARMED_READY state. When in this state, the panel is waiting for a SEND_CONFIRMATION command from one of the UIs.

DISARMED READY

The partition is disarmed, but could be armed if desired.

DISARMED NOT READY

The partition is disarmed, but not ready to be armed; usually because one of its zones is currently open.

EXIT DELAY

The user has given the arm command, but the partition is in the delay time which allows the user to exit the area before the alarm is tripped.

ENTRY DELAY

The user has opened a zone while the partition is armed. He has a certain amount of time to disarm the system before the alarm engages.

OFFLINE

The partition is in an OFFLINE state.

Security Variables

SECURITY SYSTEM CONTROLLER PARTITION VARIABLES

The Security System Controller Partition supports the following Variables:

HOME_STATE Boolean. True when armed home. Will be deprecated.

AWAY_STATE Boolean. True when armed away. Will be deprecated.

DISARMED_STATE Boolean. True when disarmed. Will be deprecated.

ALARM_STATE Boolean. True when in an alarm state.

DISPLAY_TEXT String. Current text in the display window.

TROUBLE_TEXT String. Current text in the trouble window. When trouble text is blank, the UI will hide the trouble text window and give the space to the display text window.

IS_ACTIVE Boolean. True if this partition is active and can be used.

PARTITION_STATE String. Text representation of the current state.

DELAY_TIME_TOTAL Integer. The total length of the current Entry or Exit delay. If not in a delay, this will be 0.

DELAY_TIME_REMAINING Integer. The amount of time remaining in the current Entry or Exit delay. If not in a delay this will be 0.

OPEN_ZONE_COUNT Integer. The number of zones in this partition which are currently open. Usually this will only matter when the armed state is DISARMED_NOT_READY.

ALARM_TYPE String. If the system is currently in the ALARM state, this will be a string representation of the type of alarm (Burglary, Fire, Medical, Panic, Carbon Monoxide, etc.).

ARMED_TYPE String. If we the system is currently in the ARMED state, this will be a string representation of type of arming (HOME, AWAY, etc.).

LAST_EMERGENCY String. When an emergency is triggered, this variable will store which type of emergency it was. e.g. “Police” or “Panic.

lua