Philips Hue notification system with CLI and daemon
Project description
huesignal
A Philips Hue notification system with CLI and daemon support. Control Hue lights with state capture, effects, and automation templates.
60-Second Quickstart
# Install with uv (recommended)
uv pip install huesignal
# Login to your Hue bridge
huesignal auth login
# See available commands
huesignal --help
That's it! You can now use huesignal to control your Hue bridge and automate light effects.
Installation
Using uv (Recommended)
uv pip install huesignal
Or install from source:
git clone https://github.com/ThomasRohde/huesignal.git
cd huesignal
uv sync
uv run huesignal --version
Using pipx
pipx install huesignal
Using pip
pip install huesignal
Features
- CLI Commands: Easy-to-use command-line interface for controlling Hue lights
- State Capture: Save and restore light states and scenes
- Effects: Apply dynamic effects and transitions to your lights
- Automation Templates: Predefined automation samples for common scenarios
- Keyring Integration: Secure credential storage using system keyring
Library Choice
huesignal uses aiohue for bridge communication.
Why aiohue?
- Async/await support: Non-blocking I/O for responsive CLI and daemon operations
- Full v2 API coverage: Supports latest Hue Bridge API v2 endpoints
- Active maintenance: Part of Home Assistant ecosystem with regular updates
- Python native: Pure Python library with aiohttp backend
- Well-tested: Battle-tested in Home Assistant and other projects
Alternative libraries considered
- phue: Simpler API but synchronous only, not ideal for daemon usage
- requests: Too low-level for Hue-specific logic
- huepy: Older, less active maintenance
Commands
# Authentication
huesignal auth login # Login to bridge and store credentials
# Lights
huesignal lights list # List available lights
huesignal lights toggle <light> # Toggle a light on/off
# Effects
huesignal effect apply <name> # Apply a named effect
# Samples
huesignal samples generate # Generate automation template samples
Requirements
- Python 3.11+
- Philips Hue Bridge (with v2 API support)
Testing
Unit Tests
Run unit tests with:
pytest tests/
Unit tests use mocked fixtures and don't require a physical Hue bridge.
Integration Tests
Integration tests require a real Hue bridge and are opt-in via environment variables.
# Set environment variables
export HUESIGNAL_BRIDGE_IP="192.168.1.100"
export HUESIGNAL_APP_KEY="your-app-key"
# Run integration tests
pytest tests/integration/
Safety Warning: Integration tests interact with physical lights and may change their state. Always:
- Only run against bridges you control
- Have permission to modify the lights
- Ensure lights are in a safe location
- Keep the
--restorebehavior enabled (default) so lights return to original state
Integration tests are skipped if environment variables are not set, so they won't accidentally interfere with CI/CD pipelines.
Version
Check your installed version:
huesignal --version
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file huesignal-0.1.3.tar.gz.
File metadata
- Download URL: huesignal-0.1.3.tar.gz
- Upload date:
- Size: 820.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c438faf0875777f308f642bb973be743428a787a44c20352fc559c8848dff491
|
|
| MD5 |
6b16d3a3edab53b387767da044f5bef9
|
|
| BLAKE2b-256 |
2cc9f1be632c554acfb4d7bfd49416af9a6852971f353729feca657e4552cdd6
|
Provenance
The following attestation bundles were made for huesignal-0.1.3.tar.gz:
Publisher:
publish.yml on ThomasRohde/huesignal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
huesignal-0.1.3.tar.gz -
Subject digest:
c438faf0875777f308f642bb973be743428a787a44c20352fc559c8848dff491 - Sigstore transparency entry: 788383664
- Sigstore integration time:
-
Permalink:
ThomasRohde/huesignal@20bc5d4fc72a584146a8cfcca134c3b31b0249c1 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/ThomasRohde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@20bc5d4fc72a584146a8cfcca134c3b31b0249c1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file huesignal-0.1.3-py3-none-any.whl.
File metadata
- Download URL: huesignal-0.1.3-py3-none-any.whl
- Upload date:
- Size: 43.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b8bb9284418b8aa0219509b97578aee096705e79aec532019341e82c62dfd4a
|
|
| MD5 |
dde14726ffa8c0fe07affd204ccebc87
|
|
| BLAKE2b-256 |
8bd6675a30810144a6021f49417e7598c689aa7a4c3844dd18b118e7e739bbce
|
Provenance
The following attestation bundles were made for huesignal-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on ThomasRohde/huesignal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
huesignal-0.1.3-py3-none-any.whl -
Subject digest:
5b8bb9284418b8aa0219509b97578aee096705e79aec532019341e82c62dfd4a - Sigstore transparency entry: 788383666
- Sigstore integration time:
-
Permalink:
ThomasRohde/huesignal@20bc5d4fc72a584146a8cfcca134c3b31b0249c1 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/ThomasRohde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@20bc5d4fc72a584146a8cfcca134c3b31b0249c1 -
Trigger Event:
push
-
Statement type: