Skip to main content

pyadtpulse - Python interface for ADT Pulse

Python client interface to the ADT Pulse security system.

PyPi License Donate

UNSUPPORTED

This is an unsupported interface provided only as a basis for others to explore integrating their ADT system with their own tools. PLEASE FEEL FREE TO CONTRIBUTE CHANGES! Pull requests are accepted.

pyadtpulse reads the zones (motion sensors, door sensors, etc.) and alarm state of an ADT Pulse site, and arms and disarms it. Its main user is the Home Assistant ADT Pulse integration.

NOTE: Since this interacts with the unofficial ADT Pulse web portal, the behavior is subject to change by ADT without notice.

Making Contributions

Want to contribute? See the Development documentation for setup instructions.

WARNING

Do not reauthenticate to the ADT service frequently as ADT's service is not designed for high volume requests. E.g. every 5 minutes, not seconds. Keep your authenticated session to avoid logging in repeatedly.

Installation

pip install pyadtpulse

pyadtpulse needs Python 3.10 or newer.

Usage

ADT Pulse logs out other sessions that use the same account and fingerprint, so a best practice is to create a separate username/password for each client accessing ADT Pulse.

pyadtpulse uses one site (premises/location) per login. If your account has several sites, create a separate username/password for each site, with access to only that site. This ensures that clients are always interacting with that one site (and not accidentally with another site location).

Changes to the name or number of sites are not picked up by an existing client; create a new one.

Example

PyADTPulseAsync is the client to use. It logs in, keeps the session alive in the background and tells you when something changes:

import asyncio

from pyadtpulse import PyADTPulseAsync


async def main() -> None:
    adt = PyADTPulseAsync("user@example.com", "password", "my-fingerprint")
    await adt.async_login()
    try:
        site = adt.site
        print(site.name, site.alarm_control_panel.status)
        for zone in site.zones or []:
            print(zone["zone"], zone["name"], zone["state"], zone["status"])

        while True:
            alarm_changed, zone_ids = await adt.wait_for_update()
            if alarm_changed:
                print("Alarm is now", site.alarm_control_panel.status)
            for zone_id in zone_ids:
                zone = site.zones_as_dict[zone_id]
                print(zone.name, "is now", zone.state)
    finally:
        await adt.async_logout()


asyncio.run(main())
  • async_login() raises PulseMFARequiredError when ADT wants a verification code first; see Verification code (MFA) login. Other failures raise PulseAuthenticationError (wrong username or password), PulseAccountLockedError, or a connection error, all from pyadtpulse.exceptions.
  • adt.site is the site the login belongs to. site.zones is a list of dicts (zone, name, id_, tags, status, state, last_activity_timestamp); site.zones_as_dict maps zone ids to the same data as objects.
  • site.alarm_control_panel.status is one of "off", "away", "stay", "night", "arming", "disarming" or "unknown". The panel also has is_disarmed, is_away, is_home, is_armed_night, is_force_armed, is_arming and is_disarming.
  • wait_for_update() waits until ADT reports a change and returns whether the alarm state changed, plus the ids of the zones that did. It raises the error the background tasks hit, for example PulseGatewayOfflineError or PulseNotLoggedInError; call async_login() again after a PulseNotLoggedInError.
  • adt.is_connected says whether the client currently has a working session.

To arm or disarm the site:

await site.async_disarm()
await site.async_arm_home()  # "stay"
await site.async_arm_away()
await site.async_arm_night()
await site.async_arm_away(force_arm=True)  # arm even with open zones

Each returns True if ADT accepted the command.

See example-client.py for a larger example.

Verification code (MFA) login

ADT trusts a device by its fingerprint. The first login with a fingerprint ADT doesn't know makes async_login() raise PulseMFARequiredError. Finish that login with a verification code:

from pyadtpulse import PyADTPulseAsync
from pyadtpulse.exceptions import (
    PulseMFARequiredError,
    PulseNotLoggedInError,
    PulseAuthenticationError,
)


async def login(adt: PyADTPulseAsync) -> None:
    try:
        await adt.async_login()
    except PulseMFARequiredError:
        method = await adt.async_request_mfa_code()  # ADT sends the code, e.g. by email
        code = input(f"Code sent by {method}: ")
        try:
            await adt.async_complete_mfa_login(code, device_name="my-script")
        except PulseAuthenticationError:
            ...  # wrong code: ask again, or request a new code
        except PulseNotLoggedInError:
            ...  # the login failed after the code: start over with async_login()
  • async_request_mfa_code(method_id=None) asks ADT to send a code with the first verification method on the account, or with method_id (such as "EMAIL"). It returns the method used. It raises PulseAuthenticationError if ADT refuses, and PulseNotLoggedInError if no verification is pending (log in again first).
  • async_complete_mfa_login(code, device_name="pyadtpulse") checks the code and finishes the login, like async_login().
    • PulseAuthenticationError: ADT rejected the code. The verification is still pending, so you can call async_complete_mfa_login() again with the right code, or async_request_mfa_code() for a new one.
    • PulseNotLoggedInError: no verification was pending, or ADT accepted the code but the login still failed. The code is spent; start over with async_login().
  • After a correct code, pyadtpulse adds the fingerprint to the account's trusted devices under device_name (with a short suffix if the name is taken). Later logins with the same fingerprint skip the code. If ADT refuses to trust the device, the login still succeeds, a warning is logged, and the next login asks for a code again.

