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): encrypt to the gate's public key + sign with your key, written to the RTDB relay — verified on real hardware.
- ✅ 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.2
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.2.tar.gz | 18.0 kB | With provenance | Details for kubegate-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kubegate-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for kubegate-0.1.2-py3-none-any.whl |
Total release size: 37.3 kB
Release files / kubegate-0.1.2.tar.gz
| Download URL | kubegate-0.1.2.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29f69dda6627c2d87589e2adf3dc7059049e574600ff2532dfdeb2a6bfa0ef1b
|
|
BLAKE2b-256 checksum How to use checksums |
000afa597dc5f1ddd234dd8ff73e5e77bec745c561866ef3dc2960d3782e7164
|
| 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 28, 2026.
Transparency logRelease files / kubegate-0.1.2-py3-none-any.whl
| Download URL | kubegate-0.1.2-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9e2102c22a4adebda74571ad2316f6ac2a9e5d167d2b5b44f4a72e2ef6e2119
|
|
BLAKE2b-256 checksum How to use checksums |
ed30b85378636553c36e8c2c32c3e3afce8c9aa2a2bba1a8cc676973513a4123
|
| 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 28, 2026.
Transparency logSecurity for kubegate 0.1.2
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 kubegate-0.1.2.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 28, 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.