Hue Control
Control Phillips Hue lights from your computer. No phone or Hue Bridge required!
Setup
Install uv and run the script with uvx huec.
Factory reset the lamp, then pair it using Bluetooth.
- Linux: pair with
bluetoothctl. Then usehuec - macOS: just run the power on command once and you get a prompt to pair with the light. Pair and then after that the app can connect to your light.
Then use the cli tool to control hue light.
Make sure to pass the name of your light when controlling it.
Turn on your light with:
uvx huec --device "Hue lightstrip" power on
Usage
uvx huec --help
usage: main.py [-h] [--debug] [-d DEVICE] [--timeout TIMEOUT]
{interactive,power,color,brightness,alarms,dev} ...
Control Hue lightstrip over BLE.
positional arguments:
{interactive,power,color,brightness,alarms,dev}
interactive Start HTTP server and keep BLE connection open.
power Turn the light on or off.
color Control color and brightness
brightness Read or set brightness while preserving the current
color payload.
alarms Control alarms(routines) to turn the light on/off
automatically.
dev Developer utilities.
options:
-h, --help show this help message and exit
--debug Enable debug logging for BLE requests, responses, and
validation steps.
-d, --device DEVICE BLE device name. Default is read from
~/.config/huec.json
--timeout TIMEOUT BLE scan timeout.
Config file (~/.config/huec.json) format:
{
"default_device": "Hue lightstrip plus",
"device_addresses": {},
"device_name": "Hue lightstrip plus",
"timeout": 10.0
}
Development
I tested it on my hue lightstrip and it works. If you have another hue light and it does not work file an issue.
Metadata
Release files for huec 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| huec-0.1.7.tar.gz | 16.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| huec-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.6 kB
Release files / huec-0.1.7.tar.gz
| Download URL | huec-0.1.7.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
605c80b05c0695619e87683be4b82bdaa908fde27d1a2975bad25a2314daf4b0
|
|
BLAKE2b-256 checksum How to use checksums |
8b6494af42faba9e1ad2087b0ac2c89a1eafffcf16799ba4c8f5ae09852f2967
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / huec-0.1.7-py3-none-any.whl
| Download URL | huec-0.1.7-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4ed77821312044fbc72c83c165eb6262c4b98b0c0bd9d63bb6af8d1daa5eeb14
|
|
BLAKE2b-256 checksum How to use checksums |
15736d37cf0556a91d080b031db7ca938f081fa332c702b608076540bf53d003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for huec 0.1.7
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.