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

Scene

Scenes are used to store and recall settings for a group of lights.

PreviousLightNextRoom

Last updated 1 year ago

Was this helpful?

📗

Get a scene

get

Get details of a single scene from its given {sceneId}

Authorizations
Path parameters
sceneIdstringRequired

ID of the scene.

Responses
200
Scene 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/scene/{sceneId} HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Accept: */*
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "type": "scene",
      "id": "3883f8bf-30a3-445b-ac06-b047d50599df",
      "id_v1": "/lights/8",
      "owner": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "actions": [
        {
          "type": "light",
          "id": "3883f8bf-30a3-445b-ac06-b047d50599df",
          "id_v1": "/lights/8",
          "owner": {
            "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
            "rtype": "device"
          },
          "target": {
            "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
            "rtype": "device"
          },
          "action": {
            "on": {
              "on": true
            },
            "dimming": {
              "brightness": 1
            },
            "color": {
              "xy": {
                "x": 1,
                "y": 1
              }
            },
            "color_temperature": {
              "mirek": 1
            },
            "gradient": {
              "points": [
                {
                  "xy": {
                    "x": 1,
                    "y": 1
                  }
                }
              ],
              "mode": "interpolated_palette"
            },
            "effects": {
              "effect": "prism"
            }
          }
        }
      ],
      "metadata": {
        "name": "text",
        "image": {
          "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
          "rtype": "device"
        },
        "appdata": "text"
      },
      "group": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "palette": {
        "color": [
          {
            "color": {
              "xy": {
                "x": 1,
                "y": 1
              }
            },
            "dimming": {
              "brightness": 1
            }
          }
        ],
        "dimming": [
          {
            "brightness": 1
          }
        ],
        "color_temperature": [
          {
            "color_temperature": {
              "mirek": 1
            },
            "dimming": {
              "brightness": 1
            }
          }
        ],
        "effects": [
          {
            "effect": "prism"
          }
        ]
      },
      "speed": 1,
      "auto_dynamic": true,
      "status": {
        "active": "inactive"
      }
    }
  ]
}

Delete a scene

delete

Delete a single scene from its given {sceneId}

Authorizations
Path parameters
sceneIdstringRequired

ID of the scene.

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
delete
DELETE /clip/v2/resource/scene/{sceneId} HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Accept: */*
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
      "rtype": "device"
    }
  ]
}
  • GETList scenes
  • POSTCreate a new scene
  • GETGet a scene
  • PUTUpdate a scene
  • DELETEDelete a scene

List scenes

get

List all available scenes

