more G-Labs products

Author Topic: AD2USB Bridge Sensors (Fork of AlarmPanel)  (Read 1217 times)

August 26, 2015, 04:45:43 AM
Read 1217 times

gustavo

  • *
  • Information
  • Newbie
  • Posts: 13
As I've continued to work to integrate my alarm setup into HG, it became clear that what I was looking for in terms of integration was different than what AlarmPanel provides.  That's not to say that there is any one way that is better, but rather different.  Specifically:

AlarmPanel as coded right now works by interpreting text that is meant for the KeyPad.  The virtual sensors it provides are mapped to KeyPad text.  This makes it very straight forward and easy to setup / implement but has one very big limitation:  you can't get sensor data when the alarm is armed.  It also means that at times AlarmPanel has to send *'s to the Vista AlarmPanel in order to find out which sensors are tripped.  Additionally, its only useful for sensors that are enrolled with the Panel.  There may be scenarios where you don't need the panel to know about sensors, but HG should be able to get the data.

The reason I started working on this was because I wanted to be able to trigger actions in HG based on wired and wireless motion sensors (e.g. if its night time, and the wireless sensor captures something in the house, turn on the hue lights to a dim red so I can navigate to the fridge for water, without having to turn on the blinding light) while my alarm was armed.

This is where the AD2USB Bridge and Sensors are different: Virtual Sensors are mapped to !RFX or !EXP messages off of the bus, which means that even if the alarm is in an armed state we still get sensor messages.  Differences to note:

* Supports wireless devices, even devices that are not enrolled in your alarm, even when the alarm is armed.
* Supports wired devices which are wired through an expand (e.g. Ademco 4129), even when the alarm is armed.
* Supports sending conditions to the Vista Alarm Panel using Script Wizard actions.
* Does *not* support wired devices wired directly into the panel (e.g. not via an expander).

If your setup includes devices wired into the panel, then you probably want to use the Alarm Panel add-on or get an expander and move those over to the expander (this is what I did).

Configuring Wireless Devices:
Wireless devices can have multiple "loops".  For example, the Ademco 5816 will have at least 3 different loops: one for the built-in reed switch, one for an external wired contact/reed/whatever switch, and another for the tamper switch when you open the unit up.  When you configured a device you configure as
XXXXXXXXX:L,L,L

Where the X's represent the serial number of the RFX wireless device and the L's a re a comma separated list of loops you care about.  You can have one, two, three, or four loops listed.  Additionally, these devices report on battery low status which my code takes care of.  When one or more of the loops specified is tripped, this will open/close the door/window device.

Configuring Expander Wired Devices:
Each sensor is configured with the address (e.g. the first expander is at address 7), Position on that expander, and NO/NC.

E.g.: 07,01,01 represents bus 7, first wired loops on that device, and the 01 means that it's "Normally Closed".  E.g. door/window should open when the circuit is no longer shorted.  If you want to set it to "Normally Open" change it to "00".  Note that expander loops have to have end of line resistors, otherwise you'll get a code of "02" or "03" which I think means "something is wrong, check the circuit".

Configuring Script Wizard Actions:
Go into script wizard, under program code select add command, and click on AD2USB.  Then click on Switch. Then click on Custom API Command.  Then you can add a Value of "QuickAccess" and with a parameter of "Disarm".  That'll disarm the panel.  You could control this from a minimote for example.  For KeyPad commands select Value of "KeyPad" with Parameters being the keypad command you want.  E.g. "1" would send a 1 key.  Bare careful in what you send with KeyPad commands - you could end up reconfiguring your AD2USB in an unfortunate way.

Script wizard actions could easily (one line fix) be ported to the AlarmPanel code.  You just have to set it as a switch in order to get the device to show up in the command list... For whatever reason generic doesn't work...  Took me *forever* to figure that out.  :)

---- EDIT 9/15/2015 ----
Removing the bundle, and adding the widget.
« Last Edit: September 16, 2015, 01:18:23 AM by gustavo »

November 03, 2015, 12:03:17 AM
Reply #1

gustavo

  • *
  • Information
  • Newbie
  • Posts: 13
New version, bug fixes.