Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for AD2* Devices #389

Merged
merged 78 commits into from
Jun 13, 2014
Merged

Add Support for AD2* Devices #389

merged 78 commits into from
Jun 13, 2014

Commits on Jan 4, 2014

  1. Cherry Pick Initial AD2USB.pm File from HPlato Repo

    	new file:   AD2USB.pm
    hplato authored and krkeegan committed Jan 4, 2014
    Configuration menu
    Copy the full SHA
    3de7c84 View commit details
    Browse the repository at this point in the history
  2. Cherry Pick HPlato Modifications to AD2USB.pm

    	modified:   AD2USB.pm
    hplato authored and krkeegan committed Jan 4, 2014
    Configuration menu
    Copy the full SHA
    7eba025 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6434969 View commit details
    Browse the repository at this point in the history
  4. AD2: Bless Child Obj As Generic Obj; Remove States

    - Allows for use of all Generic_Item options including tie_events
    - Remove states because this is not an "editable" object
    krkeegan committed Jan 4, 2014
    Configuration menu
    Copy the full SHA
    5fda62f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    297bdb5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    224cc49 View commit details
    Browse the repository at this point in the history
  7. AD2: Fix Tabbing in Serial_Setup For Easier Reading

    Tabs are set at 3 spaces which is odd
    krkeegan committed Jan 4, 2014
    Configuration menu
    Copy the full SHA
    71b2d33 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a782796 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2014

  1. AD2: Add Notes and Correct Tab Spacing in Check for Data

    Why are we hardcoding $Self?
    krkeegan committed Jan 6, 2014
    Configuration menu
    Copy the full SHA
    fe22363 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e743551 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    15b2849 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2014

  1. Configuration menu
    Copy the full SHA
    c35cffe View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2014

  1. AD2: Get Rid of CmdMsg Global Variabls, Simply DefineCmdMsg

    Can't use a global variable, otherwise users would not be able to have multiple panels setup in MH.
    
    Greatly simply DefineCmdMsg mess.
    krkeegan committed Jan 10, 2014
    Configuration menu
    Copy the full SHA
    d2888e0 View commit details
    Browse the repository at this point in the history
  2. AD2: Clean up new() Sub, Don't Change Config Hash

    Make new() sub much easier to read, get rid of verbose coding.
    
    Remove all changes to Config Hash, this should be read-only as it represents the contents of the ini file, this contents can be updated by MH
    krkeegan committed Jan 10, 2014
    Configuration menu
    Copy the full SHA
    83b3ee9 View commit details
    Browse the repository at this point in the history
  3. AD2: Remove Unnecessary Checks for MHINTERNAL

    No need for this if regex includes start and end of line
    krkeegan committed Jan 10, 2014
    Configuration menu
    Copy the full SHA
    0c83226 View commit details
    Browse the repository at this point in the history
  4. AD2: Remove LocalLogit Function

    No need for this
    krkeegan committed Jan 10, 2014
    Configuration menu
    Copy the full SHA
    2c621ee View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5ca00f4 View commit details
    Browse the repository at this point in the history
  6. AD2: Rework Check_for_Data to Handle Object Oriented Programming

    Also cleanup parser to make a little easier
    krkeegan committed Jan 10, 2014
    Configuration menu
    Copy the full SHA
    23705cf View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d3ca92c View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2014

  1. Configuration menu
    Copy the full SHA
    31ed86f View commit details
    Browse the repository at this point in the history
  2. AD2: Change GetStatusType to Return a Hash, Clean up Some Tabbing in …

    …CheckCmd, Removed Switch Package
    
    Returning a hash makes the code infinitely more readable, no longer need to remember the numbers for various message types.
    
    Removed Switch to make compatible with Perl 5.8.8
    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    c9e116a View commit details
    Browse the repository at this point in the history
  3. AD2: Remove Some Substr in GetStatusType, Add More Message Parsing

    Relying on substr is dangerous, particularly since a user can enable the !KPM: prefix.
    
    Add more message parsing to GetStatusType, this routine can likely be converted to parse_message and save a lot of code
    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    09a5365 View commit details
    Browse the repository at this point in the history
  4. AD2: Significantly Simplify Fault Loop Logic

    Get rid of all of the complicated tests.
    
    Allow ChangeZones to loop around from a high zone to a low zone.
    
    NOTE: May need to add a check to ChangeZones to see if it is reseting a mapped zone.
    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    708bbdd View commit details
    Browse the repository at this point in the history
  5. AD2: Simplyfy Bypass Logic

    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    f6e4c36 View commit details
    Browse the repository at this point in the history
  6. AD2: Condense Status Type into Keypad Type

    Anytime we get a keypad message we can check the status bits.
    
    Stop using substr and use hash flags.
    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    ffe223b View commit details
    Browse the repository at this point in the history
  7. AD2: Enable Use Strict, Clean Up Warnings

    Wow, can't believe I missed that.
    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    d1105b9 View commit details
    Browse the repository at this point in the history
  8. AD2: Condense RF Parsing into GetStatusType

    Using hash keys makes the code much more condensed and easier to read.
    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    3b771cf View commit details
    Browse the repository at this point in the history
  9. AD2: Cleanup Wireless Logic

    I have to admit I don't really understand all of the optional settings for wireless objects
    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    fce0d42 View commit details
    Browse the repository at this point in the history
  10. AD2: Cleanup Expander Logic

    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    c5f42fc View commit details
    Browse the repository at this point in the history
  11. AD2: Condense Relay Logic

    krkeegan committed Jan 11, 2014
    Configuration menu
    Copy the full SHA
    42bd9d2 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2014

  1. Configuration menu
    Copy the full SHA
    9681277 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    08b7a5e View commit details
    Browse the repository at this point in the history
  3. AD2: Make ResetAdemco OOP

    krkeegan committed Jan 12, 2014
    Configuration menu
    Copy the full SHA
    6e27e87 View commit details
    Browse the repository at this point in the history
  4. AD2: Reset All Zones, Even Those That are Mapped

    Not clear to me why we don't reset mapped zones.  If it is necessary, we should be adding something to ChangeZones, not burying it all over the place.
    krkeegan committed Jan 12, 2014
    Configuration menu
    Copy the full SHA
    979d6fb View commit details
    Browse the repository at this point in the history
  5. AD2: Remove Zone_Now_Msg, Not Used

    Anytime it was set, it was being immediately cleared by ResetAdemco
    krkeegan committed Jan 12, 2014
    Configuration menu
    Copy the full SHA
    948f335 View commit details
    Browse the repository at this point in the history
  6. AD2: Remove Zone_(Now|Last)_Name as Not Used

    These were always reset by ResetAdemco or not ever used
    krkeegan committed Jan 12, 2014
    Configuration menu
    Copy the full SHA
    460bd94 View commit details
    Browse the repository at this point in the history
  7. AD2: Remove Zone_(Now|Last)_Status, Remove Zone_Now_Num, Cut Back Zon…

    …e_Last_Num
    
    First three served no purpose.
    
    Zone_Last_Num is used only to keep track of state in fault loop.
    krkeegan committed Jan 12, 2014
    Configuration menu
    Copy the full SHA
    32aa1c7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ca1ed24 View commit details
    Browse the repository at this point in the history
  9. AD2: Rearange Stuff

    krkeegan committed Jan 12, 2014
    Configuration menu
    Copy the full SHA
    528c9fb View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0cdb1c4 View commit details
    Browse the repository at this point in the history
  11. AD2: Add Zone_Now Function

    krkeegan committed Jan 12, 2014
    Configuration menu
    Copy the full SHA
    28b5714 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6aa21c3 View commit details
    Browse the repository at this point in the history
  13. AD2: Add Framework for Partitions

    Not sure how they work exactly, so everything defaults to 1
    krkeegan committed Jan 12, 2014
    Configuration menu
    Copy the full SHA
    8db790f View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2014

  1. Configuration menu
    Copy the full SHA
    2c3287b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a0988d7 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2014

  1. AD2: Create Method to Merge INI and Read Table A Settings

    Change all calls to config_parms to use this method
    krkeegan committed Jan 17, 2014
    Configuration menu
    Copy the full SHA
    172ae32 View commit details
    Browse the repository at this point in the history
  2. AD2: Convert Routines to Object Oriented Code

    No more hardcoding $Self!!
    krkeegan committed Jan 17, 2014
    Configuration menu
    Copy the full SHA
    dfd3125 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    02d2902 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3b1772c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    38f62cc View commit details
    Browse the repository at this point in the history
  6. AD2: Get Rid of Config_Merge Function

    That was an awful idea.
    krkeegan committed Jan 17, 2014
    Configuration menu
    Copy the full SHA
    58bd1ab View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6b6a380 View commit details
    Browse the repository at this point in the history
  8. AD2: Cleanup Child Objects; Add New Objects

    Add an object for a partition.
    
    Cleanup unused function sof door and motion items.  Some odd functions still remain.
    krkeegan committed Jan 17, 2014
    Configuration menu
    Copy the full SHA
    174be7e View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2014

  1. Configuration menu
    Copy the full SHA
    d849b54 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2014

  1. AD2: Try to Clean Up State Messages

    This is only a start.
    krkeegan committed Jan 29, 2014
    Configuration menu
    Copy the full SHA
    c4dae63 View commit details
    Browse the repository at this point in the history
  2. AD2: Don't Reset Mapped Zones Based on Alpha Messages

    Mapped zones are faulted by direct messages received from the AD2.
    
    This correction fixes the following oddity:
    
    -------
    
    Zones 1 and 3 are faulted.
    
    The Alpha message describing the Zone 3 fault just arrived.
    
    Zone 10, a mapped zone is then faulted.  The fault is immediately detected by an EXP! message.  MH updates the status of zone 10 to faulted.
    
    AD2 then starts over with the Alpha fault list by sending the Alpha message that Zone 1 is faulted.
    
    Since the last alpha fault received was zone 3, MH resets all zones between 3 -> 1 as ready, clearing out 10.
    
    Two messages later, the Alpha message for zone 10 arrives, putting zone 10 back in a faulted state.
    
    -------
    
    This fixes the oddity by not reseting any mapped zones based on alpha messages.
    krkeegan committed Jan 29, 2014
    Configuration menu
    Copy the full SHA
    49fe393 View commit details
    Browse the repository at this point in the history
  3. AD2: Don't Perform Wrap-Around Reset, Unless Highest Zone is Consistent

    The alphanumeric fault messages are more complicated than i realized.  The list of faulted zones restarts at the lowest faulted zone everytime a fault occurs.  So for example, if zones 1-5 are faulted, and the panel has just finished sending the zone 3 fault message, if zone 7 is then faulted, the next message will be a zone 1 fault again.
    
    If we blindly perform wrap-around resets, it is very easy to create a "fluttering" zone when multiple zones are faulted.
    
    To cut down on the potential for fluttering, this change only performs a wrap-around reset if the highest faulted zone that is reported remains constant for 2 cycles.  While not completly ensuring that all zones have been report, it is unlikely that the panel will be interrupted at exactly the same point in its cycle twice.
    
    The major downside of this, is that there may be a slight delay in reseting zones from fault -> ready.  This is particularly true of the higher unmapped zones.
    krkeegan committed Jan 29, 2014
    Configuration menu
    Copy the full SHA
    d829384 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2014

  1. AD2: Optimize CPU Usage

    Try to optimize code as much as possible.
    
    On a dual core machine, using AD2 code seems to add between .3-.7% CPU usage to one of the cores.  I think this is mostly a side effect of using a socket.
    krkeegan committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    72dd795 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9083488 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2014

  1. AD2: Redesign Declaration of Wireless Items; Grandfather in Old Ini D…

    …eclaration
    
    The old design for the ini declaration was a little confusing.  Plus, carrying it over directly into the Configation Hash did not allow for mht style declarations of a wireless object.
    
    The new design seems more logical to me and adds the framework to support an mht style declaration.
    
    The old design for ini declarations is stil supported for backwards compatibility.
    krkeegan committed Feb 2, 2014
    Configuration menu
    Copy the full SHA
    658313a View commit details
    Browse the repository at this point in the history
  2. AD2: Condense Door and Motion Item Into a Single Class; Add Support f…

    …or MHT Declarations
    
    They are essentially identical.  This gets rid of the duplicative code.
    
    Added framework to support mht declaration of wireless, expander and relay items.
    krkeegan committed Feb 2, 2014
    Configuration menu
    Copy the full SHA
    8f85c2d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    02e6b64 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2014

  1. Configuration menu
    Copy the full SHA
    a830b41 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2014

  1. AD2: Add POD Documentation

    krkeegan committed Feb 12, 2014
    Configuration menu
    Copy the full SHA
    9ce1ef0 View commit details
    Browse the repository at this point in the history
  2. AD2: Convert from AD2USB -> AD2

    All references to AD2USB has been replaced with AD2.
    
    This means all configuration settings and user code settings need to be updated as well.
    
    The change was necessary because this module will work with at leaast AD2Serial, AD2USB, AD2Pi, and likely many more AD2 style products that will be released in the future.
    krkeegan committed Feb 12, 2014
    Configuration menu
    Copy the full SHA
    e3fc593 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    04c41ca View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    587e547 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2014

  1. Configuration menu
    Copy the full SHA
    0fcbc8a View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2014

  1. Configuration menu
    Copy the full SHA
    ad5c3d1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f230401 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4ee3c0a View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2014

  1. Configuration menu
    Copy the full SHA
    4b1a455 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2014

  1. Configuration menu
    Copy the full SHA
    016e681 View commit details
    Browse the repository at this point in the history
  2. AD2: Fix Wireless Definition; Fix Resetting of Keyfobs

    Cannot use comma in mht definitions
    
    Keyfob was not likely ever set to fault, since fault and ready were set in same loop.
    krkeegan committed Mar 27, 2014
    Configuration menu
    Copy the full SHA
    1b7758e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2bf4f3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    48dab89 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2014

  1. AD2: Fix Errors in Alpha Fault Processing; Add Better Notes; Fix Bug …

    …in Partition
    
    Checking for faults using the Alphanumeric messages is really complicated.  The concept sounds simple, but building a test that doesn't get confused is difficult. I think this current system is more accurate, but a little slower to move from fault->ready.
    
    I added a lot more comments to explain my logic since code alone is not really enough.
    
    Also fixed a error in the partition child.
    krkeegan committed Apr 19, 2014
    Configuration menu
    Copy the full SHA
    531bc69 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2014

  1. Configuration menu
    Copy the full SHA
    98e9a54 View commit details
    Browse the repository at this point in the history