hollie/misterhouse — pull request #389 by krkeegan (2014-03-27 04:01:52+00:00)
Title: Add Support for AD2* Devices

This is an expansion of the great work done by Kirk Friedenberger, Wayne Gatlin, and Howard Plato

MAJOR NOTE: I changed the name of the library from AD2USB to AD2 as this library can be used with AD2Serial, AD2USB, AD2Pi, and whatever other fantastic products that Sean comes up with. This change will affect anyone upgrading from an older version to this, generally you can simply change all configuration settings from ad2usb->ad2.

The initial code relied very heavily on INI definitions and only created a single object inside MisterHouse. This new code attempts to maintain support for that initial configuration.

In addition, this code allows for the definition of objects using mht style definitions. You can also now treat each zone as a separate object. This allows for use of all of the normal Generic_Items functions that we are used to, such as `$garage_zone->tie_event('$garage_light->set(ON)', 'fault');`. I believe the code is also much more robust. It allows for multiple AD2 devices to exist, multiple partitions, and many other features.

I highly recommend reviewing the POD documentation contained within the file, or viewing it through the http://localhost/docs portal. I have also posted a copy of the documentation here for those who wish to review the documentation without merging this branch. http://jsfiddle.net/7sCa9/

The AD2 and the alarm panels in general have many many options. This code works flawlessly for me, but I have not and likely cannot test all of the various permutations, so I am sure it has flaws. If you fork this branch and send pull requests to me, I will merge them in. If you don't want to do that, I will do my best to fix errors as they are identified. As demonstrated by the 76 commits and 3 months of work, I have become a little burnt out on this library and have undoubtedly missed many many things.