Provides the main AlarmDecoder class.
Bases: object
High-level wrapper around AlarmDecoder (AD2) devices.
This event is called when the panel is armed.
Callback definition: def callback(device)
This event is called when the panel is disarmed.
Callback definition: def callback(device)
This event is called when panel power switches between AC and DC.
Callback definition: def callback(device, status)
This event is called when the alarm is triggered.
Callback definition: def callback(device, zone)
This event is called when the alarm stops sounding.
Callback definition: def callback(device, zone)
This event is called when a fire is detected.
Callback definition: def callback(device, status)
This event is called when a zone is bypassed.
Callback definition: def callback(device, status)
This event is called when the device finishes booting.
Callback definition: def callback(device)
This event is called when the device receives its configuration.
Callback definition: def callback(device)
This event is called when Zonetracker detects a zone fault.
Callback definition: def callback(device, zone)
This event is called when Zonetracker detects that a fault is restored.
Callback definition: def callback(device, zone)
This event is called when the device detects a low battery.
Callback definition: def callback(device, status)
This event is called when the device detects a panic.
Callback definition: def callback(device, status)
This event is called when a relay is opened or closed on an expander board.
Callback definition: def callback(device, message)
This event is called when standard panel Message is received.
Callback definition: def callback(device, message)
This event is called when an ExpanderMessage is received.
Callback definition: def callback(device, message)
This event is called when an LRRMessage is received.
Callback definition: def callback(device, message)
This event is called when an RFMessage is received.
Callback definition: def callback(device, message)
This event is called when a !Sending.done message is received from the AlarmDecoder.
Callback definition: def callback(device, status, message)
This event is called when the device has been opened.
Callback definition: def callback(device)
This event is called when the device has been closed.
Callback definition: def callback(device)
This event is called when a line has been read from the device.
Callback definition: def callback(device, data)
This event is called when data has been written to the device.
Callback definition: def callback(device, data)
Represents panel function key #1
Represents panel function key #2
Represents panel function key #3
Represents panel function key #4
Represents a panic keypress
Default timeout (in seconds) before the battery status reverts.
Default tTimeout (in seconds) before the fire status reverts.
The keypad address in use by the device.
The configuration bits set on the device.
The address mask configured on the device.
List containing the devices zone emulation status.
List containing the devices relay emulation status.
The status of the devices LRR emulation.
The status of message deduplication as configured on the device.
The panel mode that the AlarmDecoder is in. Currently supports ADEMCO and DSC.
The ID of the AlarmDecoder device.
Returns: | identification string for the device |
---|
Retrieves the timeout for restoring the battery status, in seconds.
Returns: | battery status timeout |
---|
Retrieves the timeout for restoring the fire status, in seconds.
Returns: | fire status timeout |
---|
Opens the device.
Parameters: |
|
---|
Sends data to the AlarmDecoder device.
Parameters: | data (string) – data to send |
---|
Retrieves the configuration from the device. Called automatically by _on_open().
This module contains different types of devices belonging to the AlarmDecoder (AD2) family.
Bases: object
Base class for all AlarmDecoder (AD2) device types.
This event is called when the device has been opened.
Callback definition: def callback(device)
This event is called when the device has been closed.
Callback definition: def callback(device)*
This event is called when a line has been read from the device.
Callback definition: def callback(device, data)*
This event is called when data has been written to the device.
Callback definition: def callback(device, data)*
Bases: alarmdecoder.devices.Device
AD2USB device utilizing PyFTDI’s interface.
List of Vendor and Product IDs used to recognize AD2USB devices.
Returns all FTDI devices matching our vendor and product IDs.
Returns: | list of devices |
---|---|
Raises : | CommError |
Returns a cached list of AD2USB devices located on the system.
Returns: | cached list of devices found |
---|
Factory method that returns the requested USBDevice device, or the first device.
Parameters: | device (tuple) – Tuple describing the USB device to open, as returned by find_all(). |
---|---|
Returns: | USBDevice object utilizing the specified device |
Raises : | NoDeviceError |
Starts the device detection thread.
Parameters: |
|
---|
Retrieves the serial number of the device.
Returns: | serial number of the device |
---|
Retrieves the interface used to connect to the device.
Returns: | the interface used to connect to the device |
---|
Opens the device.
Parameters: |
|
---|---|
Raises : |
Writes data to the device.
Parameters: | data (string) – data to write |
---|---|
Raises : | CommError |
Reads a single character from the device.
Returns: | character read from the device |
---|---|
Raises : | CommError |
Reads a line from the device.
Parameters: |
|
---|---|
Returns: | line that was read |
Raises : |
Bases: threading.Thread
Thread that handles detection of added/removed devices.
This event is called when an AD2USB device has been detected.
Callback definition: def callback(thread, device*
Bases: alarmdecoder.devices.Device
AD2USB, AD2SERIAL or AD2PI device utilizing the PySerial interface.
Default baudrate for Serial devices.
Returns all serial ports present.
Parameters: | pattern (string) – pattern to search for when retrieving serial ports |
---|---|
Returns: | list of devices |
Raises : | CommError |
Retrieves the interface used to connect to the device.
Returns: | interface used to connect to the device |
---|
Opens the device.
Parameters: |
|
---|---|
Raises : |
Writes data to the device.
Parameters: | data (string) – data to write |
---|---|
Raises : | py:class:~alarmdecoder.util.CommError |
Reads a single character from the device.
Returns: | character read from the device |
---|---|
Raises : | CommError |
Bases: alarmdecoder.devices.Device
Device that supports communication with an AlarmDecoder (AD2) that is exposed via ser2sock or another Serial to IP interface.
Retrieves the interface used to connect to the device.
Returns: | interface used to connect to the device |
---|
Retrieves whether or not the device is using SSL.
Returns: | whether or not the device is using SSL |
---|
Retrieves the SSL client certificate path used for authentication.
Returns: | path to the certificate path or OpenSSL.crypto.X509 |
---|
Retrieves the SSL client certificate key used for authentication.
Returns: | jpath to the SSL key or OpenSSL.crypto.PKey |
---|
Retrieves the SSL Certificate Authority certificate used for authentication.
Returns: | path to the CA certificate or OpenSSL.crypto.X509 |
---|
Opens the device.
Parameters: |
|
---|---|
Raises : |
Writes data to the device.
Parameters: | data (string) – data to write |
---|---|
Returns: | number of bytes sent |
Raises : | CommError |
Reads a single character from the device.
Returns: | character read from the device |
---|---|
Raises : | CommError |
Message representations received from the panel through the AlarmDecoder (AD2) devices.
Bases: object
Base class for messages.
The raw message text
The timestamp of the message
Bases: alarmdecoder.messages.BaseMessage
Represents a message from the alarm panel.
Indicates whether or not the panel is in a ready state.
Indicates whether or not the panel is armed away.
Indicates whether or not the panel is armed home.
Indicates whether or not the keypad backlight is on.
Indicates whether or not we’re in programming mode.
Number of beeps associated with a message.
Indicates whether or not a zone is bypassed.
Indicates whether or not the panel is on AC power.
Indicates whether or not the chime is enabled.
Indicates whether or not an alarm event has occurred.
Indicates whether or not an alarm is sounding.
Indicates whether or not there is a low battery.
Indicates whether or not the entry delay is enabled.
Indicates whether or not a fire alarm is sounding.
Indicates whether or not there are zones that require attention.
Indicates whether or not the perimeter is armed.
Indicates whether a system fault has occurred.
Indicates which panel type was the source of this message.
The numeric code associated with the message.
The human-readable text to be displayed on the panel LCD.
Current cursor location on the keypad.
Address mask this message is intended for.
The bitfield associated with this message.
The panel data field associated with this message.
Bases: alarmdecoder.messages.BaseMessage
Represents a message from a zone or relay expansion module.
Flag indicating that the expander message relates to a Zone Expander.
Flag indicating that the expander message relates to a Relay Expander.
Expander message type: ExpanderMessage.ZONE or ExpanderMessage.RELAY
Address of expander
Channel on the expander
Value associated with the message
Bases: alarmdecoder.messages.BaseMessage
Represents a message from an RF receiver.
Serial number of the RF device.
Value associated with this message.
Low battery indication
Supervision required indication
Loop indicators
Bases: alarmdecoder.messages.BaseMessage
Represent a message from a Long Range Radio.
Data associated with the LRR message. Usually user ID or zone.
The partition that this message applies to.
The type of the event that occurred.
Provides zone tracking functionality for the AlarmDecoder (AD2) device family.
Bases: object
Representation of a panel zone.
Status indicating that the zone is cleared.
Status indicating that the zone is faulted.
Status indicating that there is a wiring issue with the zone.
Zone ID
Zone name
Zone status
Timestamp of last update
Bases: object
Handles tracking of zones and their statuses.
This event is called when the device detects a zone fault.
Callback definition: def callback(device, zone)
This event is called when the device detects that a fault is restored.
Callback definition: def callback(device, zone)
Zone expiration timeout.
Returns the current list of zones being tracked.
Returns: | dictionary of Zone being tracked |
---|
Update zone statuses based on the current message.
Parameters: | message (Message or ExpanderMessage) – message to use to update the zone tracking |
---|
Provides utility classes for the AlarmDecoder (AD2) devices.
Bases: exceptions.Exception
There was an error communicating with the device.
Bases: exceptions.Exception
There was a timeout while trying to communicate with the device.
Bases: exceptions.Exception
The format of the panel message was invalid.
Bases: object
Represents firmware for the AlarmDecoder devices.
Uploads firmware to an AlarmDecoder device.
Parameters: |
|
---|---|
Raises : |
Representations of Panels and their templates.