Skip to main content

aioprotegewx

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 --password ...
aioprotegewx events 192.168.1.10:7377 --username homeassistant --password ...

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.1

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.1
File Size Uploaded Provenance Actions
aioprotegewx-0.1.1.tar.gz 29.2 kB With provenance Details for aioprotegewx-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 50.9 kB

Release files / aioprotegewx-0.1.1.tar.gz

Download URL aioprotegewx-0.1.1.tar.gz
Size 29.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dd3a059050d6b8f6a1d79e91a51b2d02e6fe341259ea93f2f966560afbff5f53
BLAKE2b-256 checksum
How to use checksums
39192ba9856951aae827cb79bf19d395e6abb3dec035be7fbdcfbf7259b2d7f9
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 22, 2026.

Transparency log

Release files / aioprotegewx-0.1.1-py3-none-any.whl

Download URL aioprotegewx-0.1.1-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9fdff42a45042b391c9561c52ea6c1dc13281ab84617df69973ac0ae2ded53d
BLAKE2b-256 checksum
How to use checksums
c6987a9d9a351461a20b747ac8ce48a7a0e452e88cf681e76b74d237c1ed5622
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 22, 2026.

Transparency log

Security for aioprotegewx 0.1.1

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.1.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 22, 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