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
Required:
An AlarmDecoder device
Python 2.7
pyserial >= 2.7
Optional:
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 SerialDevice
def main():
"""
Example application that prints messages from the panel to the terminal.
"""
try:
# Retrieve the first USB device
device = AlarmDecoder(SerialDevice(interface='/dev/ttyUSB0'))
# Set up an event handler and open the device
device.on_message += handle_message
with device.open(baudrate=115200):
while True:
time.sleep(1)
except Exception as ex:
print ('Exception:', ex)
def handle_message(sender, message):
"""
Handles message events from the AlarmDecoder.
"""
print sender, message.raw
if __name__ == '__main__':
main()
Release files for alarmdecoder 1.13.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| alarmdecoder-1.13.14.tar.gz | 324.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| alarmdecoder-1.13.14-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 373.2 kB
Release files / alarmdecoder-1.13.14.tar.gz
| Download URL | alarmdecoder-1.13.14.tar.gz |
|---|---|
| Size | 324.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0713c75f694650af5007bf78fad5e1fc4c344d60e842e6941b020db0b52933e
|
|
BLAKE2b-256 checksum How to use checksums |
b00e0f2b379e812519e9e765c49011f2d6d1ef17b259f96b8b34e664b6866ea5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / alarmdecoder-1.13.14-py2.py3-none-any.whl
| Download URL | alarmdecoder-1.13.14-py2.py3-none-any.whl |
|---|---|
| Size | 48.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a5eb12a53093b44df084d270f600c178ee24681134c67b6a9ecee0c453784463
|
|
BLAKE2b-256 checksum How to use checksums |
6007fc3c5a5e642d25d126cc14b357c1e14273b30192b733656504eaaf04647e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|