aioshelly
Asynchronous library to control Shelly devices.
Decision gist · record as of 2026-08-14
Yes, if you need to control Shelly devices from Python. The library is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. The requirement for Python 3.11+ and the 'under development' status mean you should expect occasional API changes and test thoroughly in production environments.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later.
- For Gen2+ devices, you must initialize a WsServer and provide a port for WebSocket callbacks.
- Low install friction with a pure-Python wheel and seven runtime dependencies.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions.
last release 2026-07-27 (18 days) · last repo commit 2026-08-14 · 81 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 95,184 downloads/mo, #13,285 on PyPI
Alternatives
Verify before relying
import asyncio
import aiohttp
from aioshelly.rpc_device import RpcDevice, WsServer
from aioshelly.common import ConnectionOptions
async def main():
options = ConnectionOptions("192.168.1.188", "user", "pass")
ws_context = WsServer()
await ws_context.initialize(8123)
async with aiohttp.ClientSession() as session:
device = await RpcDevice.create(session, ws_context, options)
print(device.status)
asyncio.run(main())- Whether the library handles reconnection and error recovery automatically or requires application-level retry logic.
- Performance characteristics when controlling multiple devices concurrently.
- Whether Bluetooth connectivity (via bleak-retry-connector and habluetooth dependencies) is required or optional.
What it is and what it does
Aioshelly is an async Python client for Shelly smart home devices, supporting both legacy Gen1 devices (CoAP/Block protocol) and modern Gen2+ devices (RPC/WebSocket). It abstracts the underlying protocol differences so you can query device status, receive state change notifications, and issue commands through a unified interface. The library depends on aiohttp for HTTP communication, orjson for fast JSON parsing, zeroconf for device discovery, and Bluetooth-related packages for wireless connectivity.
You instantiate either a BlockDevice (Gen1) or RpcDevice (Gen2+) with connection credentials, then interact with device blocks or status objects to read values and trigger actions. The library is under active development and designed to track the official Shelly API specification.
Use it for
- Build a home automation dashboard that polls and displays real-time status from multiple Shelly devices.
- Create event-driven automations that react to Shelly device state changes via WebSocket subscriptions.
- Integrate Shelly devices into a larger Home Assistant or custom IoT platform.
- Control Shelly relays, dimmers, and switches programmatically from a Python application.
- Monitor Shelly power meters and environmental sensors for logging or alerting.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to control Shelly devices from Python.
The library is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. The requirement for Python 3.11+ and the 'under development' status mean you should expect occasional API changes and test thoroughly in production environments.
Install
aioshelly on PyPI
Before you install
Low install friction with a pure-Python wheel and seven runtime dependencies. Actively maintained with a recent release (18 days old) and steady commit history. Requires Python 3.11 or later.
Requires Python 3.11 or later. For Gen2+ devices, you must initialize a WsServer and provide a port for WebSocket callbacks.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions.
Quickstart
import asyncio
import aiohttp
from aioshelly.rpc_device import RpcDevice, WsServer
from aioshelly.common import ConnectionOptions
async def main():
options = ConnectionOptions("192.168.1.188", "user", "pass")
ws_context = WsServer()
await ws_context.initialize(8123)
async with aiohttp.ClientSession() as session:
device = await RpcDevice.create(session, ws_context, options)
print(device.status)
asyncio.run(main())
Verify before relying
- Whether the library handles reconnection and error recovery automatically or requires application-level retry logic.
- Performance characteristics when controlling multiple devices concurrently.
- Whether Bluetooth connectivity (via bleak-retry-connector and habluetooth dependencies) is required or optional.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagesaiohttpbleak-retry-connectorbluetooth-data-toolshabluetoothorjsonyarlzeroconf |
| Maintenance | Actively maintained 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 95,184 / month, #13,285 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules |
Evidence: aioshelly-13.29.0-py3-none-any.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 › “shelly device control library”
- aioshellyAsynchronous Python library for controlling Shelly smart home devices…
- pykaleidescapeAsync Python client for controlling Kaleidescape media players via…
- python-kasaControl TP-Link Kasa and Tapo smart home devices (plugs, switches,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also aiocoap · aiohue · pymiele · aioesphomeapi · aioautomower · epson-projector · aioqsw · rokuecp · devolo-home-control-api · aiohttp-fast-zlib