OpenHue
GitHubHue Developer Portal
  • OpenHue
  • 📗API
    • OpenHue API
      • Authentication
      • Resource
      • Bridge
      • Home
      • Device
      • Light
      • Scene
      • Room
      • Zone
      • Sensors
  • 💻CLI
    • OpenHue CLI
    • Installation
    • Setup
    • Commands
      • Lights
      • Rooms
      • Scenes
Powered by GitBook
On this page
  • Get Lights
  • Usage
  • Flags
  • Examples
  • Set Lights
  • Usage
  • Flags
  • Examples
  • Available Colors

Was this helpful?

Edit on GitHub
Export as PDF
  1. CLI
  2. Commands

Lights

Display and control the lights.

Get Lights

Display one or many lights.

Usage

openhue get light [lightId|lightName] [flags]

Aliases: light, lights

Flags

Name
Shorthand
Default
Usage

room

r

Filter lights by room (name or ID).

json

j

false

Format output as JSON

Examples

# List all lights as a table
openhue get lights

# List all lights as JSON
openhue get lights --json

# Get details for a single light in JSON format
openhue get light aa31ba26-98a7-4830-8ae9-1b7caa8b5700 --json

# Get light by name
openhue get light "Hue Go"

# List all lights for a specific room
openhue get light --room "Living Room"

Set Lights

Control one or many lights

Usage

openhue set light [lightId|lightName] [flags]

Aliases: light, lights

Flags

Name
Shorthand
Default
Usage

on

false

Turn on the light(s)

off

false

Turn off the light(s)

brightness

b

Set the brightness [min=0, max=100]

color

c

rgb

RGB hexadecimal value (example #CCE5FF)

cie-x

x

X coordinate in the CIE color space

cie-y

y

Y coordinate in the CIE color space

temperature

t

Color temperature in Mirek [min=153, max=500]

room

r

Force the room of the light(s) in case multiple lights have the same name but belong to different rooms

Examples

# Turn on a light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on

# Turn on multiple lights, using ID or name
openhue set light 83111103-a3eb-40c5-b22a-02deedd21fcb "Hue Play TV" --on

# Turn off a light identified by name in a specific room
openhue set light --room "Living Room" "Hue Play Right" --off

# Set brightness of a single light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on --brightness 42.65

# Set color (in RGB) of a single light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on --rgb #3399FF

# Set color (in CIE space) of a single light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on -x 0.675 -y 0.322

# Set color (by name) of a single light
openhue set light 15f51223-1e83-4e48-9158-0c20dbd5734e --on --color powder_blue

# Set color temperature (in Mirek) of a single light
openhue set light MyLight --on -t 250

Available Colors

  • alice_blue

  • antique_white

  • aqua

  • aqua_marine

  • azure

  • beige

  • bisque

  • blanched_almond

  • blue

  • blue_violet

  • brown

  • burly_wood

  • cadet_blue

  • chartreuse

  • chocolate

  • coral

  • corn_flower_blue

  • corn_silk

  • crimson

  • cyan

  • dark_blue

  • dark_cyan

  • dark_golden_rod

  • dark_gray

  • dark_green

  • dark_khaki

  • dark_magenta

  • dark_olive_green

  • dark_orange

  • dark_orchid

  • dark_red

  • dark_salmon

  • dark_sea_green

  • dark_slate_blue

  • dark_slate_gray

  • dark_turquoise

  • dark_violet

  • deep_pink

  • deep_sky_blue

  • dim_gray

  • dodger_blue

  • firebrick

  • floral_white

  • forest_green

  • fuchsia

  • gainsboro

  • ghost_white

  • gold

  • golden_rod

  • gray

  • green

  • green_yellow

  • honeydew

  • hot_pink

  • indian_red

  • indigo

  • ivory

  • khaki

  • lavender

  • lavender_blush

  • lawn_green

  • lemon_chiffon

  • light_blue

  • light_coral

  • light_cyan

  • light_gray

  • light_green

  • light_pink

  • light_salmon

  • light_sea_green

  • light_sky_blue

  • light_slate_gray

  • light_steel_blue

  • light_yellow

  • lime

  • lime_green

  • linen

  • magenta

  • maroon

  • medium_aqua_marine

  • medium_blue

  • medium_orchid

  • medium_purple

  • medium_sea_green

  • medium_slate_blue

  • medium_spring_green

  • medium_turquoise

  • medium_violet_red

  • midnight_blue

  • mint_cream

  • misty_rose

  • moccasin

  • navajo_white

  • navy

  • old_lace

  • olive

  • olive_drab

  • orange

  • orange_red

  • orchid

  • pale_golden_rod

  • pale_green

  • pale_turquoise

  • pale_violet_red

  • papaya_whip

  • peach_puff

  • peru

  • pink

  • plum

  • powder_blue

  • purple

  • red

  • rosy_brown

  • royal_blue

  • saddle_brown

  • salmon

  • sandy_brown

  • sea_green

  • sea_shell

  • sienna

  • silver

  • sky_blue

  • slate_blue

  • slate_gray

  • snow

  • spring_green

  • steel_blue

  • tan

  • teal

  • thistle

  • tomato

  • turquoise

  • violet

  • wheat

  • white

  • white_smoke

  • yellow

  • yellow_green

PreviousCommandsNextRooms

Last updated 1 year ago

Was this helpful?

Color name. See

💻
Available Colors