flux-led
A Python library to communicate with the flux_led smart bulbs
What it is and what it does
flux_led is a Python library for controlling Zengge-manufactured WiFi LED bulbs and controllers (Magic Home and Surp Life brands) via a reverse-engineered protocol. It provides both a command-line interface and programmatic API for discovering bulbs on a local network, turning them on/off, setting colors (by name or hex), applying preset or custom patterns, managing timers, and syncing device clocks. The library supports a range of device types from simple RGB controllers to ceiling lights and Christmas lights, with some models offering microphone-based music mode and remote administration.
The package depends on webcolors for named color support, typing_extensions for type hints, and async_timeout for asyncio operations. It is actively maintained, supports Python 3.9 and later, and carries no known security vulnerabilities. The codebase acknowledges that the protocol implementation contains magic numbers and reverse-engineered logic, but reports functional coverage of most app features.
Use it for:
- Automate home lighting by discovering and controlling multiple WiFi bulbs programmatically in a smart home system
- Build a custom dashboard or GUI application to manage Zengge LED devices without relying on the official mobile app
- Schedule lighting changes via timers (e.g., turn on red at 5:30pm on weekdays) using the library's timer API
- Integrate color-changing bulbs into music or event-driven applications using pattern and color modes
- Batch control all bulbs on a LAN (e.g., turn on/off, set color, sync clocks) via CLI or script
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Controls Magic Home and Surp Life WiFi LED bulbs and controllers via reverse-engineered network protocol, supporting color modes, patterns, timers, and device discovery on local networks.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and provides solid coverage of Magic Home/Surp Life device control. The copyleft license is standard for this use case. Install if you own compatible Zengge bulbs and want programmatic or CLI control; skip if you only use the official app or have incompatible hardware.
Install
flux-led on PyPI
pip
pip install flux-leduv
uv add flux-ledpoetry
poetry add flux-ledInstalling flux-led
Before you install
Low install friction with three lightweight runtime dependencies. Actively maintained with recent commits and a stable release history since 2017. Requires Python 3.9 or later.
License in practice
Licensed under LGPL-3.0-or-later (copyleft). You may use and modify the library freely, but any derivative works must also be distributed under a compatible copyleft license.
Quickstart
pip install flux_led
from flux_led import BulbScanner
scanner = BulbScanner()
scanner.scan()
for bulb in scanner.found_bulbs:
print(bulb)
Requires Python 3.9 or later; network access to bulbs on local LAN for discovery and control.
Verify before relying
- Exact API surface and whether all documented CLI features are available programmatically
- Whether asyncio-only features (Music Mode, remote access, device configuration) are documented in the library API
- Performance characteristics when controlling multiple bulbs simultaneously
Package facts
| License | LGPL-3.0-or-later (copyleft) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — webcolors, typing_extensions, async_timeout |
| Maintenance | actively maintained — 496 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,626/month — #14,151 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flux_led-1.2.0-py3-none-any.whl
Keywords: flux_led, smart bulbs, light
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
pywizlightA Python library and CLI tool for discovering…
permissive · top 15,000 on PyPI
wakeonlanSends wake-on-LAN magic packets to power on…
permissive · top 15,000 on PyPI
yeelightControl YeeLight WiFi RGB LED bulbs over LAN…
permissive · top 15,000 on PyPI
govee-api-laggatControls Govee LED strips and bulbs via the…
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
aiolifx-effectsProvides light effects for LIFX smart bulbs via…
permissive · top 15,000 on PyPI
aiolifxaiolifx is an asyncio-based Python library for…
permissive · top 15,000 on PyPI
python-kasaControl TP-Link Kasa and Tapo smart home…
copyleft · top 15,000 on PyPI
nmclinmcli is a Python wrapper for the…
permissive · top 15,000 on PyPI