Fingerprint

The fingerprint argument is the device fingerprint ADT uses to recognise a trusted device. It doesn't have to come from a browser: pick a string, trust it once with the verification code flow above, then reuse the same string for every login. To make one:

from pyadtpulse.util import generate_random_fingerprint

fingerprint = generate_random_fingerprint()  # store it and reuse it

A new fingerprint means a new verification code, and adds another trusted device to the account.

Warning: ADT allows one session per account and fingerprint. If another connection logs in to the Pulse portal with the same fingerprint, the first connection is logged out. Use a fingerprint only one client uses, and don't reuse one from a browser you log in to Pulse with.

Using a browser's fingerprint

Before the verification code flow existed, the only way to get a trusted fingerprint was to trust a browser on the Pulse website and copy that browser's fingerprint. This still works if you already have one. Either:

  1. Open the fingerprint detector (source) in the browser you trusted, or
  2. Follow homebridge-adt-pulse's instructions.

A browser's fingerprint changes when the browser or OS is upgraded, and you then need to trust it again.

Options

PyADTPulseAsync(username, password, fingerprint, ...) also takes:

Argument Default Meaning
service_host "https://portal.adtpulse.com" Portal to use. Canadian accounts use "https://portal-ca.adtpulse.com" (pyadtpulse.const.API_HOST_CA).
user_agent a desktop Chrome user agent User-Agent header sent to ADT.
keepalive_interval 5 Minutes between keepalive requests that keep the session open. Must be from 1 to 15.
relogin_interval 120 Minutes between background re-logins. Each re-login happens at a random point between 75% and 100% of the interval. Must be at least 20.
detailed_debug_logging False Log more detail, such as each request and how long updates take.
debug_locks False Use locks that log who holds them, for debugging.

keepalive_interval, relogin_interval and detailed_debug_logging are also properties you can change on a running client. Setting keepalive_interval or relogin_interval to None restores the default; a value out of range raises ValueError.

adt.keepalive_interval = 10  # minutes
adt.relogin_interval = 60  # minutes
adt.site.gateway.poll_interval = 2.0  # seconds between update checks (the default)

poll_interval belongs to the site's gateway and is only available after login. When the gateway goes offline, pyadtpulse backs off from it, up to 10 minutes between checks.

Deprecated: PyADTPulse

PyADTPulse is the old synchronous client. It runs PyADTPulseAsync in a background thread and raises a DeprecationWarning when created. Use PyADTPulseAsync for new code.

See Also

Future Enhancements

Feature ideas:

  • Cameras (via Janus)

Feature ideas, but no plans to implement:

  • support OFFLINE status checking
  • support multiple sites (premises/locations) under a single ADT account
  • alarm history (/ajax/alarmHistory.jsp)

Metadata

Release files for pyadtpulse 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyadtpulse 1.3.0
File Size Uploaded Provenance Actions
pyadtpulse-1.3.0.tar.gz 46.6 kB With provenance Details for pyadtpulse-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyadtpulse 1.3.0
File Interpreter ABI Platform Actions
pyadtpulse-1.3.0-py3-none-any.whl Python 3 none any Details for pyadtpulse-1.3.0-py3-none-any.whl

Total release size: 100.6 kB

Release files / pyadtpulse-1.3.0.tar.gz

Download URL pyadtpulse-1.3.0.tar.gz
Size 46.6 kB
Tags Source
SHA-256 checksum
How to use checksums
011e36c0efc33ebe21ca43e5bcb1f9791cce8a3fb8f6876a5db6f7ee660b6f38
BLAKE2b-256 checksum
How to use checksums
fdc50ed50c7ef6f85680ff578d000c10b5401a31a3d4ec9f7bed03cb1ed27f42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / pyadtpulse-1.3.0-py3-none-any.whl

Download URL pyadtpulse-1.3.0-py3-none-any.whl
Size 54.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8f16613f29f9fee348a4ca8ec5a47c7bc8fa31e97e279e630dee7d408244e89
BLAKE2b-256 checksum
How to use checksums
f2db6eaa101196e2b45f4b98b3fbcc695c7bac8307320cea1fe1d7129e6a5dd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for pyadtpulse 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyadtpulse-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page