1.0.1 • Published 10 years ago

ad2usb v1.0.1

Weekly downloads
5
License
-
Repository
github
Last release
10 years ago

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);
1.0.1

10 years ago

1.0.0

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

11 years ago