This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.5.1 instead.
Reason given by maintainers: Missing version update
Power Pet Door Python Library
A Python library for communicating with Power Pet Door WiFi-enabled pet doors made by High Tech Pet.
Disclaimer
This library is NOT authorized, endorsed, or supported by High Tech Pet Products, Inc.
This is an independent, community-developed project. No contributions, financial or otherwise, have been received from High Tech Pet. If you need official support for your Power Pet Door, please contact High Tech Pet directly.
Installation
pip install pypowerpetdoor
Requires Python 3.11-3.14. Supported platforms: Linux and macOS. The
library itself has no platform-specific code, but the simulator's plain-stdin
prompt fallback uses loop.add_reader() on stdin, which Windows'
ProactorEventLoop does not implement, and CI runs on Linux only - so
Windows is not a claimed platform.
Quick Start
The library provides two interfaces:
PowerPetDoor (Recommended)
A high-level, Pythonic interface with cached state and simple methods:
import asyncio
from powerpetdoor import PowerPetDoor
async def main():
door = PowerPetDoor("192.168.1.100")
await door.connect()
# Read state via properties
print(f"Door status: {door.status.name}")
print(f"Battery: {door.battery_percent}%")
# Control via async methods
if door.is_closed:
await door.open()
await door.set_hold_time(15)
await door.set_inside_sensor(True)
# Register callbacks
door.on_status_change(lambda s: print(f"Status: {s.name}"))
await door.disconnect()
asyncio.run(main())
See docs/door.md for complete documentation.
PowerPetDoorClient (Low-Level)
For advanced use cases requiring direct protocol access:
import asyncio
from powerpetdoor import PowerPetDoorClient, CONFIG, CMD_GET_SETTINGS
async def main():
loop = asyncio.get_running_loop()
client = PowerPetDoorClient(
host="192.168.1.100",
port=3000,
keepalive=30.0,
timeout=10.0,
reconnect=5.0,
loop=loop
)
await client.connect()
settings = await client.send_message(CONFIG, CMD_GET_SETTINGS, notify=True)
print(f"Settings: {settings}")
client.stop()
asyncio.run(main())
See docs/client.md for complete documentation.
Documentation
| Document | Description |
|---|---|
| docs/door.md | PowerPetDoor high-level interface |
| docs/client.md | PowerPetDoorClient low-level interface |
| docs/simulator.md | Door simulator for testing |
Door Simulator
The library includes a full-featured door simulator for testing without hardware:
# Run interactive simulator (also available as the ppd-simulator entry point)
python -m powerpetdoor.simulator
# Run with a test script (built-in name or file path)
python -m powerpetdoor.simulator --script basic_cycle
# Run in CI/CD (exit on completion; exit code reflects pass/fail)
python -m powerpetdoor.simulator --script full_test_suite --oneshot
See docs/simulator.md for complete documentation.
Library Structure
powerpetdoor/
├── door.py # PowerPetDoor high-level interface
├── client.py # PowerPetDoorClient low-level client
├── const.py # Protocol constants and commands
├── framing.py # Shared JSON frame scanner for the wire protocol
├── sanitize.py # Terminal-safety helper for untrusted text (shared)
├── schedule.py # Schedule utilities
├── tz_utils.py # Timezone utilities
└── simulator/ # Door simulator submodule
├── state.py # Simulator state dataclasses
├── protocol.py # Protocol handler (asyncio Protocol + command registry)
├── engine.py # DoorMotionEngine (shared door-motion state machine)
├── server.py # DoorSimulator server
├── cli.py # ppd-simulator CLI (interactive/script/daemon modes)
├── ctl.py # ppd-simulator-ctl remote-control client
├── prompt_common.py # Shared prompt_toolkit machinery (highlighting, completion)
├── commands/ # Interactive command implementations
├── scripting.py # YAML script runner
└── scripts/ # Built-in test scripts
Schedule Utilities
The library includes utilities for working with Power Pet Door schedules:
from powerpetdoor import (
compress_schedule,
validate_schedule_entry,
compute_schedule_diff,
schedule_template,
)
# Validate a schedule entry
entry = {...}
if validate_schedule_entry(entry):
print("Entry is valid")
# Compress multiple schedule entries
compressed = compress_schedule(schedule_list)
# Compute differences between schedules
to_delete, to_add = compute_schedule_diff(current, new)
Related Projects
- ha-powerpetdoor - Home Assistant integration for Power Pet Door
License
MIT License - see LICENSE file for details.
Release files for pypowerpetdoor 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypowerpetdoor-0.4.0.tar.gz | 610.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypowerpetdoor-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 827.8 kB
Release files / pypowerpetdoor-0.4.0.tar.gz
| Download URL | pypowerpetdoor-0.4.0.tar.gz |
|---|---|
| Size | 610.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0286c226f65ddd95b67fbcb54bec60fbc46a3d0af8b03a8b45671f9a067b8fcc
|
|
BLAKE2b-256 checksum How to use checksums |
eda54ae14cae24bece816c1f27df97f72a58a30c8199fa189f604efa856724f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 23, 2026.
Transparency logRelease files / pypowerpetdoor-0.4.0-py3-none-any.whl
| Download URL | pypowerpetdoor-0.4.0-py3-none-any.whl |
|---|---|
| Size | 217.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57f930868364e70fb38a6172c63f75ab9d7c91c53f02e9f5efdce3f30d620d5e
|
|
BLAKE2b-256 checksum How to use checksums |
94b5033d03b3ecbfa3ef2611db61814ca1ded3c27b56d55f95d64d5962d71930
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 23, 2026.
Transparency log