pydmp¶
PyDMP - Python library for controlling DMP alarm systems.
Platform-agnostic library for interfacing with DMP (Digital Monitoring Products) alarm panels via TCP/IP.
Example (Async): >>> import asyncio >>> from pydmp import DMPPanel >>> >>> async def main(): ... panel = DMPPanel() ... await panel.connect("192.168.1.100", "00001", "YOUR_KEY") ... areas = await panel.get_areas() ... await areas[0].arm() ... await panel.disconnect() >>> >>> asyncio.run(main())
Example (Sync): >>> from pydmp import DMPPanelSync >>> >>> panel = DMPPanelSync() >>> panel.connect("192.168.1.100", "00001", "YOUR_KEY") >>> areas = panel.get_areas() >>> areas[0].arm_sync() >>> panel.disconnect()
pydmp.panel_sync¶
High-level synchronous panel controller.
DMPPanelSync Objects¶
High-level synchronous interface to DMP panel.
__init__¶
Initialize sync panel.
Arguments:
port- TCP port (default: 2011)timeout- Connection timeout in seconds
is_connected¶
Check if connected to panel.
connect¶
Connect to panel and authenticate.
Arguments:
host- Panel IP address or hostnameaccount- 5-digit account numberremote_key- Remote key for authentication
disconnect¶
Disconnect from panel.
update_status¶
Update status of all areas and zones from panel.
get_areas¶
Get all areas.
Returns:
List of AreaSync objects
get_area¶
Get specific area by number.
Arguments:
number- Area number (1-8)
Returns:
AreaSync object
get_zones¶
Get all zones.
Returns:
List of ZoneSync objects
get_zone¶
Get specific zone by number.
Arguments:
number- Zone number (1-999)
Returns:
ZoneSync object
get_outputs¶
Get all outputs.
Returns:
List of OutputSync objects
get_output¶
Get specific output by number.
Arguments:
number- Output number (1-4)
Returns:
OutputSync object
__enter__¶
Context manager entry.
__exit__¶
Context manager exit.
__repr__¶
String representation.
pydmp.exceptions¶
Exceptions for PyDMP.
DMPError Objects¶
Base exception for DMP errors.
DMPConnectionError Objects¶
Connection-related errors.
DMPAuthenticationError Objects¶
Authentication failed.
DMPTimeoutError Objects¶
Operation timed out.
DMPProtocolError Objects¶
Protocol-level errors.
DMPInvalidResponseError Objects¶
Invalid or unexpected response from panel.
DMPCommandError Objects¶
Command execution errors.
DMPCommandNAKError Objects¶
Command was rejected by panel (NAK response).
DMPInvalidParameterError Objects¶
Invalid parameter provided.
DMPAreaError Objects¶
Area-related errors.
DMPZoneError Objects¶
Zone-related errors.
DMPOutputError Objects¶
Output-related errors.
pydmp.user¶
UserCode Objects¶
Decrypted user code record.
code¶
secret: excluded from repr
pin¶
secret: excluded from repr
temp_date¶
legacy 6-digit field; same as end_date (DDMMYY)
exp_date¶
legacy 4-char field; often '----' on observed panels
start_date¶
6 digits DDMMYY; start of access
end_date¶
6 digits DDMMYY; end of access
flags¶
3 chars (e.g., 'YNN')
active¶
First Y/N flag: user active
temporary¶
Third Y/N flag: temporary user
pydmp.transport_sync¶
Synchronous wrapper for DMP transport + protocol (bytes + codec).
DMPTransportSync Objects¶
Synchronous wrapper combining DMPTransport and DMPProtocol.
__init__¶
def __init__(host: str,
account: str,
remote_key: str,
port: int = DEFAULT_PORT,
timeout: float = 10.0)
Initialize sync transport.
connect¶
Establish connection and authenticate.
disconnect¶
Disconnect gracefully.
send_command¶
def send_command(
command: str,
encrypt_user_code: bool = False,
user_code: str | None = None,
**kwargs: Any
) -> str | StatusResponse | UserCodesResponse | UserProfilesResponse | OutputsResponse | None
Send a protocol command and return decoded response.
pydmp.panel¶
High-level async panel controller.
DMPPanel Objects¶
High-level async interface to DMP panel.
__init__¶
Initialize panel.
Arguments:
port- TCP port (default: 2011)timeout- Connection timeout in seconds
is_connected¶
Check if connected to panel.
connect¶
Connect to panel and authenticate.
Arguments:
host- Panel IP address or hostnameaccount- 5-digit account numberremote_key- Remote key for authentication
Raises:
DMPConnectionError- If connection fails
disconnect¶
Disconnect from panel.
Always releases the active-connection registration and clears state,
even when the transport has already dropped, so a later connect()
can succeed.
update_status¶
Update status of all areas and zones from panel.
Raises:
DMPConnectionError- If not connected or update fails
get_areas¶
Get all areas.
Returns:
List of Area objects
Raises:
DMPConnectionError- If not connected
get_area¶
Get specific area by number.
Arguments:
number- Area number (1-8)
Returns:
Area object
Raises:
DMPConnectionError- If not connectedKeyError- If area not found
get_zones¶
Get all zones.
Returns:
List of Zone objects
Raises:
DMPConnectionError- If not connected
get_zone¶
Get specific zone by number.
Arguments:
number- Zone number (1-999)
Returns:
Zone object
Raises:
DMPConnectionError- If not connectedKeyError- If zone not found
get_outputs¶
Get all outputs.
Note: Outputs are created on-demand; prefer calling update_output_status() first to populate real states from the panel.
Returns:
List of Output objects
get_output¶
Get specific output by number.
Arguments:
number- Output number (1-999)
Returns:
Output object
Raises:
KeyError- If output number invalid
update_output_status¶
Fetch output status from panel (*WQ) and update known outputs.
The panel returns a stream of output entries in frames. We request the initial page for output 001, then continue with '?WQ' a few times to collect subsequent chunks.
Note: Many residential installations only use outputs 1-4.
sensor_reset¶
Send sensor reset command to the panel (!E001).
get_user_codes¶
Retrieve all user codes from the panel (decrypting entries).
get_user_profiles¶
Retrieve all user profiles from the panel.
check_code¶
async def check_code(code: str,
*,
include_pin: bool = True,
refresh_if_missing: bool = True) -> UserCode | None
Check if a user code (or PIN) exists in the panel.
Arguments:
code- The code/PIN string to validateinclude_pin- If True, also match against PIN codesrefresh_if_missing- If True, refresh cache on miss and retry once
Returns:
Matching UserCode or None if not found
attach_status_server¶
Attach a DMPStatusServer to auto-refresh user cache on Zu events.
When the server receives a User Codes (Zu) event, the panel will refresh its user cache in the background. Call detach_status_server to remove.
detach_status_server¶
Detach a previously attached DMPStatusServer.
start_keepalive¶
Start periodic keep-alive (!H) while connected.
Arguments:
interval- Seconds between keep-alive messages (default: 10)
stop_keepalive¶
Stop periodic keep-alive if running.
arm_areas¶
async def arm_areas(area_numbers: list[int] | tuple[int, ...],
bypass_faulted: bool = False,
force_arm: bool = False,
instant: bool | None = None) -> None
Arm one or more areas in a single command.
Concatenates two-digit area numbers per DMP format and sends !C{areas},{bypass}{force}.
disarm_areas¶
Disarm one or more areas in a single command: !O{areas}.
__aenter__¶
Async context manager entry.
__aexit__¶
Async context manager exit.
__repr__¶
String representation.
pydmp.cli¶
Command-line interface for PyDMP.
SectionedGroup Objects¶
Click Group that renders commands in named sections for --help.
load_config¶
Load configuration from YAML file.
Arguments:
config_path- Path to config file
Returns:
Configuration dictionary
cli¶
@click.group(
cls=SectionedGroup,
context_settings={"help_option_names": ["-h", "--help"]},
sections=[
("Panel Control", ["arm", "disarm", "sensor-reset"]),
(
"Status & Query",
[
"get-areas", "get-zones", "get-outputs", "get-users",
"get-profiles", "check-code"
],
),
("Zones", ["set-zone-bypass", "set-zone-restore"]),
("Outputs", ["set-output"]),
("Realtime", ["listen"]),
],
)
@click.version_option(__version__, "-v", "--version")
@click.option(
"--config",
"-c",
# Do not require the file to exist so commands like 'listen'
# can run without a config present (tests/CI environments).
type=click.Path(path_type=Path),
default="config.yaml",
help="Configuration file path",
)
@click.option("--quiet", "-q", is_flag=True, help="Reduce output (WARNING)")
@click.option("--debug",
"-d",
is_flag=True,
help="Enable debug logging (overrides other flags)")
@click.pass_context
def cli(ctx: click.Context, config: Path, quiet: bool, debug: bool) -> None
PyDMP - Control DMP alarm panels from command line.
arm_cmd¶
@cli.command("arm", context_settings={"help_option_names": ["-h", "--help"]})
@click.argument("areas", type=str)
@click.option("--bypass-faulted",
"-b",
is_flag=True,
help="Bypass faulted zones")
@click.option("--force-arm", "-f", is_flag=True, help="Force arm bad zones")
@click.option("-i",
"--instant/--no-instant",
default=None,
help="Remove entry/exit delays")
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def arm_cmd(ctx: click.Context, areas: str, bypass_faulted: bool,
force_arm: bool, instant: bool | None, as_json: bool) -> None
Arm one or more areas, e.g. "1,2,3".
disarm¶
@cli.command(context_settings={"help_option_names": ["-h", "--help"]})
@click.argument("area", type=int)
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def disarm(ctx: click.Context, area: int, as_json: bool) -> None
Disarm area.
set_zone_bypass¶
@cli.command("set-zone-bypass",
context_settings={"help_option_names": ["-h", "--help"]})
@click.argument("zone", type=int)
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def set_zone_bypass(ctx: click.Context, zone: int, as_json: bool) -> None
Bypass a zone.
set_zone_restore¶
@cli.command("set-zone-restore",
context_settings={"help_option_names": ["-h", "--help"]})
@click.argument("zone", type=int)
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def set_zone_restore(ctx: click.Context, zone: int, as_json: bool) -> None
Restore (un-bypass) a zone.
set_output¶
@cli.command("set-output",
context_settings={"help_option_names": ["-h", "--help"]})
@click.argument("output", type=int)
@click.argument("action", type=click.Choice(["on", "off", "pulse", "toggle"]))
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def set_output(ctx: click.Context, output: int, action: str,
as_json: bool) -> None
Control an output.
list_users¶
@cli.command("get-users",
context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def list_users(ctx: click.Context, as_json: bool) -> None
List panel user codes (decrypted).
list_profiles¶
@cli.command("get-profiles",
context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def list_profiles(ctx: click.Context, as_json: bool) -> None
List user profiles.
list_outputs¶
@cli.command("get-outputs",
context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def list_outputs(ctx: click.Context, as_json: bool) -> None
List outputs (1-4) and last-known state.
sensor_reset¶
@cli.command("sensor-reset",
context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def sensor_reset(ctx: click.Context, as_json: bool) -> None
Send sensor reset (!E001).
check_code_cmd¶
@cli.command("check-code",
context_settings={"help_option_names": ["-h", "--help"]})
@click.option(
"--code",
type=str,
prompt=True,
hide_input=True,
help="User code or PIN to check (prompted securely if not provided)",
)
@click.option(
"-p",
"--include-pin/--no-include-pin",
default=True,
show_default=True,
help="Match PIN as well as code",
)
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def check_code_cmd(ctx: click.Context, code: str, include_pin: bool,
as_json: bool) -> None
Check if a code or PIN exists in the panel.
listen¶
@cli.command("listen",
context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--host",
"-H",
default="127.0.0.1",
show_default=True,
help="Listen host")
@click.option("--port",
"-p",
default=5001,
show_default=True,
type=int,
help="Listen port")
@click.option("--duration",
"-t",
default=0,
type=int,
help="Seconds to run (0=until Ctrl+C)")
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output events as JSON (NDJSON)")
def listen(host: str, port: int, duration: int, as_json: bool) -> None
Run realtime S3 status server and print parsed events.
get_areas_cmd¶
@cli.command("get-areas",
context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def get_areas_cmd(ctx: click.Context, as_json: bool) -> None
List areas and their state.
get_zones_cmd¶
@cli.command("get-zones",
context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def get_zones_cmd(ctx: click.Context, as_json: bool) -> None
List zones and their state.
output¶
@cli.command(
"output",
context_settings={"help_option_names": ["-h", "--help"]},
hidden=True,
deprecated="Use 'set-output' instead.",
)
@click.argument("output", type=int)
@click.argument("action", type=click.Choice(["on", "off", "pulse", "toggle"]))
@click.option("--json",
"-j",
"as_json",
is_flag=True,
help="Output JSON instead of text")
@click.pass_context
def output(ctx: click.Context, output: int, action: str,
as_json: bool) -> None
Control an output (deprecated alias for 'set-output').
main¶
CLI entry point.
pydmp.const.protocol¶
Protocol-level constants for the DMP transport and framing.
pydmp.const¶
Constants for DMP protocol.
pydmp.const.strings¶
Human‑readable strings for statuses and system messages.
This module centralizes user‑facing strings to make future internationalization (i18n) straightforward. By default, it exposes English strings. A future enhancement could expose per‑locale mappings and a simple selection mechanism.
pydmp.const.commands¶
DMP protocol commands.
DMPCommand Objects¶
DMP panel commands.
GET_USER_CODES¶
Format: ?P=0000 for all, ?P=0001 for user 1
GET_USER_PROFILES¶
Format: ?U000 for all, ?U001 for profile 1
GET_AREA_STATUS¶
Format: ?WA01 for area 1, ?WA for continuation
GET_AREA_STATUS_CONT¶
Continuation (no params)
GET_OUTPUT_STATUS¶
Format: ?WQ001 for output 1, ?WQ for continuation
GET_OUTPUT_STATUS_CONT¶
Continuation (no params)
GET_ZONE_STATUS¶
Format: ?WB**Y001 for initial query
GET_ZONE_STATUS_CONT¶
Continuation (no params)
pydmp.const.events¶
DMP event types and codes.
Derived from DMP LT-1959 "SCS‑VR Reference Guide: Panel Messages". This file defines: - Event categories (Zx "Event Definition" field) - Event type codes (tXX "Event Type" field), grouped by category
Note: Some codes (e.g., AD, IN, PR) are reused across categories by the protocol. To avoid ambiguity in Python Enums, category-specific enums are provided below. The legacy DMPEvent enum remains for common codes but is not exhaustive. Prefer category enums for precise handling.
DMPEventType Objects¶
Event Definition categories (Zx).
REAL_TIME_STATUS¶
Entré/real-time status
DMPEvent Objects¶
Common event type codes (legacy/unscoped).
Prefer the category-specific enums below for full coverage and to avoid ambiguity where the same code is reused across categories.
pydmp.const.responses¶
DMP protocol response prefixes and status text maps.
Includes: - Command acknowledgments ("+"/"-") - Convenience text mapping for common status characters seen in status replies (mirrors the mapping used by hass-dmp's StatusResponse).
DMPResponse Objects¶
DMP panel response message prefixes.
pydmp.protocol¶
DMP protocol encoder and decoder.
AreaStatus Objects¶
Area status from panel.
state¶
'A','D','S' (or 'unknown')
ZoneStatus Objects¶
Zone status from panel.
state¶
'N','O','S','X','L','M' (or 'unknown')
StatusResponse Objects¶
Combined status response from panel.
OutputStatus Objects¶
Output status from panel (*WQ).
mode¶
'O','P','S','T','W','a','t'
DMPProtocol Objects¶
DMP protocol encoder/decoder.
__init__¶
Initialize protocol handler.
Arguments:
account_number- 5-digit account number (left-padded with spaces or zeros)remote_key- Remote key for authentication
encode_command¶
Encode a command for transmission to panel.
Arguments:
command- Command template (e.g., "!C{area},{bypass}{force}")**kwargs- Parameters to substitute into command template
Returns:
Encoded command as bytes
Raises:
DMPProtocolError- If command cannot be encoded
decode_response¶
def decode_response(
response: bytes
) -> str | StatusResponse | UserCodesResponse | UserProfilesResponse | OutputsResponse | None
Decode response from panel.
Arguments:
response- Raw bytes from panel
Returns:
- ACK/NAK string for command acknowledgments
- StatusResponse for status queries
- None for empty/auth responses
Raises:
DMPInvalidResponseError- If response cannot be decoded
pydmp.area¶
Area abstraction.
Area Objects¶
Represents a DMP area.
__init__¶
Initialize area.
Arguments:
panel- Parent panel instancenumber- Area number (1-8)name- Area namestate- Current area state
state¶
Get current state.
update_state¶
Update area state from status response.
Arguments:
state- New statename- Updated name (optional)
is_armed¶
Check if area is armed (any armed state).
is_disarmed¶
Check if area is disarmed.
arm¶
async def arm(bypass_faulted: bool = False,
force_arm: bool = False,
instant: bool | None = None) -> None
Arm area.
Arguments:
bypass_faulted- Bypass faulted zones (default: False)force_arm- Force arm bad zones (default: False)instant- Remove entry/exit delays (Y/N). If None, omit third flag.
Raises:
DMPAreaError- If arm fails
disarm¶
Disarm area.
Note: User code validation is typically done at the application level, not sent to the panel in the protocol.
Raises:
DMPAreaError- If disarm fails
get_state¶
Get current state from panel.
Returns:
Current area state
__repr__¶
String representation.
to_dict¶
Return a JSON-serializable representation of the area.
AreaSync Objects¶
Synchronous wrapper for Area.
__init__¶
Initialize sync area.
Arguments:
area- Async Area instancepanel_sync- Sync panel instance
number¶
Get area number.
name¶
Get area name.
state¶
Get current state.
is_armed¶
Check if area is armed.
is_disarmed¶
Check if area is disarmed.
arm_sync¶
Arm area (sync).
disarm_sync¶
Disarm area (sync).
get_state_sync¶
Get current state from panel (sync).
__repr__¶
String representation.
pydmp.transport¶
Async TCP transport to DMP panel (raw bytes I/O only).
DMPTransport Objects¶
Async TCP transport to DMP panel.
This class is responsible only for socket lifecycle, rate limiting, and sending/receiving raw bytes. No protocol encoding/decoding occurs here.
connect¶
Establish TCP connection.
disconnect¶
Close TCP connection.
send_and_receive¶
Send raw bytes and return accumulated response bytes.
pydmp.output¶
Output abstraction.
Output Objects¶
Represents a DMP output.
__init__¶
Initialize output.
Arguments:
panel- Parent panel instancenumber- Output number (1-4)name- Output namestate- Current output state
state¶
Get current state.
update_state¶
Update output state.
Arguments:
state- New statename- Updated name (optional)
is_on¶
Check if output is on.
is_off¶
Check if output is off.
formatted_number¶
Get zero-padded 3-digit output number.
set_mode¶
Set output mode.
Arguments:
mode- Output mode ('O'=Off, 'P'=Pulse, 'S'=Steady, 'M'=Momentary)
Raises:
DMPOutputError- If command fails
turn_on¶
Turn output on (steady mode).
Raises:
DMPOutputError- If command fails
turn_off¶
Turn output off.
Raises:
DMPOutputError- If command fails
pulse¶
Pulse output (momentary activation).
Raises:
DMPOutputError- If command fails
toggle¶
Toggle output state.
Raises:
DMPOutputError- If command fails
__repr__¶
String representation.
to_dict¶
Return a JSON-serializable representation of the output.
OutputSync Objects¶
Synchronous wrapper for Output.
__init__¶
Initialize sync output.
Arguments:
output- Async Output instancepanel_sync- Sync panel instance
number¶
Get output number.
name¶
Get output name.
state¶
Get current state.
is_on¶
Check if output is on.
is_off¶
Check if output is off.
turn_on_sync¶
Turn output on (sync).
turn_off_sync¶
Turn output off (sync).
pulse_sync¶
Pulse output (sync).
toggle_sync¶
Toggle output (sync).
__repr__¶
String representation.
pydmp.crypto¶
LFSR-based encryption for DMP user codes.
DMP uses a Linear Feedback Shift Register (LFSR) algorithm for encrypting user codes in certain commands. The algorithm is symmetric (encrypt = decrypt).
DMPCrypto Objects¶
LFSR encryption for DMP user codes.
__init__¶
Initialize crypto with account number and optional remote key.
Arguments:
account_number- 5-digit account number (1-99999)remote_key- Remote key for authentication (not used for Entree connections)
encrypt_string¶
Encrypt a string using LFSR algorithm.
The control string determines which positions are encrypted: - '-': Skip (no encryption) - '2': Encrypt 2-char hex value - '3': Encrypt 3-digit decimal value
Arguments:
string_to_encrypt- String to encrypt (typically user code + data)
Returns:
Encrypted string
decrypt_string¶
Decrypt a string using LFSR algorithm.
Since LFSR XOR is symmetric, decryption is identical to encryption.
Arguments:
string_to_decrypt- String to decrypt
Returns:
Decrypted string
encrypt_user_code¶
Encrypt a user code for use in disarm commands.
Arguments:
user_code- 4-6 digit user code
Returns:
Encrypted user code
pydmp.zone¶
Zone abstraction.
Zone Objects¶
Represents a DMP zone.
__init__¶
Initialize zone.
Arguments:
panel- Parent panel instancenumber- Zone number (1-999)name- Zone namestate- Current zone state
state¶
Get current state.
update_state¶
Update zone state from status response.
Arguments:
state- New statename- Updated name (optional)
is_open¶
Check if zone is open/tripped.
is_normal¶
Check if zone is normal (closed).
is_bypassed¶
Check if zone is bypassed.
has_fault¶
Check if zone has a fault.
formatted_number¶
Get zero-padded 3-digit zone number.
bypass¶
Bypass this zone.
Raises:
DMPZoneError- If bypass fails
restore¶
Restore (un-bypass) this zone.
Raises:
DMPZoneError- If restore fails
get_state¶
Get current state from panel.
Returns:
Current zone state
__repr__¶
String representation.
to_dict¶
Return a JSON-serializable representation of the zone.
ZoneSync Objects¶
Synchronous wrapper for Zone.
__init__¶
Initialize sync zone.
Arguments:
zone- Async Zone instancepanel_sync- Sync panel instance
number¶
Get zone number.
name¶
Get zone name.
state¶
Get current state.
is_open¶
Check if zone is open.
is_normal¶
Check if zone is normal.
is_bypassed¶
Check if zone is bypassed.
has_fault¶
Check if zone has fault.
formatted_number¶
Get formatted number.
bypass_sync¶
Bypass zone (sync).
restore_sync¶
Restore zone (sync).
get_state_sync¶
Get current state from panel (sync).
__repr__¶
String representation.
pydmp.status_parser¶
Helper to convert Serial 3 (S3) messages into structured, typed events.
This module maps a low-level S3Message (from status_server) to enums and fields from pydmp.const, making it easier to act on realtime events.
ParsedEvent Objects¶
Structured representation of a realtime SCS‑VR Z-message.
Fields may be None if not applicable for the message category.
code_enum¶
one of the DMP*Event enums above, when applicable
parse_s3_message¶
Convert a Serial 3 (S3) message to a structured ParsedEvent with enums.
This function does not mutate any panel state; it only interprets the incoming message. Use it inside your DMPStatusServer callbacks.
pydmp.profile¶
UserProfile Objects¶
User profile record (not encrypted).
pydmp.status_server¶
Async Serial 3 (S3) realtime status server for DMP panels.
This server listens for Serial 3 (Z-frames) pushed by the panel and invokes registered callbacks with parsed messages.
Notes:
- Configure your DMP panel to connect to this machine/port for realtime S3 status (Z-frames). Only one connection is expected.
- The server sends an ACK per message: STX + [5-byte account] + 0x06 + CR.
S3Message Objects¶
Parsed Serial 3 Z-frame.
definition¶
e.g., 'Za', 'Zq', 'Zc'
type_code¶
e.g., 'BU', 'OP', 'ON', etc.
fields¶
raw fields split on '\'
raw¶
full raw line (ASCII)
DMPStatusServer Objects¶
Async TCP server for DMP Serial 3 realtime status (Z-frames).