pyswitchbee
SwitchBee Python Integration.
What it is and what it does
pySwitchbee is a Python library that communicates with SwitchBee smart home Central Units over the network to control connected devices. It provides an async API built on aiohttp for discovering and controlling various device types—dimmers, shutters, switches, and timed power devices—by setting their state or brightness levels. The library includes both a programmatic interface and a command-line tool for querying device status and issuing commands.
The package is designed for developers building home automation integrations or scripts that need to interact with SwitchBee hardware. It handles the protocol details of communicating with the Central Unit and abstracts device types into a simple object model. However, the project is dormant (last release 2024-07-27, minimal repository activity), so it receives no active maintenance or updates.
Use it for:
- Build a home automation dashboard that queries device states and sends control commands.
- Create scheduled tasks to turn lights on/off or adjust dimmer brightness at specific times.
- Integrate devices into a larger home automation platform or orchestration system.
- Write CLI scripts to manage shutter positions or timed power switches from the command line.
- Monitor and log the state of smart home devices for analytics or troubleshooting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python library for controlling SwitchBee smart home devices over the network, supporting dimmers, shutters, switches, and timed power devices through an async API.
Yes, if you own SwitchBee hardware and need Python-based control. The library is straightforward, has low install friction, and carries no known vulnerabilities. However, be aware that maintenance is dormant—no active support or updates are expected. Suitable for personal projects or integrations where you can maintain the code yourself if needed.
Install
pyswitchbee on PyPI
pip
pip install pyswitchbeeuv
uv add pyswitchbeepoetry
poetry add pyswitchbeeInstalling pyswitchbee
Before you install
Low install friction with only two runtime dependencies (aiohttp and awesomeversion). Maintenance is dormant—last release was 2024-07-27 and the repository shows minimal activity (3 stars), so expect no active support or rapid bug fixes.
License in practice
Licensed under Apache License 2.0 (permissive), which allows commercial and private use with minimal restrictions.
Quickstart
pip install pyswitchbee
from aiohttp import ClientSession
async with ClientSession() as session:
cu = CentralUnitAPI("192.168.50.2", "user", "pass", session)
await cu.connect()
devices = await cu.devices
Requires Python 3.9 or later; SwitchBee Central Unit must be accessible on the network and credentials must be valid.
Verify before relying
- Whether the library maintains compatibility with current SwitchBee firmware versions.
- What happens if the Central Unit becomes unreachable during operation.
- Whether the CLI tool is included in the PyPI distribution.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, awesomeversion |
| Maintenance | dormant — 748 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 73,844/month — #14,923 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyswitchbee-1.8.3-py3-none-any.whl
Keywords: home, automation, switchbee, smart
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
broadlinkA Python module and CLI for discovering,…
permissive · top 15,000 on PyPI
dlipowerManages Digital Loggers web-based network power…
permissive · top 15,000 on PyPI
pyvesyncAsynchronous Python library to discover,…
permissive · top 15,000 on PyPI
pyoverkizAn asynchronous Python client for the OverKiz…
permissive · top 15,000 on PyPI
pyfibaroProvides a Python client library to interact…
permissive · top 15,000 on PyPI
pylutron-casetaA Python API for controlling Lutron Caséta…
permissive · top 15,000 on PyPI
aioqswAsync Python library for controlling QNAP QSW…
permissive · top 15,000 on PyPI
pyhiveapiA Python library for controlling Hive smart…
permissive · top 15,000 on PyPI
blinkpyA Python library for controlling and monitoring…
permissive · top 15,000 on PyPI
boschshcpyPython client library for the Bosch Smart Home…
permissive · top 15,000 on PyPI