NSLU2-Linux
view · edit · print · history

The AlarmSlug provides the capability of interfacing with the AD2USB (http://store.homeseer.com/store/AD2USB---Ademco-Vista-Panel-Interface-NuTech-P857C193.aspx(approve sites)) which is an alarm keypad emulator for Ademco Vista alarm panels.

There are several key components (some obvious):

  • NSLU2 with any distro that can recognize FTDI-based USB devices (Debian Lenny for NSLU2 works for me... as far as I know, and can guess, most distros for the NSLU2 should work)
  • AD2USB, 4-wire connector hooked up to alarm panel, short length of USB cable, and short length of cat5 cable.
  • Powerline Adapter, router, network jack, etc (I'm using a powerline adapter)
  • ser2sock.c compiled on NSLU2 (requires the relevant compilers - GCC, CC, etc...)

I bought a microSD USB flash drive and stuck a 2gb microSD card in. Over half the space on it went towards the Debian install, so my particular install isn't exactly bloat-free.

The AD2USB was detected immediately as /dev/ttyUSB0 upon plugging it in. The ser2sock compilation went smoothly and I was immediately receiving chatter from the panel upon running ser2sock. Furthermore, I was able to issue the same commands as I would on a standard Vista keypad: "#2" to arm the alarm and "[mycode]1" to disable. NOTE: in order to send commands, the AD2USB needs to be assigned a keypad address as you would for any additional alarm keypad being added (had to do this from the already-present keypad in programming mode). Ser2sock has the ability to run as a daemon and assigns itself a TCP port (can be specified). From there you can issue the same commands (via telnet and echo, for example) from any other machine on the network that connects to the relevant port.

As far as logging, by default ser2sock logs to the 'messages' facility (this can be changed in the ser2sock.c and takes effect when compiled). I installed the OSSEC agent on the NSLU2 and setup a decoder to parse the log file the AD2USB logs to. These get transported over to my OSSEC server where I can then take actions based on certain events the AD2USB spits out (i.e. send an SMS to my phone when the alarm gets tripped, etc).

More improvements are needed - I need to finish analyzing the AD2USB logs and assigning the proper responses/alerting. And I also want to setup a secure webapp that interfaces as a front-end UI for the AD2USB, accessible from regular browsers as well as mobile devices.

UPDATE (4/8/2011): I wrote an OSSEC decoder and some rules to successfully parse alerts from the Alarm panel. I also changed the alarm panel alerts from their standard "FAULT ##" syntax to naming conventions that make more sense (i.e. "GARAGE", "FRONT DOOR", etc). I can also receive emails and texts whenever a sensor is tripped or when the alarm is tripped after setting it.

Next steps for further improvement: mod the NSLU2 to force power always on (http://www.nslu2-linux.org/wiki/HowTo/ForcePowerAlwaysOn) and figure out how to rig the power supply so that power is supplied to it via the alarm panel, which integrates a backup battery. Not sure how this will work out but it's worth a try. I also still need to work on that webapp/UI to set the alarm from a mobile device. I also had thoughts of potentially integrating with Asterisk IVR so I would be able to set the alarm code through my analog phone (hooked up to an Obi110 bridge)

view · edit · print · history · Last edited by jplee3.
Based on work by jplee3 and jlee.
Originally by jplee3.
Page last modified on April 08, 2011, at 11:15 PM