aioesphomeapi
Python API for interacting with ESPHome devices.
Decision gist · record as of 2026-08-14
Yes. Active maintenance (release within 1 day), no known vulnerabilities, permissive MIT license, and medium install friction with graceful fallback make this suitable for production ESPHome integrations. Install if you need to programmatically interact with ESPHome devices; the optional Cython extension is a nice-to-have but not required.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires ESPHome device with Native API component enabled; Python 3.11 or later.
- Medium install friction due to optional Cython extension that requires a C compiler and Python development headers; falls back to pure Python if unavailable.
- Active maintenance with release within 1 day of query.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-08-13 (1 days) · last repo commit 2026-08-14 · 195 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,050,770 downloads/mo, #4,442 on PyPI
Alternatives
Verify before relying
import aioesphomeapi
import asyncio
async def main():
api = aioesphomeapi.APIClient(
"device.local",
6053,
noise_psk="YOUR_ENCRYPTION_KEY"
)
await api.connect(login=True)
device_info = await api.device_info()
print(device_info)
asyncio.run(main())- Whether Cython extension provides measurable performance benefit for typical use cases.
- Compatibility with ESPHome versions prior to 2026.1.0 and password authentication support details.
What it is and what it does
aioesphomeapi is an async Python client for the ESPHome Native API protocol, enabling programmatic interaction with devices running ESPHome firmware. It handles connection management, encryption via the Noise protocol, and state subscription over an async event loop. The library depends on protobuf for message serialization, cryptography libraries for encryption, and zeroconf for device discovery.
Typical usage involves instantiating an APIClient with device hostname and port, establishing an encrypted connection with a pre-shared key, then querying device information or subscribing to state changes via callbacks. The package includes CLI tools for log watching and device discovery, and falls back gracefully to pure Python if the optional Cython extension cannot be built.
Use it for
- Monitor and retrieve state from ESPHome sensors, switches, and lights in a home automation system.
- Subscribe to real-time state changes and trigger actions based on device events.
- Integrate ESPHome devices with external systems like InfluxDB or custom dashboards.
- Discover ESPHome devices on the local network and query their capabilities programmatically.
- Build automation workflows that read device telemetry and send control commands asynchronously.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance (release within 1 day), no known vulnerabilities, permissive MIT license, and medium install friction with graceful fallback make this suitable for production ESPHome integrations. Install if you need to programmatically interact with ESPHome devices; the optional Cython extension is a nice-to-have but not required.
Install
aioesphomeapi on PyPI
Before you install
Medium install friction due to optional Cython extension that requires a C compiler and Python development headers; falls back to pure Python if unavailable. Active maintenance with release within 1 day of query.
Requires ESPHome device with Native API component enabled; Python 3.11 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
import aioesphomeapi
import asyncio
async def main():
api = aioesphomeapi.APIClient(
"device.local",
6053,
noise_psk="YOUR_ENCRYPTION_KEY"
)
await api.connect(login=True)
device_info = await api.device_info()
print(device_info)
asyncio.run(main())
Verify before relying
- Whether Cython extension provides measurable performance benefit for typical use cases.
- Compatibility with ESPHome versions prior to 2026.1.0 and password authentication support details.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 9 packagesaiohappyeyeballsasync-interruptprotobuftzdatatzlocalzeroconfchacha20poly1305-reuseablecryptographynoiseprotocol |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,050,770 / month, #4,442 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: aioesphomeapi-45.10.2-cp311-cp311-macosx_10_9_x86_64.whl; aioesphomeapi-45.10.2-cp311-cp311-macosx_11_0_arm64.whl; aioesphomeapi-45.10.2-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl; aioesphomeapi-45.10.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; aioesphomeapi-45.10.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; aioesphomeapi-45.10.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; aioesphomeapi-45.10.2-cp311-cp311-musllinux_1_2_aarch64.whl; aioesphomeapi-45.10.2-cp311-cp311-musllinux_1_2_armv7l.whl; aioesphomeapi-45.10.2-cp311-cp311-musllinux_1_2_i686.whl; aioesphomeapi-45.10.2-cp311-cp311-musllinux_1_2_x86_64.whl; aioesphomeapi-45.10.2-cp311-cp311-win32.whl; aioesphomeapi-45.10.2-cp311-cp311-win_amd64.whl; aioesphomeapi-45.10.2-cp312-cp312-macosx_10_13_x86_64.whl; aioesphomeapi-45.10.2-cp312-cp312-macosx_11_0_arm64.whl; aioesphomeapi-45.10.2-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl; aioesphomeapi-45.10.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; aioesphomeapi-45.10.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; aioesphomeapi-45.10.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; aioesphomeapi-45.10.2-cp312-cp312-musllinux_1_2_aarch64.whl; aioesphomeapi-45.10.2-cp312-cp312-musllinux_1_2_armv7l.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “esphome device communication”
- aioesphomeapiAsync Python client library for communicating with ESPHome devices…
- serialxSerialx provides synchronous and native asynchronous APIs for serial…
- esphomeESPHome configures and controls microcontrollers through YAML…
Give your agent the search over MCP, or paste the wish link into any chat.
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.
See also serialx · aioshelly · esphome · aioflo · esphome-device-builder · bleak-esphome · rokuecp · aiounifi · wiim