skillfed

flux-led

A Python library to communicate with the flux_led smart bulbs

flux-led v1.2.0 82.6K downloads/30d#14,151 on PyPI167
Copyleft license LGPL-3.0-or-later Active released

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-led

uv

uv add flux-led

poetry

poetry add flux-led

Installing 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

Development Status :: 3 - AlphaEnvironment :: Other EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Home AutomationTopic :: Software Development :: Libraries :: Python Modules

Tags

wifi led bulb controlmagic home bulb librarysmart light automationrgb led controllerflux led bulbslan light discoverycolor pattern scheduling
home-automationiot-devicesled-control

More Python Modules packages