Package: pyadtpulse
pyadtpulse - Python interface for ADT PulsePython client interface to the ADT Pulse security system.UNSUPPORTEDThis is an unsupported interface provided only as a basis for others to explore integrating
their ADT system wtih their own tools.While two or three Python clients to ADT Pulse existed, they generally only provided
arm/disarm support and none provided support for ADT Pulse when multiple sites existed
under a single account. This attempts to provide APIs to both all the zones (motion
sensors, door sensors, etc) as well as arming and disarming individual sites.NOTE: Since this interacts with the unofficial ADT Pulse AJAX web service, the
behavior is subject to change by ADT without notice.Developer NoteNOTE: This package usepre-commithooks for maintaining code quality.
Please install pre-commit and enable it for your local git copy before committing.WARNINGDo 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.Installationpip3 install pyadtpulseUsageSince ADT Pulse automatically logs out other sessions accessing the same account, a best practice is
tocreate a new username/password combination for each clientaccessing ADT Pulse.Additionally, since pyadtpulse currently does not support multiple sites (premises/locations), a
simple approach is to create a separate username/password for each site and configured such that
the username only has access to ONE site. This ensures that clients are always interacting with
that one site (and not accidentally with another site location).Notesany changes to the name/count of sites are not automatically updated for existing site objectsExamplesadt=PyADTPulse(username,password,fingerprint)forsiteinadt.sites:site.statussite.zonessite.disarm()site.arm_away()site.arm_away(force=True)Async version (preferred for new integrations):adt=PyADTPulse(username,password,fingerprint,do_login=false)awaitadt.async_login()forsiteinadt.sites:site.statussite.zonesawaitsite.async_disarm()awaitsite.async_arm_away()awaitsite.async_arm_away(force=True)The pyadtpulse object runs background tasks and refreshes its data automatically.Certain parameters can be set to control how often certain actions are run.Namely:adt.poll_interval=0.75# check for updates every 0.75 secondsadt.relogin_interval=60# relogin every 60 minutesadt.keepalive_interval=10# run keepalive (prevent logout) every 10 minutesSeeexample-client.pyfor a working example.Browser FingerprintingADT Pulse requires 2 factor authentication to log into their site. When you perform the 2 factor authentication, you will see an option to save the browser to not have to re-authenticate through it.Internally, ADT uses some Javascript code to create a browser fingerprint. This (very long) string is used to check that the browser has been saved upon subsequent logins. It is the "fingerprint" parameter required to be passed in to the PyADTPulse object constructor.Notes:The browser fingerprint will change with a browser/OS upgrade.  While it is not strictly necessary to create a separate username/password for logging in through pyadtpulse, it is recommended to do so.Warning: If another connection is made to the Pulse portal with the same fingerprint, the first connection will be logged out.  For this reason it is recommended to use a browser/machine you would not normally use to log into the Pulse web site to generate the fingerprint.There are 2 ways to determine this fingerprint:Visitthis linkusing the same browser you used to authenticate with ADT Pulse. This should determine the correct browser fingerprintFollow the instructionshereSee AlsoADT Pulse PortalHome Assistant ADT Pulse integrationadt-pulse-mqtt– MQTT integration with ADT Pulse alarm panelsFuture EnhancementsFeature ideas:2 factor authenciationCameras (via Janus)Feature ideas, but no plans to implement:support OFFLINE status checkingsupport multiple sites (premises/locations) under a single ADT account- implement lightweight status pings to check if cache needs to be invalidated (every 5 seconds) (https://portal.adtpulse.com/myhome/16.0.0-131/Ajax/SyncCheckServ?t=1568950496392)alarm history (/ajax/alarmHistory.jsp)