OpenHue (Philips Hue)

Control Philips Hue lights and scenes via the OpenHue CLI. Brightness, color, temperature, rooms, and scenes.

OpenHue CLI is a Go-based command-line interface for controlling Philips Hue smart lighting systems, built by the OpenHue open-source project. It communicates directly with your Hue Bridge over the local network using the Hue API v2 (CLIP), giving you full control over lights, rooms, zones, scenes, and grouped lights — all from your terminal. The tool handles the complete lifecycle: discovery (finding your bridge on the network), authentication (one-time button press to pair), and then full control. You can turn lights on/off, set brightness (0-100), adjust color temperature (warm to cool), set specific colors (by name, hex, or XY coordinates), and activate pre-configured scenes. Room and zone support means you can control groups of lights together — 'dim the living room to 30%' affects all lights in that room. OpenHue CLI stands out for its developer-friendly design. Every command supports `--json` output for scripting, and the tool generates an OpenAPI spec from the Hue API v2, ensuring type-safe interactions. It also includes a setup wizard (`openhue setup`) that walks through bridge discovery and authentication. For OpenClaw users, this skill transforms your AI assistant into a lighting controller. 'Turn off the bedroom lights' or 'Set the office to warm white at 80%' become terminal commands. Combined with cron, you can build automated lighting schedules: dim at bedtime, brighten at sunrise, activate 'movie mode' at a specific time. Combined with CamSnap's motion detection, you can trigger lights based on movement. The Hue ecosystem is massive — over 50 million Hue bulbs sold worldwide. OpenHue CLI is the cleanest way to automate it without relying on the Hue app, Google Home, or Alexa. It works entirely locally (no cloud), which is great for privacy and reliability. Best suited for: Philips Hue owners wanting terminal/AI lighting control, smart home enthusiasts building automation workflows, developers scripting lighting scenes, anyone tired of the Hue app for basic controls.

Tags: hue, lights, smart-home, philips, iot

Category: Smart Home

Use Cases

  • AI-controlled lighting: 'Turn off the bedroom lights' via chat
  • Automated schedules: dim at bedtime, brighten at sunrise via cron
  • Movie mode: activate a scene with one command
  • Energy monitoring: check which lights are on and turn off forgotten ones
  • Motion-triggered lighting combined with camera detection
  • Ambient light adjustment based on time of day or weather

Tips

  • Run `openhue setup` first — it handles bridge discovery and authentication automatically
  • Use `openhue get lights --json` to get all light IDs and names for scripting
  • Use room names instead of individual lights: `openhue set room 'Living Room' --brightness 50`
  • Combine with OpenClaw cron for automated lighting schedules (dim at night, brighten at morning)
  • Use `--json` output for all automation workflows and pipe to jq for filtering
  • Create scenes in the Hue app first, then activate them via CLI: `openhue set scene 'Movie Night'`
  • Pair with CamSnap motion detection for motion-triggered lighting automation

Known Issues & Gotchas

  • Requires a Philips Hue Bridge on the same network — doesn't work with Bluetooth-only Hue bulbs
  • Initial setup requires physical access to press the bridge button for authentication
  • Bridge discovery uses mDNS — may not work across VLANs or complex network setups
  • Color names are limited — use hex codes or XY coordinates for precise colors
  • Scene activation requires the scene to be pre-configured in the Hue app — CLI can't create scenes
  • The Hue Bridge supports max ~50 lights — larger setups need multiple bridges
  • API rate limits: the bridge handles ~10 commands per second — don't spam in tight loops

Alternatives

  • Home Assistant
  • Philips Hue App
  • diyHue
  • HomeKit (siri/shortcuts)

Community Feedback

OpenHue CLI is a command-line interface for interacting with Philips Hue smart lighting systems. Written in Go, simple and clean.

— Reddit r/coolgithubprojects

OpenHue CLI is a command-line interface for interacting with Philips Hue smart lighting systems. This tool provides a convenient way to control your Philips Hue lights, rooms, scenes, and more.

— GitHub

OpenHue CLI provides a convenient way to control your Philips Hue lights and scenes directly from your terminal. Setup requires pressing the bridge button once.

— OpenHue Docs

Configuration Examples

Initial setup

# Install
brew install openhue/cli/openhue-cli

# Setup wizard (discovers bridge, authenticates)
openhue setup
# Press the bridge button when prompted

Basic light control

# List all lights
openhue get lights

# Turn on a light at 80% brightness
openhue set light 'Desk Lamp' --on --brightness 80

# Set warm white color temperature
openhue set light 'Bedroom' --on --color-temp 400

# Turn off all lights in a room
openhue set room 'Living Room' --off

Scene and color control

# Activate a scene
openhue set scene 'Concentrate'

# Set a specific color by hex
openhue set light 'Accent' --on --color '#FF6B35'

# JSON output for scripting
openhue get lights --json | jq '.[] | select(.on == true) | .name'

Installation

brew install openhue/cli/openhue-cli

Homepage: https://www.openhue.io/cli

Source: bundled