Skip to main content

aioprotegewx

PyPI Checks Licence

Async Python client for ICT Protege WX alarm and access controllers, through the controller's own web interface.

ICT's official integration route, the Automation and Control service, needs a paid licence that many WX controllers don't have. Every WX has a web interface, and this library speaks the same encrypted protocol as its pages. If you can log in to the controller in a browser, you can use this.

It powers the ICT Protege WX integration for Home Assistant.

  • Areas: status, arm (away, stay, instant, force), disarm, silence, walk test.
  • Doors: lock state and position, lock, unlock (timed or latched).
  • Inputs and trouble inputs: open, closed, tamper, short, bypass (temporary or permanent).
  • Outputs: on, off, timed.
  • Event log pages, parsed into what happened, to what, and who did it.
  • Health values (serial number, firmware, voltages) and health troubles.
  • Both web protocol versions, detected automatically: 2.3.x (HTTP POST with a controller session cookie) and older (HTTP GET with a client session).

Python 3.12 or later. Plain HTTP only: controllers whose web interface is HTTPS-only need the Automation and Control route.

Install

pip install aioprotegewx

Use

Create an operator on the controller for your program, with only the permissions it needs. Set its session timeout to about 15 minutes.

import asyncio
import aiohttp
from aioprotegewx import ProtegeClient


async def main() -> None:
    # The controller issues its own session cookie, so give the client a jar that accepts it.
    async with aiohttp.ClientSession(cookie_jar=aiohttp.CookieJar(unsafe=True)) as session:
        client = ProtegeClient(session, "192.168.1.10:7377", "homeassistant", "password")
        try:
            areas = await client.area_status()
            for rec_id, area in areas.items():
                print(rec_id, area.state, area.in_alarm)
            await client.arm_area(16, "stay")
        finally:
            await client.close()  # logs out


asyncio.run(main())

The client logs in on first use and keeps one session. Unknown or unreadable states come back as None or unknown_<code>, never as a reassuring disarmed, locked or closed.

Being gentle with the controller

A controller whose session table filled with abandoned sessions has been seen to stall and reboot, so the client is careful:

  • One session, logged out by close().
  • Gentle reconnects. A dropped session is re-established once. If the controller refuses straight away, logins pause for 30 s, doubling up to 10 minutes, and never exceed 6 in 10 minutes. Share one LoginGuard between clients for the same controller so restarts can't get round these limits.
  • No operator lockouts. A wrong password stops all login attempts after at most two tries (auth_failed stays set).

Command line

aioprotegewx status 192.168.1.10:7377 --username homeassistant
aioprotegewx events 192.168.1.10:7377 --username homeassistant

The tool asks for the password. To run it unattended, set the PROTEGE_PASSWORD environment variable instead.

Warning: --password still works, but the password then shows in your shell history and, while the tool runs, in the process list that other users on the computer can read. Use the prompt or PROTEGE_PASSWORD instead.

Development

pip install -e ".[test,lint]"
pytest --cov=aioprotegewx
ruff check . && ruff format --check . && mypy

Releases are automatic: bump __version__ in src/aioprotegewx/__init__.py, add a CHANGELOG.md section, and push to main.

Credits and licence

Protocol work derived from protege-wx-cli by Mitchell Johnson (MIT), extended for web interface 2.3.x. MIT; see NOTICE.

Metadata

Release files for aioprotegewx 0.1.2

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

Source distribution (sdist)

Source distribution for aioprotegewx 0.1.2
File Size Uploaded Provenance Actions
aioprotegewx-0.1.2.tar.gz 30.2 kB With provenance Details for aioprotegewx-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 52.4 kB

Release files / aioprotegewx-0.1.2.tar.gz

Download URL aioprotegewx-0.1.2.tar.gz
Size 30.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cd9c50aba91a4cb9715d2eece0f64a7703a55627caaf5bb89eb86e2e553a456c
BLAKE2b-256 checksum
How to use checksums
702bac65ae40259ac592f8354a5c2179cf21b582c6fc689f6683a29254a9de12
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 / aioprotegewx-0.1.2-py3-none-any.whl

Download URL aioprotegewx-0.1.2-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcc4c0dbb5385e3e88030b7864a0e45fda293810a52b38c2b647d2aa3b86b72e
BLAKE2b-256 checksum
How to use checksums
d5522928a7d4ed97d7ac68dec1d16c6617a4c6380bebc881f1c1f33969bb0f2a
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 aioprotegewx 0.1.2

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 aioprotegewx-0.1.2.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.

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