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
LoginGuardbetween 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_failedstays 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.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 | Provenance | Actions |
|---|---|---|---|---|
| aioprotegewx-0.1.0.tar.gz | 28.8 kB | With provenance | Details for aioprotegewx-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aioprotegewx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for aioprotegewx-0.1.0-py3-none-any.whl |
Total release size: 50.3 kB
Release files / aioprotegewx-0.1.0.tar.gz
| Download URL | aioprotegewx-0.1.0.tar.gz |
|---|---|
| Size | 28.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aac5aa09eaf6c1931a3acbf4bd89a21093b26c7b798e34dbc8212966a88caf22
|
|
BLAKE2b-256 checksum How to use checksums |
0c47eb308ea627830cd8268ea9c84d47b92d5bb8e8dae3349ea6d85587801e34
|
| 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 20, 2026.
Transparency logRelease files / aioprotegewx-0.1.0-py3-none-any.whl
| Download URL | aioprotegewx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
774386709aafb233214527baf2be44a304825e84718afa76b09266c2aaa13136
|
|
BLAKE2b-256 checksum How to use checksums |
1d66004348be756b630e2172786f1ac283c14ecdf34c584e5df045914856bf29
|
| 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 20, 2026.
Transparency logSecurity for aioprotegewx 0.1.0
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.
Attestation for aioprotegewx-0.1.0.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 20, 2026.
Transparency logA 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.