Changes between Version 1 and Version 2 of WikiStart


Ignore:
Timestamp:
2010-04-06 22:04:22 (15 years ago)
Author:
guessed
Comment:

Initial conversion from wiki.micasaverde.com

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v1 v2  
    1 = Welcome to Trac 0.11.6 = 
    2  
    3 Trac is a '''minimalistic''' approach to '''web-based''' management of 
    4 '''software projects'''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress. 
    5  
    6 All aspects of Trac have been designed with the single goal to  
    7 '''help developers write great software''' while '''staying out of the way''' 
    8 and imposing as little as possible on a team's established process and 
    9 culture. 
    10  
    11 As all Wiki pages, this page is editable, this means that you can 
    12 modify the contents of this page simply by using your 
    13 web-browser. Simply click on the "Edit this page" link at the bottom 
    14 of the page. WikiFormatting will give you a detailed description of 
    15 available Wiki formatting commands. 
    16  
    17 "[wiki:TracAdmin trac-admin] ''yourenvdir'' initenv" created 
    18 a new Trac environment, containing a default set of wiki pages and some sample 
    19 data. This newly created environment also contains  
    20 [wiki:TracGuide documentation] to help you get started with your project. 
    21  
    22 You can use [wiki:TracAdmin trac-admin] to configure 
    23 [http://trac.edgewall.org/ Trac] to better fit your project, especially in 
    24 regard to ''components'', ''versions'' and ''milestones''.  
    25  
    26  
    27 TracGuide is a good place to start. 
    28  
    29 Enjoy! [[BR]] 
    30 ''The Trac Team'' 
    31  
    32 == Starting Points == 
    33  
    34  * TracGuide --  Built-in Documentation 
    35  * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project 
    36  * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions 
    37  * TracSupport --  Trac Support 
    38  
    39 For a complete list of local wiki pages, see TitleIndex. 
     1 
     2= Introduction = 
     3[[Image(ParadoxAlarm-Keypad.jpg, align=right)]] 
     4The Paradox Alarm plugin is a [http://wiki.micasaverde.com/index.php/Luup_Plugins Luup component] that connects Vera to a Paradox Security Alarm panel (Digiplex DGP-848, EVO or Spectra series) via their Home Automation interface (Paradox PRT3) over USB. 
     5 
     6Through this interface, events occurring within the Alarm Panel are exposed to Vera including the status of any attached Doors, Windows, Motion Sensors.   
     7 
     8Each of these is exposed as a ''Motion Sensor'' to Vera, so that standard [http://wiki.micasaverde.com/index.php/Scenes Scenes] (Lights, Notifications, etc) can be established in Vera based upon events occurring within the Alarm Panel. 
     9 
     10Additionally, the interface exposes the current Armed State, Stay Armed State and whether the Alarm is in Breach.  These are also exposed in a ''Scene-aware'' manner so that Vera can respond to them. 
     11 
     12This plugin works on Vera versions 1.0.9xx.   
     13 
     14'''WARNING: This plugin ''will not'' work with the 1.1.x versions of Vera's firmware.  Once that version has stabilized, I'll move my Vera up and sort out the issues.''' 
     15 
     16= How does it work = 
     17[[Image(ParadoxAlarm-DevicesView.png, align=right, 30%)]] 
     18The Paradox Alarm Panel uses a proprietary interface bus, called Combus, to talk to the devices connected to it.  The PRT3 Printer Module is a Combus device that acts as a bridge between the Alarm Panel, and a standard USB (or RS-232) device.  In addition, it provides a Printer connector for Raw status updates. 
     19 
     20The PRT3 interface can be configured to expose a set of low-level Alarm Panel messages, via either of it's Serial ports, to a Home Automation device.  Similarly, these low-level messages can be sent from the Home Automation device back to the Paradox Alarm Panel to perform various actions. 
     21 
     22The PRT3 Printer module comes with instructions on how to "wire" it to the Alarm Panel, via it's 4-wire Combus interface, and the subsequent Alarm Panel configuration to get it recognized. 
     23 
     24== Terminology == 
     25 Zone:: 
     26  a specific sensor in the Alarm Panel, such as a Window, Door or Motion Sensor.  These may either be hardwired, or wireless, depending upon the type of sensor. 
     27 Area/Partition:: 
     28  a collection of Zones.  Typically there is a single Area in a house.  Larger houses are often split into separate Areas (Upstairs vs Downstairs).  External buildings such as Garages and Guest houses are also candidates for additional Areas. 
     29 Combus:: 
     30  Paradox Security proprietary prototol. This protocol is used for communications between Paradox System components, such as the Printer Module, Zone Expanders, specialized Motion Sensors and the System Keypads. 
     31 Remote control:: 
     32  a Key chain remote control device, used to Arm (Lock), Disarm (Unlock) or set a Panic Alarm 
     33 Entry Door:: 
     34  a Zone (door) with a grace period delay attached to it. The Alarm will not go off during the grace period. 
     35 Breach:: 
     36  the Alarm is currently going off, either with a Bell, or a Silent Alarm. 
     37 Arm:: 
     38  the act of setting the Alarm Panel into the "I'm leaving" state. 
     39 Stay Arm:: 
     40  the act of setting the Alarm Panel into the "I'm staying" state. In this state the Motion Sensors don't trip Alarm Breach. 
     41 Force Arm:: 
     42  same as ''Arm'' except that some Zones may be left Open 
     43 Instant Arm:: 
     44  same as ''Stay Arm'' except there is no grace period on opening an Entry Door. 
     45 Virtual PGM:: 
     46  a special type of Zone defined within the Alarm Panel. The Alarm Panel can be configured to establish the conditions under which a Virtual PGM [Zone] is triggered and/or reset.  Virtual PGMs events are supported in the code, but are disabled by default to make the UI simpler. 
     47 One Touch or Quick Arming:: 
     48  a variant on the Arming modes that typically doesn't require a PIN Code to be entered to initiate the Arming request. 
     49 
     50== Messages == 
     51Depending upon the specific model of Alarm Panel, there will be support for different numbers of Zones, and Areas.  At startup of the Paradox Alarm Plugin, messages are exchanged with the Alarm Panel itself to understand how many Zones and Areas are in the Panel, the Labels for these, and the "current" state for any Zone. 
     52 
     53These low-level messages are varied, but include: 
     54 
     55  * Retrieve a Zone Label 
     56  * Retrieve a User Label 
     57  * Retrieve a Area Label 
     58  * Read the status of a Zone (open/closed) 
     59  * Read the status of an Area (armed/force-armed, stay-armed/instant-armed, alerting/breach) 
     60  * Zone status change events 
     61  * Area status change events 
     62  * Request Arming/Force-Arming 
     63  * Request Stay-Arming/Instant-Arming 
     64  * Trigger Alerting/Breach 
     65  * Remote control and Voice Activation events 
     66 
     67== The Paradox Alarm Plugin processing == 
     68 
     69=== Startup processing === 
     70The Startup processing for the Alarm Panel plugin looks roughly like: 
     71  * determine the number of Areas in the System, and their Labels 
     72  * Child devices created per Area found 
     73    *''Area <Area n Label>'' 
     74  * determine the number of Zones in the System, and their Labels 
     75  * create a Child device per Zone found using the Label read from the Alarm Panel 
     76  * determine the number of Users in the System, and their associated Labels (**for future use) 
     77  * retrieve the current state of each Area, and "set" it into Vera 
     78  * retrieve the current state of each Zone, and "set" it into Vera 
     79 
     80Notes: 
     81  * During startup processing, "out of band" events received are skipped. 
     82   This can happen, for example, if someone triggers a motion sensor event as Vera is starting up the plugin during a Vera reboot. 
     83  * To reduce the number of Zones created, the Plugin will look for "Empty" or "Default" Labels. 
     84   An Empty/Default Label on a Zone indicates that we'll skip over it. If you want a Zone to be mapped to a !MotionSensor Device then it must have a non-empty, non-default label.  This was done to avoid having up to 48, 96 or 192 "unused" !MotionSensor events in Vera. 
     85  * Zone-based !MotionSensor Devices are created without the [http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_append embedded] flag, so they can be placed in Rooms. 
     86   These devices are still Parented to the Alarm Panel Device, but can be placed in any Room defined by Vera.  The downside of this is that immediately after the installation of the Plugin, all Zones ''must'' be placed into a Room, as defined by the Vera UI. 
     87 
     88=== Event processing === 
     89 
     90After startup, the system is set running.  It receives events and, for those of interest, it translates them into !MotionSensor values to set upon it's Child Devices, in addition to setting Variables directly on the Alarm Area device 
     91 
     92==== Alarm Area Scene Events ==== 
     93The Alarm Device creates one "Area" child device per Alarm Partition/Area managed by the Alarm Panel.  This "Area" child device is used to create Scene behaviors for the Alarm Panel. 
     94 
     95During Scene creation, the following ''Events'' are exposed by each "Area" device: 
     96  * ''Partition is Armed'' 
     97  * ''Partition is Stay Armed'' 
     98  * ''Partition is Breached'' 
     99  * ''Partition is Disarmed'' 
     100 
     101During Advanced Scene creation, the following ''Actions'' are exposed by each "Area" device: 
     102  * ''!RequestArm'' - Submit a request to Arm the Alarm Partition (with PINCode) 
     103  * ''!RequestQuickArm'' - Submit a request to Quick, or "!OneTouch", Arm the Alarm Partition (no PINCode required) 
     104  * ''!RequestStay'' - Submit a request to Stay-Arm the Alarm Partition (with PINCode) 
     105  * ''!RequestQuickStay'' - Submit a request to Quick, or "!OneTouch", Stay-Arm the Alarm Partition (no PINCode required) 
     106  * ''!RequestDisarm'' - Submit a request to Disarm the Alarm Partition (PINCode required)  
     107  * ''!SetVirtualInput'' - Set one of the ![16] Virtual Inputs on the Alarm Panel to Open (0) or Closed (1) 
     108 
     109NOTE: The Alarm plugin code disables these Actions by default.  They must be enabled prior to using them in a Scene definition. 
     110 
     111==== Alarm Area Variables ==== 
     112This Alarm Panel implements a !DeviceType that gives it the following Variables (through it's !ServiceStateTable).  These can be used for Luup scripting: 
     113  * ''Area <Area n Label>'' 
     114    * ''Disarmed'' - Set whenever the Alarm Area is Disarmed (not Armed and not !StayArmed) 
     115    * ''Armed'' - Set when the user requests the Alarm Area to Arm, Force Arm, Stay Arm or Instant Arm the Area 
     116    * ''!StayArmed'' - Set when the user request the Alarm Area to Stay Arm or Instant Arm the Area 
     117    * ''Breach'' - set when the Alarm Area is in Breach (Siren, Silent etc) 
     118 
     119==== Legacy Motion Sensor Values ==== 
     120These will eventually be obsoleted: 
     121  * ''Communication'' !MotionSensor in Vera is set when the Printer Module has difficulty communicating with the Alarm Panel, or the internal buffers are full. 
     122 
     123NOTE: This version of the Luup Plugin doesn't support remotely Arming, or Disarming, of the Alarm Panel.  The underlying Message protocol supports this. 
     124 
     125=== Example event messages === 
     126  * `G009N001A001` - Arming with Master code, Area 1 
     127  * `G013N001A001` - Disarming with Master code, Area 1 
     128  * `G004N007A000` - Remote control access, Key 0 
     129  * `G004N003A001` - Arm with Stay mode, Area 1 
     130  * `G001N015A001` - Zone 15 is Open (Motion), Area 1 
     131  * `G000N015A001` - Zone 15 is OK (No motion), Area 1 
     132 
     133= Installation  = 
     134 
     135== Hardware Installation  == 
     136 
     137The following section assumes you have a working Paradox Alarm Panel and have successfully connected, and configured, the Paradox Security PTR3 Printer Module.  
     138 
     139Each of these devices comes with instructions for wiring and basic configuration. If you are not comfortable with this type of Wiring and configuration then contact your Alarm installer ''before'' proceeding.  
     140 
     141Notes  
     142 
     143  * Configure the PTR3 Module Baud Rate 
     144 
     145  In Paradox EVO Alarm Panels this is Section `[016]` and in Spectra Alarm Panels this is Section `[553]` of the Alarm Panel configuration.  The Baud Settings should be configured to `57600` Baud by setting both Options `[2] & [3]` to `[ON]`.  You can use a lower Baud rate, but it will slow the communications between Vera and the Alarm Panel. 
     146 
     147  * Configure the PTR3 Module for Home Automation 
     148 
     149  In Paradox EVO Alarm Panels, this is Section `[016]`, Option `[4]`. It should be set to `[ON]` 
     150 
     151  * Set any Zone Labels '''after''' you connect the PRT3 Module to the Combus 
     152 
     153  Only Zone Labels changed/modified ''after'' PRT3 is attached will be correctly recorded in the PRT3 Module. If you set the Zone Labels prior to connecting the PRT3, it'll only list "Default" Labels for each Zone. The Vera-Luup Alarm interface code will skip over these as if they're ''unused'' Zones. Please use the Alarm Panel's Reference and Installation manuals to determine how to setup your Zone Labels. 
     154  If you've attached the PRT3 Module to an existing Alarm Panel, you can simply re-enter the Zone Labels to "trigger" it to get a copy of them. 
     155 
     156  * Attach Vera to the Paradox PRT3 Module using a USB Cable 
     157  After attaching Vera to the Paradox PRT3 Module, navigate to the following pane in Vera: 
     158    ''Devices'' >> ''Luup Plugins'' >> ''Serial Port configuration'' 
     159  which should show settings similar to these [[Image(ParadoxAlarm-VeraSerialConfig.png, align=right, 30%)]]  You can now change the Baud rate to `57600`, matching the Alarm Panel, and press '''(Save)'''. 
     160 
     161== Software Installation == 
     162 
     163=== Initial Configuration === 
     164 
     165 1. Download the ZIP file `[http://www.box.net/shared/7z73h1mj6t ParadoxSecurity.1.1.zip]` 
     166 1. Expand the ZIP File to extract the 4x files, their names should be exactly as follows: 
     167   * `D_AlarmPartition1.xml` 
     168   * `D_ParadoxSecurityEVO.xml` 
     169   * `I_ParadoxSecurityEVO.xml` 
     170   * `S_AlarmPartition1.xml` 
     171 1. Goto ''Devices'' --> ''Luup plugins'' --> ''Luup files'' 
     172 1. Click the '''(Browse)''' buttons on the right, and enter the 4 filenames references above. 
     173 1. Select the checkbox "''[x] Restart Luup after upload''" and click '''(Go)''' 
     174 1. ... wait whilst it uploads and restarts the Lua engine ... 
     175 1. If successful, you'll see the 4x files listed in the System. 
     176 1. Navigate to ''Devices'', scroll to the bottom at the ''Add device'' form. 
     177 1. Type "`D_ParadoxSecurityEVO.xml`", and click '''(Add Device)''', type in a name, such as ''Paradox Alarm Panel'' against the device then click '''(Save)'''.  
     178 1. For the lines that follow, we'll assume that you named the device ''Paradox Alarm Panel'' but you can call it anything. 
     179 1. Goto ''Devices'' --> ''Luup plugins'' --> '''''(Serial Port configuration)''''' 
     180 1. Select the ''Paradox Alarm Panel [...]'' value for the ''Used by device:'' picklist then click '''(Save)'''. 
     181 
     182The Alarm Panel Plugin code will now read configuration data from the Alarm Panel, such as the number of Areas, Zones and Users.  Once complete, Vera will present you with Vera's ''Unassigned Devices UI'', letting you Assign the Alarm Panel's Zones to [http://wiki.micasaverde.com/index.php/Rooms Rooms] within Vera. 
     183 
     184Here's a copy of Vera's ''Generic'' Unassigned Devices UI for reference: 
     185[[Image(UnnasignedDevices1.jpg, align=right, 30%)]] 
     186 
     187=== Validating the Configuration === 
     188 
     189This section ''not'' intentionally left blank, it's just not finished yet :) 
     190 
     191=== Advanced Configuration === 
     192There are a number of advanced options that can be setup after performing the initial configuration, and validating it's working correctly.  These are exposed through Variables listed under: 
     193 
     194    ''Devices'' --> ''Luup plugins'' --> ''Your Alarm Panel Device'' -> ''(+)'' 
     195 
     196[[Image(ParadoxAlarm-DevicesViewAdvanced.png, align=right, 30%)]] 
     197 
     198 `maxAlarmZones` (number, ''default'' `24`):: 
     199   The number of Zones that the Alarm Panel Plugin should scan during startup.  Depending upon the Alarm panel model, it can support 48, 96, or 192 Zones.  Each takes some time to scan.  To speed startup, set this parameter to the number of Zones installed within your particular System. 
     200 `maxAlarmPartitions` (number, ''default'' `1`):: 
     201   The number of Areas/Partitions that the Alarm Panel Plugin should scan during startup.  The Alarm Panel typically supports 4 or more Areas/Partitions but most houses use only one, or maybe 2, of these Partitions.  The Alarm Panel Plugin defaults to loading 1 Partition.  This parameter may be used to increase the number of Partitions configured into Vera if you have more in your installation. 
     202 `maxUserCodes` (number, ''default'' `5`):: 
     203   The number of User codes registered with the Alarm Panel.  The Alarm Panel may support 96, 192 or more Users and reducing this parameter decreases the startup time of the Plugin.  At this time, only logging messages use the User strings but future functionality may permit ''Scene'' events based upon User descriptions retrieved by this parameter. 
     204 `enableVirtualInputs` (boolean, ''default'' `false`):: 
     205   Enable the Alarm Panel's Virtual Inputs to be represented within Vera's UI.  Intended for people that use the Paradox Alarm Panel Virtual input functionality. 
     206 `maxVirtualInputs` (number, ''default'' `5`, if `enableVirtualInputs` is set):: 
     207   If `enableVirtualInputs` is set, this parameter determines how many Virtual Inputs need to be established within Vera (up to the Max# of Virtual inputs of the Paradox Alarm Panel) 
     208 `enableRemoteArm` (string, ''default'' `false`):: 
     209   Enable the use of ''Stay Arm'' (`stay`), ''Stay'' and ''Regular Arm'' (`arm`) or ''Stay'', ''Regular'' and ''Disarm'' (`disarm`) functionality within the Plugin. 
     210 
     211{{{ 
     212#!html 
     213<span style="color: rgb(128, 0, 0);"><b>CAUTION:</b> Use of the <tt>enableRemoteArm</tt> parameter may constitute a Security risk.  Use at your own risk.</span> 
     214}}} 
     215 
     216= Scenes = 
     217The Plugin supports participation in Scenes, by generating Events and accepting/processing Actions. 
     218 
     219== Events == 
     220Each Alarm Partition is exposed as a !AlarmPartition1, and has the following scene capabilities  
     221[[Image(ParadoxAlarm-ScenesPartition.png, align=right, 30%)]]Example Alarm Partition Scene 
     222  * ''Partition is Armed'' 
     223  * ''Partition is Stay-Armed'' 
     224  * ''Partition is Breached'' 
     225  * ''Partition is Disarmed'' 
     226 
     227Each Alarm Zone is exposed a standard !MotionSensor1, and has the following standard Motion Sensor scene capabilities 
     228[[Image(ParadoxAlarm-ScenesZone.png, align=right, 30%)]]Example Alarm Zone Scene 
     229  * ''A sensor (door/window/motion/etc.) is tripped'' 
     230 
     231== Actions == 
     232Each Alarm Partition is exposed as a !AlarmPartition1, and has the following Actions (if Enabled) 
     233[[Image(ParadoxAlarm-ScenesAction.png, align=right, 30%)]]Example Alarm Partition Action 
     234  * ''!RequestArm'' - Submit a request to Arm the Alarm Partition (with PINCode) 
     235  * ''!RequestQuickArm'' - Submit a request to Quick, or "!OneTouch", Arm the Alarm Partition (no PINCode required) 
     236  * ''!RequestStay'' - Submit a request to Stay-Arm the Alarm Partition (with PINCode) 
     237  * ''!RequestQuickStay'' - Submit a request to Quick, or "!OneTouch", Stay-Arm the Alarm Partition (no PINCode required) 
     238  * ''!RequestDisarm'' - Submit a request to Disarm the Alarm Partition (PINCode required) 
     239  * ''!SetVirtualInput'' - Set one of the ![16] Virtual Inputs on the Alarm Panel to Open (0) or Closed (1) 
     240 
     241= Scripting = 
     242... some Luup scripting please... 
     243 
     244= Errors = 
     245 
     246The Paradox Alarm Plugin unconditionally logs all Alarm Panel events in Vera's log file. These events have been translated into their English equivalent from the internal codes that the Alarm Panel uses. 
     247 
     248Examples include:  
     249 
     250{{{ 
     251#!html 
     252 <tt> 
     253 <span style="color: rgb(128, 0, 0);">01 ... luup_log:nn: 001:Zone is Open, 015:Motion Upstairs (Zone 15), 001:Area 1</span><br> 
     254 <span style="color: rgb(128, 0, 0);">01 ... luup_log:nn: 000:Zone is OK, 015:Motion Upstairs (Zone 15), 001:Area 1</span><br> 
     255 <span style="color: rgb(128, 0, 0);">01 ... luup_log:nn: 014:Disarm with User Code, 002:User Code 2, 001:Area 1</span><br> 
     256 <span style="color: rgb(128, 0, 0);">01 ... luup_log:nn: 064:Status 1, 000:Armed, 001:Area 1</span><br> 
     257 <span style="color: rgb(128, 0, 0);">01 ... luup_log:nn: 009:Arming with Master, 001:User Code 1, 001:Area 1</span><br> 
     258 <span style="color: rgb(128, 0, 0);">01 ... luup_log:nn: 004:Non-reportable Event, 007:Remote control access, 000:Occurs in all areas enabled in the system</span><br> 
     259 </tt> 
     260}}} 
     261 
     262= Discussion = 
     263In no particular order... 
     264 
     265  * http://forum.micasaverde.com/index.php?topic=2492.0 
     266  * http://forum.micasaverde.com/index.php?topic=2134.0 
     267 
     268= References = 
     269  * Paradox Security Systems [http://www.paradox.com/Products/default.asp?PID=184 EVO48/192 Alarm Panel] 
     270  * Paradox Security Systems [http://www.paradox.com/Products/default.asp?PID=218 PRT3 Printer Module] 
     271  * Paradox Security Systems [http://www.paradox.com/Products/default.asp?PID=189 K641 Blue Keypad Module] 
     272  * Paradox Security Systems [http://paradox.com/Products/default.asp?CATID=7&SUBCATID=71&PRD=281 ZX8 8-Zone Expansion Module] 
     273  * Paradox Security Systems [http://paradox.com/Products/default.asp?CATID=7&SUBCATID=71&PRD=252 MAGELLAN Wireless Expansion Module] 
     274  * Paradox Security Systems [http://paradox.com/Products/default.asp?CATID=4&SUBCATID=44&PRD=248 MAGELLAN Remote Control with Backlit Buttons] 
     275  * Paradox Security Systems Digiplex Control Panel (DGP-848) Reference and Installation Manual  
     276  * Paradox Security Systems APR-PRT3 Installation Manual (PDF) 
     277  * Paradox Security Systems APR-PRT3 Printer Module: ASCII Protocol Programming Instructions (PDF) 
     278  * [http://www.lua.org/manual/5.1 Lua 5.1 Reference Manual] 
     279  * [http://lua-users.org/wiki/LuaTutorial Lua-users Lua Tutorial] 
     280  * Paradox Expansion Module Mounting Plate for On-Q Legrand Structured Wiring closet (PN: 364638-01)