A driver for the Nutech AD2USB Ademco/Honeywell Vista security panel interface
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
spec
src
.gitignore
.npmignore
.travis.yml
Cakefile
README.md
package.json

README.md

A driver for the Nutech AD2USB Ademco Vista security panel interface.

Build Status

The AD2USB interface is a serial device. This library assumes the serial communication has been made available on the network using a Serial-IP adapter.

Usage

Call the connect function to connect with the AD2USB controller. After the connection has been established, proceed by interacting with the controller.

var Alarm = require('ad2usb');
var alarm = Alarm.connect('192.168.1.6', 4999, function() {
  // connected to interface

  // listen for alarm to be armed
  alarm.on('armedAway', function() {
    console.log('Alarm has been armed in away mode');
  });

  // arm in away mode with user code 1234
  alarm.armAway('1234');
});

You may also opt to manually set up a socket and provide it to the constructor directly.

var Alarm = require('ad2usb'),
    Socket = require('net').Socket;
var socket = new Socket({type: 'tcp4'});
var alarm = new Alarm(socket);
alarm.connect('192.168.1.6', 4999);