Skip to main content

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:

  1. Only run against bridges you control
  2. Have permission to modify the lights
  3. Ensure lights are in a safe location
  4. Keep the --restore behavior 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

huesignal-0.1.1.tar.gz (819.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

huesignal-0.1.1-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file huesignal-0.1.1.tar.gz.

File metadata

  • Download URL: huesignal-0.1.1.tar.gz
  • Upload date:
  • Size: 819.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for huesignal-0.1.1.tar.gz
Algorithm Hash digest
SHA256 61725c76425d691432d028310d3f5af9d3df3eaaf8b05b34035a13cd6f480f4f
MD5 6deaa70e3e76defef6c64486590dbc60
BLAKE2b-256 498c469e7dd96b5be11446881f647947fd0b9ec30e23cef0c2ba6ba832e9f822

See more details on using hashes here.

Provenance

The following attestation bundles were made for huesignal-0.1.1.tar.gz:

Publisher: publish.yml on ThomasRohde/huesignal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file huesignal-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: huesignal-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for huesignal-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b619fdfc80f3c55a61cab682a817f2a4c34b0e84c5945c12e433a09109c600b
MD5 5e0c5ea525c18e378dcb75723ad9f41b
BLAKE2b-256 ead593a393653a9089f608c0b84cb52ed3a114aef8abb87c0d264dfbb0f8e1cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for huesignal-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ThomasRohde/huesignal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page