Skip to main content

Python interface for the AlarmDecoder (AD2) family of alarm devices which includes the AD2USB, AD2SERIAL and AD2PI.

Project description

Summary

This Python library aims to provide a consistent interface for the AlarmDecoder product line. (AD2USB, AD2SERIAL and AD2PI) 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 at readthedocs.

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alarmdecoder-0.6.tar.gz (276.9 kB view details)

Uploaded Source

File details

Details for the file alarmdecoder-0.6.tar.gz.

File metadata

  • Download URL: alarmdecoder-0.6.tar.gz
  • Upload date:
  • Size: 276.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for alarmdecoder-0.6.tar.gz
Algorithm Hash digest
SHA256 6d1148a5b84199b8273901d7500382bd4616d4e23995ffa87663dd4ad22f313a
MD5 002af76ab916e31ff3d7f0410aa73064
BLAKE2b-256 5b0c38a37ef700508ad189707eeb922bafe2d12963709ee9492b4e8e0d63fc0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page