Skip to main content

aioprotegewx

aioprotegewx

PyPI Checks Licence Read the write-up maller.com.au

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

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.3
File Size Uploaded Provenance Actions
aioprotegewx-0.1.3.tar.gz 279.1 kB With provenance Details for aioprotegewx-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 301.5 kB

Release files / aioprotegewx-0.1.3.tar.gz

Download URL aioprotegewx-0.1.3.tar.gz
Size 279.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f1eecbddeabdd12d68cea3ed4d9fa5d50da435753223ccccd293863bf1361240
BLAKE2b-256 checksum
How to use checksums
fa694e6ed9d344b92756c3f93802a28787c4a2500a006b6c96671be37ed2253f
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 30, 2026.

Transparency log

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

Download URL aioprotegewx-0.1.3-py3-none-any.whl
Size 22.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab83aa786243405dd1e221aaf561f82ff5963bb195ef3a6f252b959d5a6efc8b
BLAKE2b-256 checksum
How to use checksums
947f8771553e3333eb85a9af1e0a59366b92c7d77d541e7d534da0d1956bffcb
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 30, 2026.

Transparency log

Security for aioprotegewx 0.1.3

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.3.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 30, 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