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

Was this helpful?

Edit on GitHub
Export as PDF
  1. API
  2. OpenHue API

Light

These are offered by devices with lighting capabilities.

PreviousDeviceNextScene

Last updated 1 year ago

Was this helpful?

Grouped Light

These are offered by rooms, zones, and homes.

📗

List lights.

get

List all available lights.

Authorizations
Responses
200
Light Success Response
application/json
Responseall of
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
405
Method Not Allowed
application/json
406
Not Acceptable
application/json
409
Conflict
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
507
Insufficient Storage
application/json
get
GET /clip/v2/resource/light HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Accept: */*
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "type": "light",
      "id": "3883f8bf-30a3-445b-ac06-b047d50599df",
      "id_v1": "/lights/8",
      "owner": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "metadata": {
        "name": "text",
        "archetype": "classic_bulb",
        "fixed_mired": 1
      },
      "on": {
        "on": true
      },
      "dimming": {
        "brightness": 1,
        "min_dim_level": 1
      },
      "color_temperature": {
        "mirek": 1,
        "mirek_valid": true,
        "mirek_schema": {
          "mirek_minimum": 1,
          "mirek_maximum": 1
        }
      },
      "color": {
        "xy": {
          "x": 1,
          "y": 1
        },
        "gamut": {
          "red": {
            "x": 1,
            "y": 1
          },
          "green": {
            "x": 1,
            "y": 1
          },
          "blue": {
            "x": 1,
            "y": 1
          }
        },
        "gamut_type": "A"
      },
      "dynamics": {
        "status": "dynamic_palette",
        "status_values": [
          "dynamic_palette"
        ],
        "speed": 1,
        "speed_valid": true
      },
      "alert": {},
      "signaling": {
        "signal_values": [
          "no_signal"
        ],
        "estimated_end": 1,
        "colors": [
          {
            "xy": {
              "x": 1,
              "y": 1
            }
          }
        ]
      },
      "mode": "normal",
      "gradient": {
        "points": [
          {
            "xy": {
              "x": 1,
              "y": 1
            }
          }
        ],
        "mode": "interpolated_palette",
        "points_capable": 1,
        "mode_values": [
          "interpolated_palette"
        ],
        "pixel_count": 1
      },
      "effects": {
        "status": "prism",
        "status_values": [
          "prism"
        ],
        "effect": "prism",
        "effect_values": [
          "prism"
        ]
      },
      "timed_effects": {
        "effect": "sunrise",
        "effect_values": [
          "sunrise"
        ],
        "status": "sunrise",
        "status_values": [
          "sunrise"
        ],
        "duration": 1
      },
      "powerup": {
        "preset": "safety",
        "configured": true,
        "on": {
          "mode": "on",
          "on": {
            "on": true
          }
        },
        "dimming": {
          "mode": "dimming",
          "dimming": {
            "brightness": 1
          },
          "color": {
            "mode": "color_temperature",
            "color_temperature": {
              "mirek": 1,
              "color": {
                "xy": {
                  "x": 1,
                  "y": 1
                }
              }
            }
          }
        }
      }
    }
  ]
}

Get light

get

Get details of a single light from its given {lightId}.

Authorizations
Path parameters
lightIdstringRequired

ID of the light

Responses
200
Light Success Response
application/json
Responseall of
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
405
Method Not Allowed
application/json
406
Not Acceptable
application/json
409
Conflict
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
507
Insufficient Storage
application/json
get
GET /clip/v2/resource/light/{lightId} HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Accept: */*
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "type": "light",
      "id": "3883f8bf-30a3-445b-ac06-b047d50599df",
      "id_v1": "/lights/8",
      "owner": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "metadata": {
        "name": "text",
        "archetype": "classic_bulb",
        "fixed_mired": 1
      },
      "on": {
        "on": true
      },
      "dimming": {
        "brightness": 1,
        "min_dim_level": 1
      },
      "color_temperature": {
        "mirek": 1,
        "mirek_valid": true,
        "mirek_schema": {
          "mirek_minimum": 1,
          "mirek_maximum": 1
        }
      },
      "color": {
        "xy": {
          "x": 1,
          "y": 1
        },
        "gamut": {
          "red": {
            "x": 1,
            "y": 1
          },
          "green": {
            "x": 1,
            "y": 1
          },
          "blue": {
            "x": 1,
            "y": 1
          }
        },
        "gamut_type": "A"
      },
      "dynamics": {
        "status": "dynamic_palette",
        "status_values": [
          "dynamic_palette"
        ],
        "speed": 1,
        "speed_valid": true
      },
      "alert": {},
      "signaling": {
        "signal_values": [
          "no_signal"
        ],
        "estimated_end": 1,
        "colors": [
          {
            "xy": {
              "x": 1,
              "y": 1
            }
          }
        ]
      },
      "mode": "normal",
      "gradient": {
        "points": [
          {
            "xy": {
              "x": 1,
              "y": 1
            }
          }
        ],
        "mode": "interpolated_palette",
        "points_capable": 1,
        "mode_values": [
          "interpolated_palette"
        ],
        "pixel_count": 1
      },
      "effects": {
        "status": "prism",
        "status_values": [
          "prism"
        ],
        "effect": "prism",
        "effect_values": [
          "prism"
        ]
      },
      "timed_effects": {
        "effect": "sunrise",
        "effect_values": [
          "sunrise"
        ],
        "status": "sunrise",
        "status_values": [
          "sunrise"
        ],
        "duration": 1
      },
      "powerup": {
        "preset": "safety",
        "configured": true,
        "on": {
          "mode": "on",
          "on": {
            "on": true
          }
        },
        "dimming": {
          "mode": "dimming",
          "dimming": {
            "brightness": 1
          },
          "color": {
            "mode": "color_temperature",
            "color_temperature": {
              "mirek": 1,
              "color": {
                "xy": {
                  "x": 1,
                  "y": 1
                }
              }
            }
          }
        }
      }
    }
  ]
}

