A clone of: https://github.com/nutechsoftware/alarmdecoder This is requires as they dropped support for older firmware releases w/o building in backward compatibility code, and they had previously hardcoded pyserial to a python2 only version.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Scott Petersen f63c3e83b2 Added note about setuptools. 11 years ago
alarmdecoder Moving test directory. 11 years ago
bin Added support for baudrate on the command-line. Disabled reader thread by default. 11 years ago
docs Documentation update. 11 years ago
examples Fixed terminology. 11 years ago
test Updated module paths. 11 years ago
.gitignore Moved doc build directory. 11 years ago
LICENSE Added license details. 11 years ago
MANIFEST.in Added missing items. 11 years ago
README.md Added note about setuptools. 11 years ago
setup.py Added company name to keywords. 11 years ago

README.md

Alarm Decoder

Interface for the Alarm Decoder (AD2) device family

This Python library aims to provide a consistent interface for the entire Alarm Decoder product line, including the AD2USB, AD2SERIAL and AD2PI devices. This also includes devices that have been exposed via ser2sock, which supports encryption via SSL/TLS.

Installation

AlarmDecoder can be installed through pip: pip install alarmdecoder

or from source: python setup.py install

  • Note: python-setuptools is required for installation.

Requirements

Documentation

API documentation can be found here.

Examples

A basic example is included below. Please see the examples directory for more.

import time
from alarmdecoder import AlarmDecoder
from alarmdecoder.devices import USBDevice

def main():
    """
    Example application that prints messages from the panel to the terminal.
    """
    try:
        # Retrieve the first USB device
        device = AlarmDecoder(USBDevice.find())

        # Set up an event handler and open the device
        device.on_message += handle_message
        with device.open():
            while True:
                time.sleep(1)

    except Exception, ex:
        print 'Exception:', ex

def handle_message(sender, message):
    """
    Handles message events from the AlarmDecoder.
    """
    print sender, message.raw

if __name__ == '__main__':
    main()