Authorizations
Responses
200
Scene 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/scene HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Accept: */*
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "type": "scene",
      "id": "3883f8bf-30a3-445b-ac06-b047d50599df",
      "id_v1": "/lights/8",
      "owner": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "actions": [
        {
          "type": "light",
          "id": "3883f8bf-30a3-445b-ac06-b047d50599df",
          "id_v1": "/lights/8",
          "owner": {
            "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
            "rtype": "device"
          },
          "target": {
            "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
            "rtype": "device"
          },
          "action": {
            "on": {
              "on": true
            },
            "dimming": {
              "brightness": 1
            },
            "color": {
              "xy": {
                "x": 1,
                "y": 1
              }
            },
            "color_temperature": {
              "mirek": 1
            },
            "gradient": {
              "points": [
                {
                  "xy": {
                    "x": 1,
                    "y": 1
                  }
                }
              ],
              "mode": "interpolated_palette"
            },
            "effects": {
              "effect": "prism"
            }
          }
        }
      ],
      "metadata": {
        "name": "text",
        "image": {
          "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
          "rtype": "device"
        },
        "appdata": "text"
      },
      "group": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "palette": {
        "color": [
          {
            "color": {
              "xy": {
                "x": 1,
                "y": 1
              }
            },
            "dimming": {
              "brightness": 1
            }
          }
        ],
        "dimming": [
          {
            "brightness": 1
          }
        ],
        "color_temperature": [
          {
            "color_temperature": {
              "mirek": 1
            },
            "dimming": {
              "brightness": 1
            }
          }
        ],
        "effects": [
          {
            "effect": "prism"
          }
        ]
      },
      "speed": 1,
      "auto_dynamic": true,
      "status": {
        "active": "inactive"
      }
    }
  ]
}

Create a new scene

post

Creates a new scene

Authorizations
Body
typestring · enumOptionalPossible values:
speednumber · max: 1Optional

Speed of dynamic palette for this scene

auto_dynamicbooleanOptional

Indicates whether to automatically start the scene dynamically on active recall

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
post
POST /clip/v2/resource/scene HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 790

{
  "type": "scene",
  "actions": [
    {
      "target": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "action": {
        "on": {
          "on": true
        },
        "dimming": {
          "brightness": 1
        },
        "color": {
          "xy": {
            "x": 1,
            "y": 1
          }
        },
        "color_temperature": {
          "mirek": 1
        },
        "gradient": {
          "points": [
            {
              "xy": {
                "x": 1,
                "y": 1
              }
            }
          ],
          "mode": "interpolated_palette"
        },
        "effects": {
          "effect": "prism"
        },
        "dynamics": {
          "duration": 1
        }
      }
    }
  ],
  "metadata": {
    "name": "text",
    "image": {
      "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
      "rtype": "device"
    },
    "appdata": "text"
  },
  "group": {
    "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
    "rtype": "device"
  },
  "palette": {
    "color": [
      {
        "color": {
          "xy": {
            "x": 1,
            "y": 1
          }
        },
        "dimming": {
          "brightness": 1
        }
      }
    ],
    "dimming": [
      {
        "brightness": 1
      }
    ],
    "color_temperature": [
      {
        "color_temperature": {
          "mirek": 1
        },
        "dimming": {
          "brightness": 1
        }
      }
    ],
    "effects": [
      {
        "effect": "prism"
      }
    ]
  },
  "speed": 1,
  "auto_dynamic": true
}
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
      "rtype": "device"
    }
  ]
}

Update a scene

put

Update a single scene from its given {sceneId}

Authorizations
Path parameters
sceneIdstringRequired

ID of the scene.

Body
typestring · enumOptionalPossible values:
speednumber · max: 1Optional

Speed of dynamic palette for this scene

auto_dynamicbooleanOptional

Indicates whether to automatically start the scene dynamically on active recall

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/scene/{sceneId} HTTP/1.1
Host: 192.168.1.0
hue-application-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 787

{
  "type": "scene",
  "actions": [
    {
      "target": {
        "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
        "rtype": "device"
      },
      "action": {
        "on": {
          "on": true
        },
        "dimming": {
          "brightness": 1
        },
        "color": {
          "xy": {
            "x": 1,
            "y": 1
          }
        },
        "color_temperature": {
          "mirek": 1
        },
        "gradient": {
          "points": [
            {
              "xy": {
                "x": 1,
                "y": 1
              }
            }
          ],
          "mode": "interpolated_palette"
        },
        "effects": {
          "effect": "prism"
        },
        "dynamics": {
          "duration": 1
        }
      }
    }
  ],
  "recall": {
    "action": "active",
    "duration": 1,
    "dimming": {
      "brightness": 1
    }
  },
  "metadata": {
    "name": "text",
    "image": {
      "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
      "rtype": "device"
    },
    "appdata": "text"
  },
  "palette": {
    "color": [
      {
        "color": {
          "xy": {
            "x": 1,
            "y": 1
          }
        },
        "dimming": {
          "brightness": 1
        }
      }
    ],
    "dimming": [
      {
        "brightness": 1
      }
    ],
    "color_temperature": [
      {
        "color_temperature": {
          "mirek": 1
        },
        "dimming": {
          "brightness": 1
        }
      }
    ],
    "effects": [
      {
        "effect": "prism"
      }
    ]
  },
  "speed": 1,
  "auto_dynamic": true
}
{
  "errors": [
    {
      "description": "text"
    }
  ],
  "data": [
    {
      "rid": "42edd1f5-9538-4180-9ced-2d9e07f26d0f",
      "rtype": "device"
    }
  ]
}