Control a single light, all lights in a room or iall lights in a spaces


POST /v4/sites/{siteId}/apply
Parameters
siteId
uuid required
-
Set brigthnesss of a single logical device

This request will turn on all the lights which are attached to the targetObjectId with the brightness ratio 20 of 255.

Headers
Content-Type application/json
Accept application/json
Authorization Bearer `Your Access Token`
{
    "action": "lightSet",
    "targetObjectId": "83d4e8a9-abaa-47ef-9647-c0e4482c36c2",
    "state": { "on": true, "bri": 20 }
}
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "targetObjectId": {
      "type": "string"
    },
    "state": {
      "type": "object",
      "properties": {
        "on": {
          "type": "boolean"
        },
        "bri": {
          "type": "number"
        }
      },
      "required": [
        "on"
      ]
    }
  },
  "required": [
    "targetObjectId",
    "state"
  ]
}

Response 204

Set brigthness of all light devices in a room

This request will turn on all the lights in a room with the brightness ratio 20 of 255.

Headers
Content-Type application/json
Accept application/json
Authorization Bearer `Your Access Token`
{
    "action": "lightSet",
    "targetRoomId": "83d4e8a9-abaa-47ef-9647-c0e4482c36c2",
    "state": { "on": true, "bri": 20 }
}
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "targetRoomId": {
      "type": "string"
    },
    "state": {
      "type": "object",
      "properties": {
        "on": {
          "type": "boolean"
        },
        "bri": {
          "type": "number"
        }
      },
      "required": [
        "on"
      ]
    }
  },
  "required": [
    "targetRoomId",
    "state"
  ]
}

Response 204

Set brigthness of all light devices in a space

This request will turn on all the lights in a space with the brightness ratio 20 of 255.

Headers
Content-Type application/json
Accept application/json
Authorization Bearer `Your Access Token`
{
    "action": "lightSet",
    "targetSpaceId": "83d4e8a9-abaa-47ef-9647-c0e4482c36c2",
    "state": { "on": true, "bri": 20 }
}
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "targetSpaceId": {
      "type": "string"
    },
    "state": {
      "type": "object",
      "properties": {
        "on": {
          "type": "boolean"
        },
        "bri": {
          "type": "number"
        }
      },
      "required": [
        "on"
      ]
    }
  },
  "required": [
    "targetSpaceId",
    "state"
  ]
}

Response 204