Skip to main content

HueBLE

HueBLE logo

PyPI Status Documentation Status Black

Python module for controlling Bluetooth Philips Hue lights.

This Python module enables you to control Philips Hue Bluetooth lights directly from your computer, without the need for a Hue bridge or ZigBee dongle. It leverages the Bleak library to interact with Bluetooth Philips Hue lights including the smart plugs.

Features

  • 💡 On/Off control
  • 🌗 Brightness control
  • 🌡️ Colour temp control
  • 🌈 XY colour control
  • ✨ Built-in effects with custom colour and speed
  • ⏱️ Custom transitions, including instant changes
  • ❔ Light state (power/brightness/temp/colour)
  • ⚙️ Light configuration (name)
  • 📊 Light metadata (manufacturer/model/zigbee address)
  • 🤜 Supports push & polling models
  • 🔌 Hue smart plug support
  • 🔂 Simple structure
  • 📜 Mediocre documentation
  • ✔️ More emojis than strictly necessary

Requirements

  • 🐍 Python 3.11+
  • 📶 Bleak 0.19.0+
  • 📶 bleak-retry-connector

Supported Operating Systems

  • 🐧 Linux (BlueZ)
    • Ubuntu Desktop (24.04)
    • Arch
    • Buildroot (HomeAssistant OS)
  • 🏢 Windows
    • Windows 10
  • 💾 Mac OSX
    • Sequoia (15.7)
  • 🛜 ESPHome (Bluetooth Proxy)
    • ESP32-C3-Super-Mini
    • ESP32-C5-N4R2

Documentation

https://hueble.readthedocs.io/en/latest/

Installation

Using PyPI

pip install HueBLE

Using Git:

pip install git+https://github.com/flip-dots/HueBLE.git

Examples

Quick start example

Example code from example.py

import asyncio
from bleak import BleakScanner
import HueBLE


async def main():

    # Address of light to connect to
    address = "F6:9B:48:A4:D2:D8"

    # Obtain the BLEDevice from bleak
    device = await BleakScanner.find_device_by_address(address)

    # Initialize the light object
    light = HueBLE.HueBleLight(device)

    # Optionally we could call connect but it will be called automatically
    # on the first request to the light. You might want to call this if
    # you want to subscribe to state changes without changing the lights state.
    # await light.connect()

    # Will automatically connect to the light and turn it off
    await light.set_power(False)

    # Wait
    await asyncio.sleep(5)

    # Turn the light back on again
    await light.set_power(True)

if __name__ == "__main__":
    asyncio.run(main())

Transitions

Power, brightness, colour temperature and colour changes can use a custom transition time.

await light.set_power(True, transition_ms=0)
await light.set_brightness(254, transition_ms=100)
await light.set_colour_temp(250, transition_ms=400)
await light.set_colour_xy(0.3, 0.4, transition_ms=200)

transition_ms=0 makes the change instant. Transition times use 100 ms steps.

Effects

HueBLE supports Hue effects such as Candle, Fireplace, Sunrise and Sunset. Effects can use a custom colour, brightness and speed.

await light.set_colour_effect(
    0.30,
    0.14,
    254,
    HueBLE.EffectType.CANDLE,
    128,
)

Effect speed ranges from 0 (slowest) to 255 (fastest).

Demo program

A more fully featured demo program can be found in examples/demo.py which demonstrates all of the implemented features.

Disclaimer

HueBLE is a software library designed to work with Philips Hue. Philips Hue is a registered trademark of Philips. This project is not affiliated with, endorsed by, or sponsored by Philips (Though I wouldn't mind being sponsored 😉). All other trademarks cited herein are the property of their respective owners.

Metadata

Release files for HueBLE 2.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HueBLE 2.4.1
File Size Uploaded Provenance Actions
hueble-2.4.1.tar.gz 30.1 kB With provenance Details for hueble-2.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for HueBLE 2.4.1
File Interpreter ABI Platform Actions
hueble-2.4.1-py3-none-any.whl Python 3 none any Details for hueble-2.4.1-py3-none-any.whl

Total release size: 57.2 kB

Release files / hueble-2.4.1.tar.gz

Download URL hueble-2.4.1.tar.gz
Size 30.1 kB
Tags Source
SHA-256 checksum
How to use checksums
77d47c274cb1de2d07bb0024324c3e833b717689ab622e536fe4d3f30b613953
BLAKE2b-256 checksum
How to use checksums
f5b378f6df2125d50b58e303130f1b714d91fbe029f7d877ff8e13787dc187f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / hueble-2.4.1-py3-none-any.whl

Download URL hueble-2.4.1-py3-none-any.whl
Size 27.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94295cbe72d55e441d3939d6379ca82c5f8d2026c4d494087cf0379f749578b2
BLAKE2b-256 checksum
How to use checksums
c79c37b1a9b1ca0a901c839df10b003cd7ee3a7a1e1d86ce17d988b8aa9dc618
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for HueBLE 2.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hueble-2.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page