kubegate — control your KUBE gate from Python / Home Assistant
Local BLE and (soon) cloud control for gate automations built on the Key Automation KUBE WiFi/BLE module — sold under several brands:
AVO · Easy · Key Automation · Levada
Many owners don't realise their "AVO" or "Levada" gate app is the same KUBE platform underneath. If your gate uses one of these apps, this library talks to it.
This repo hosts the reusable protocol library (kubegate). The Home Assistant
integration lives in ha-kube and builds on it.
Status
- ✅ Local BLE: handshake, encrypted commands (open / close / pedestrian / light), live status — reverse-engineered and verified against real devices.
- 🚧 Cloud (remote): crypto and command format solved; the RTDB relay path is being finalised.
- 🚧 Account discovery: log in with your brand account to auto-import gates, passkeys and keys.
Install
pip install -e .
Quick start (BLE)
python -m kubegate.cli scan
python -m kubegate.cli status --addr <ADDR> --passkey 0000000000012345
python -m kubegate.cli open --addr <ADDR> --passkey 0000000000012345
import asyncio
from kubegate.ble import KubeBleDevice
async def main():
async with KubeBleDevice("<ADDR>", "0000000000012345") as gate:
await gate.action("open")
print(gate.status)
asyncio.run(main())
Protocol (short)
enckey1 = AES128_ECB(passkey, serial) # constant per device
enckey2 = AES128_ECB(passkey, nonce XOR enckey1) # per-connection XOR pad
token = (nonce XOR enckey1) XOR enckey2 # auth, written to f1170005
frames: @LLLL<body># , body = name or name={json}; whole frame XOR enckey2
action: cact={"cmd":"C30B","val":N} (N: 8 open · 4 close · 128 pedestrian · 256 light)
The passkey is a 16-digit, zero-padded number from your account/installation.
License
Apache-2.0. Not affiliated with Key Automation or any brand listed above.
Metadata
Release files for kubegate 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 |
|---|---|---|---|---|
| kubegate-0.1.0.tar.gz | 17.4 kB | Without provenance | Details for kubegate-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kubegate-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for kubegate-0.1.0-py3-none-any.whl |
Total release size: 35.8 kB
Release files / kubegate-0.1.0.tar.gz
| Download URL | kubegate-0.1.0.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e02a89a40526f6e1c59bbaa38cb3fc07003fce51863d63b243e961953431198
|
|
BLAKE2b-256 checksum How to use checksums |
f2bdf80b68aaa0bc0adf5f69f3c83b9a6a7a36f7916579593a4515c39e826640
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / kubegate-0.1.0-py3-none-any.whl
| Download URL | kubegate-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90ae7050456ac97e33f2417658e6afaaec37050f387835d80af0446b4ef8f851
|
|
BLAKE2b-256 checksum How to use checksums |
7feb2a63b513d1a87ce197543f4831c7a0b2c4f399b51ec6978b7367c4095f76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for kubegate 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.