Async client for the Antcas Control building-automation protocol
Project description
pyantcas
Async Python client for the Antcas Control building-automation protocol (the
WebSocket protocol used by the *.my.antcas.com web client).
Used by the Antcas Home Assistant integration, but usable standalone.
import asyncio
from pyantcas import AntcasClient
async def main():
client = AntcasClient("abcd1234.my.antcas.com", 8215,
username="user", password="secret")
await client.async_start() # login, discover, open websocket
await asyncio.wait_for(client.ready.wait(), 30)
for dev in client.devices:
print(dev.device_type.value, dev.element_id, dev.name, dev.keys)
# control example (writes to real hardware!):
# await client.async_set("<element_id>", {"Switch": True})
await client.async_stop()
asyncio.run(main())
What it does
- Two-cookie auth (
login=1credentials /login=4session refresh, or atoken). - Discovery: navigation → page skeletons (
/visu/data) → element definitions (/visu/icon) →classify()into device types. - A single WebSocket: handshake, watch all elements, keep the full state map,
keepalive, reconnect,
setcommands.
Install
pip install pyantcas
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyantcas-0.1.0.tar.gz
(12.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pyantcas-0.1.0-py3-none-any.whl
(12.6 kB
view details)
File details
Details for the file pyantcas-0.1.0.tar.gz.
File metadata
- Download URL: pyantcas-0.1.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94f9cba67904da549e5dc8a051021a64f0770b501a353dd7651fbdd848bb31f6
|
|
| MD5 |
f198fd82272f5417b3e793db32a9c937
|
|
| BLAKE2b-256 |
5b1431dca190318da60b364f8ae87b96f12ea0a4e6b4d982d329401b5ccd99dd
|
File details
Details for the file pyantcas-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyantcas-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ae2f90a2f82c8c0ea9213c50327874436fe94b26cab21994b7361617b6661cf
|
|
| MD5 |
6b34886b09cdc2347ea045021975daa6
|
|
| BLAKE2b-256 |
ff5cc716375ede4e6197cbaa37386c2d8cd4cae5c50fb51ae516182b4bab56fb
|