broadlink
Python API for controlling Broadlink devices
What it is and what it does
Broadlink is a Python library for local network control of Broadlink smart home devices—universal remotes, smart plugs, switches, power strips, sensors, light bulbs, curtain motors, thermostats, and hubs. It handles device discovery, authentication, and communication via a simple API and command-line interface.
The package wraps Broadlink's proprietary local protocol, allowing you to send IR and RF codes, query device state, control power outlets, adjust light colors, and manage hub subdevices. It depends only on cryptography for secure communication. Setup typically involves discovering devices on your network, authenticating once, then issuing commands—no cloud service required.
Use it for:
- Learn and replay IR/RF remote codes for home theater or appliance control without a physical remote.
- Toggle smart plugs and power strips on and off programmatically or via CLI for automation workflows.
- Query environmental sensors (temperature, humidity) and light bulb state for monitoring or logging.
- Control smart lights by adjusting brightness, color, and power state through a unified API.
- Manage Broadlink hub subdevices (switches, outlets) with state queries and remote control commands.
- Build home automation scripts that discover and control multiple Broadlink devices on the same network.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python module and CLI for discovering, authenticating with, and controlling Broadlink smart home devices (remotes, plugs, switches, sensors, lights, and hubs) over a local network.
Yes, if you own Broadlink devices and want local network control without cloud dependency. The low install friction and permissive license make it straightforward to add to a home automation project. However, dormant maintenance (last commit 2024-08-04, no activity for over 800 days) means future compatibility with new device models or Python versions is uncertain—suitable for stable, mature device collections but risky if you plan to add new Broadlink hardware frequently.
Install
broadlink on PyPI
pip
pip install broadlinkuv
uv add broadlinkpoetry
poetry add broadlinkInstalling broadlink
Before you install
Low install friction; pure Python wheel with a single runtime dependency (cryptography). Maintenance is dormant—last commit was 2024-08-04, over 800 days after the first release, with no recent activity, though the repository remains active and has accumulated 1535 stars.
License in practice
MIT license (permissive); you may use, modify, and distribute this package freely in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install broadlink
import broadlink
devices = broadlink.discover()
if devices:
device = devices[0]
device.auth()
device.set_power(True)
Requires the device to be on the same local network and reachable via broadcast or unicast discovery; some devices may need manual AP mode setup before discovery works.
Verify before relying
- Whether dormant maintenance status poses a risk for future compatibility with newer Broadlink device firmware or Python versions.
- Exact Python version compatibility (requires_python is unspecified in the fact sheet).
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — cryptography |
| Maintenance | dormant — 849 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 95,849/month — #13,246 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: broadlink-0.19.0-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
pyswitchbeeA Python library for controlling SwitchBee…
permissive · top 15,000 on PyPI
python-kasaControl TP-Link Kasa and Tapo smart home…
copyleft · top 15,000 on PyPI
python-miioPython library and CLI tool for controlling…
copyleft · top 15,000 on PyPI
glocaltokensExtracts local authentication tokens from…
permissive · top 15,000 on PyPI
dlipowerManages Digital Loggers web-based network power…
permissive · top 15,000 on PyPI
pywemoDiscovers and controls Belkin WeMo smart home…
permissive · top 15,000 on PyPI
rflinkLibrary and command-line interface for…
permissive · top 15,000 on PyPI
wiimwiim provides a Python API to discover,…
permissive · top 15,000 on PyPI
python-ecobee-apiA Python library for communicating with Ecobee3…
permissive · top 15,000 on PyPI
wakeonlanSends wake-on-LAN magic packets to power on…
permissive · top 15,000 on PyPI