List grouped lights

get

List all grouped lights

Authorizations
Responses
200
Grouped Light Success Response
application/json
Responseall of
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
405
Method Not Allowed
application/json
406
Not Acceptable
application/json
409
Conflict
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
507
Insufficient Storage
application/json
get
GET /clip/v2/resource/grouped_light HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Accept: */*
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "type": "light",
      "id": "3883f8bf-30a3-445b-ac06-b047d50599df",
      "id_v1": "/lights/8",
      "owner": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "on": {
        "on": true
      },
      "dimming": {
        "brightness": 1
      },
      "alert": {
        "action_values": [
          "breathe"
        ]
      },
      "signaling": {
        "signal_values": [
          "no_signal"
        ]
      }
    }
  ]
}

Get grouped light

get

Get details of a single grouped light from its given {groupedLightId}.

Authorizations
Path parameters
groupedLightIdstringRequired

ID of the grouped light

Responses
200
Grouped Light Success Response
application/json
Responseall of
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
405
Method Not Allowed
application/json
406
Not Acceptable
application/json
409
Conflict
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
507
Insufficient Storage
application/json
get
GET /clip/v2/resource/grouped_light/{groupedLightId} HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Accept: */*
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "type": "light",
      "id": "3883f8bf-30a3-445b-ac06-b047d50599df",
      "id_v1": "/lights/8",
      "owner": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "on": {
        "on": true
      },
      "dimming": {
        "brightness": 1
      },
      "alert": {
        "action_values": [
          "breathe"
        ]
      },
      "signaling": {
        "signal_values": [
          "no_signal"
        ]
      }
    }
  ]
}
  • GETList lights.
  • GETGet light
  • PUTUpdate light
  • Grouped Light
  • GETList grouped lights
  • GETGet grouped light
  • PUTUpdate grouped light

Update light

put

Update a single light from its given {lightId}.

Authorizations
Path parameters
lightIdstringRequired

ID of the light

Body
typestringOptional

Type of the supported resources (always light here)

modestring · enumOptionalPossible values:
Responses
200
Success
application/json
Responseall of
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
405
Method Not Allowed
application/json
406
Not Acceptable
application/json
409
Conflict
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
507
Insufficient Storage
application/json
put
PUT /clip/v2/resource/light/{lightId} HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "on": {
    "on": true
  }
}
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
      "rtype": "device"
    }
  ]
}

Update grouped light

put

Update a single grouped light from its given {groupedLightId}.

Authorizations
Path parameters
groupedLightIdstringRequired

ID of the light

Body
typestring · enumOptional

Type of the supported resources (always grouped_light here)

Possible values:
Responses
200
Success
application/json
Responseall of
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
405
Method Not Allowed
application/json
406
Not Acceptable
application/json
409
Conflict
application/json
429
Too Many Requests
application/json
500
Internal Server Error
application/json
503
Service Unavailable
application/json
507
Insufficient Storage
application/json
put
PUT /clip/v2/resource/grouped_light/{groupedLightId} HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "on": {
    "on": true
  }
}
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
      "rtype": "device"
    }
  ]
}