Smart Home Device Control API
Smart Home Device Control API
0)
Download OpenAPI specification: Download
API for controlling and managing smart home devices like lights, thermostats, and cameras.
Devices
QUERY PARAMETERS
type string
Enum: "light" "thermostat" "camera" "lock" "sensor" "plug"
Filter devices by type (e.g., light, thermostat, camera)
room string
Filter devices by room name or ID
Responses
GET /devices
Response samples
200 default
Content type
application/json
PATH PARAMETERS
Responses
Response samples
Content type
application/json
PATH PARAMETERS
name string
room string
Responses
PUT /devices/{deviceId}
Request samples
Payload
Content type
application/json
Copy
{
"name": "Main Bedroom Thermostat",
"room": "Main Bedroom"
}
Response samples
Content type
application/json
DeviceControl
PATH PARAMETERS
Responses
GET /devices/{deviceId}/state
Response samples
Content type
application/json
Copy
{
"on": true
}
PATH PARAMETERS
Desired state object for the device. The schema varies by device type.
on boolean
General on/off state, if applicable.
Responses
PUT /devices/{deviceId}/state
Request samples
Payload
Content type
application/json
Example
Turn a light on
Copy
{
"deviceType": "light",
"on": true,
"brightness": 80,
"color": "#FFFF00"
}
Response samples
Content type
application/json
Copy
{
"on": true
}
Scenes
Responses
GET /scenes
Response samples
200 default
Content type
application/json
description string
actions
Array of objects (SceneAction)
required
Responses
POST /scenes
Request samples
Payload
Content type
application/json
Response samples
201 default
Content type
application/json
PATH PARAMETERS
Responses
GET /scenes/{sceneId}
Response samples
Content type
application/json
PATH PARAMETERS
name string
description string
Responses
PUT /scenes/{sceneId}
Request samples
Payload
Content type
application/json
Copy Expand all Collapse all
{
"name": "string",
"description": "string",
- "actions": [
+ { … }
]
}
Response samples
Content type
application/json
Delete a scene
AUTHORIZATIONS: bearerAuth
PATH PARAMETERS
Responses
DELETE /scenes/{sceneId}
Response samples
404 default
Content type
application/json
Copy
{
"code": 0,
"message": "string",
"details": "string"
}
Activate a scene
AUTHORIZATIONS: bearerAuth
PATH PARAMETERS
Responses
Response samples
404 default
Content type
application/json
Copy
{
"code": 0,
"message": "string",
"details": "string"
}