Last Updated on : 2023-05-22 06:38:12download
Request method | API | Description |
---|---|---|
GET | /v1.1/homes/{home_id}/scenes | Query the list of scenes in the home |
GET | /v1.0/scenes/default-pictures | Query the list of default scene pictures |
POST | /v1.0/homes/{home_id}/scenes/{scene_id}/trigger | Trigger a scene |
POST | /v1.0/homes/{home_id}/scenes | Add a scene |
DELETE | /v1.0/homes/{home_id}/scenes/{scene_id} | Delete a scene |
PUT | /v1.0/homes/{home_id}/scenes/{scene_id} | Modify a scene |
GET | /v1.0/homes/{home_id}/scene/devices | Query the list of devices that support the scene in the home |
POST | /v1.0/devices/{device_id}/scenes/{scene_id} | Bind a scene |
DELETE | /v1.0/devices/{device_id}/scenes/{scene_id} | Unbind a scene |
GET | /v1.0/devices/{device_id}/scenes | Query the list of scenes bound to the device |
POST | /v1.0/homes/{home_id}/automations | Add an automation |
PUT | /v1.0/homes/{home_id}/automations/{automation_id} | Modify an automation |
DELETE | /v1.0/homes/{home_id}/automations/{automation_id} | Delete an automation |
GET | /v1.1/homes/{home_id}/automations | Query the automation list |
GET | /v1.0/homes/{home_id}/automations/{automation_id} | Query an automation in the home |
POST | /v1.0/homes/{home_id}/automations /{automation_id}/conditions/trigger |
An external condition that triggers an automation in the home |
GET | /v1.0/homes/{home_id}/automation/devices | Query the list of devices that support automation in the home |
GET | /v1.0/homes/automation/weather/conditions | Query weather conditions supported by automation |
GET | /v1.0/homes/{home_id}/enable-linkage/codes | Query the list of supported actions in the home |
GET | /v1.0/devices/{device_id}/enable-linkage/codes | Get the linkage conditions supported by the device |
PUT | /v1.0/homes/{home_id}/automations /{automation_id}/actions/enable |
Enable an automation |
PUT | /v1.0/homes/{home_id}/automations /{automation_id}/actions/disable |
Disable an automation |
Query the list of scenes in the home.
GET /v1.1/homes/{home_id}/scenes
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | Home ID | Yes |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | Object | The returned result. |
Result
Parameter name | Type | Description |
---|---|---|
scene_id | String | Scene ID |
name | String | Scene name |
background | String | Background picture |
enabled | Boolean | Whether to enable |
status | String | The status. 1 : valid, 2 : invalid |
actions | List | Action list |
Actions
Parameter name | Type | Description |
---|---|---|
entity_id | String | Device ID. |
executor_property | JSON | Action parameters. |
action_executor | String | Action category. Currently, only dpIssue is available. |
GET /v1.1/homes/5270711/scenes
{
"success":true,
"t":1541071460239,
"result":[
{
"scene_id":"53IYSXI3gEn2w3Oc",
"enabled": true,
"status": "1",
"name":"Enable the bulb light",
"background":"https://images.tuyacn.com/smart/rule/cover/starry.png",
"actions":[
{
"entity_id":"0120090568c63a89cb34",
"executor_property":{
"work_mode":"scene_2"
},
"action_executor":"dpIssue"
}
]
},
{
"scene_id":"DKgx28KbdPfzEpvA",
"name":"Morning",
"background":"https://images.tuyacn.com/smart/rule/cover/sport2.png",
"actions":[
{
"entity_id":"012000715ccf7f4fb8b5",
"executor_property":{
"switch_led":true
},
"action_executor":"dpIssue"
}
]
}
]
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
Query the list of default scene pictures.
GET /v1.0/scenes/default-pictures
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | List | Return the list of scene picture addresses. |
GET /v1.0/scenes/default-pictures
{
"success":true,
"t":1541071460239,
"result":[
"https://images.tuyacn.com/smart/rule/cover/starry.png",
"https://images.tuyacn.com/smart/rule/cover/sport.png"
]
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
Trigger a scene.
POST /v1.0/homes/{home_id}/scenes/{scene_id}/trigger
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | Home ID | Yes |
scene_id | String | URI | Scene ID | Yes |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | Object | Whether the scene is triggered successfully. true is returned if the request succeeds. |
POST /v1.0/homes/242****/scenes/53IYSXI3gEn2w3Oc/trigger
{
"success": true,
"t": 1541072348540,
"result": true
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
Delete a scene in the home.
DELETE /v1.0/homes/{home_id}/scenes/{scene_id}
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | Home ID | Yes |
scene_id | String | URI | Scene ID | Yes |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | Object | Whether the scene is deleted successfully. true is returned if the request succeeds. |
DELETE /v1.0/homes/242****/scenes/53IYSXI3gEn2w3Oc
{
"success": true,
"t": 1541072348540,
"result": true
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
Add a scene in a home.
POST /v1.0/homes/{home_id}/scenes
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | String | URI | Home ID | Yes |
name | String | Body | Scene name | Yes |
background | String | Body | Background picture | Yes |
actions | List | Body | Action list | Yes |
Description of Action
Parameter name | Type | Description | Required |
---|---|---|---|
entity_id | String | Target ID | Yes |
executor_property | JSON | Action parameters | No |
action_executor | String | Action type | Yes |
Action instruction
Device action
Delay action
Disable automation
Enable automation
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | Object | Scene ID. |
POST /v1.0/homes/242****/scenes
{
"name":"Add a scene for test",
"background":"https://images.****.com/smart/rule/cover/sport.png",
"actions":[
{
"executor_property":{
"hours":"0",
"minutes": "0",
"seconds": "5"
},
"action_executor":"delay"
},
{
"executor_property":{
"work_mode":"scene_2"
},
"action_executor":"dpIssue",
"entity_id":"0120090568c63a8****"
},
{
"action_executor": "ruleDisable",
"entity_id": "AYJV2hh3eqm3****"
},
{
"action_executor": "ruleEnable",
"entity_id": "AYJV2hh3eqm3****"
}
]
}
{
"success": true,
"t": 1541072348540,
"result":"53IYSXI3gEn2w3Oc"
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
Modify a scene in the home.
PUT /v1.0/homes/{home_id}/scenes/{scene_id}
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | Home ID | Yes |
scene_id | String | Body | Scene ID | Yes |
name | String | Body | Scene name | Yes |
background | String | Body | Background picture | Yes |
actions | List | Body | Action list | Yes |
Description of devices in Action
Parameter name | Type | Description | Required |
---|---|---|---|
entity_id | String | Device ID. | Yes |
executor_property | JSON | Action parameters. | Yes |
action_executor | String | Action category, for example, dpIssue . |
Yes |
Description of delay in Action
Parameter name | Type | Description | Required |
---|---|---|---|
executor_property | JSON | Action parameters. | Yes |
action_executor | String | Action category, for example, delay . |
Yes |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | Object | true is returned if the request succeeds. |
PUT /v1.0/homes/242****/scenes/53IYSXI3gEn2****
{
"name":"Add a scene for test",
"background":"https://images.tuyacn.com/smart/rule/cover/sport.png",
"actions":[
{
"executor_property":{
"hours":"0",
"minutes":"0",
"seconds":"5"
},
"action_executor":"delay"
},
{
"executor_property":{
"work_mode":"scene_2"
},
"action_executor":"dpIssue",
"entity_id":"0120090568c63a89****"
}
]
}
{
"success": true,
"t": 1541072348540,
"result": true
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
Query the list of devices that support the scene in the home.
GET /v1.0/homes/{home_id}/scene/devices
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | The user’s home ID | Yes |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | List | The returned result. |
Result
Parameter name | Type | Description |
---|---|---|
device_id | String | Device ID |
uuid | String | Universally unique identifier of the device |
name | String | Name |
home_id | String | Home ID |
product_id | String | Product ID |
GET /v1.0/homes/2422121/scene/devices
{
"result":[
{
"id":"vedo123****",
"uuid":"asdfghnbvcx****",
"name":"Test device",
"product_id":"r4567543****",
"home_id":"242****"
}
],
"success":true,
"t":1572936751228
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
The API mainly applies to scene switches. Scene switches have switch buttons, and each switch button has corresponding instructions. Through this API, the specified switch instruction can be bound to the scene, that is, the scene switch can be associated with the scene. After the binding is successful, the scene can be directly triggered through the instruction-sending API.
POST /v1.0/devices/{device_id}/scenes/{scene_id}
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
scene_id | String | URI | Scene ID | Yes |
device_id | String | URI | Device ID | Yes |
code | String | Body | Code of standard instructions | Yes |
value | String | BODY | Input parameter range of the instruction | Yes |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | Long | Room ID, room_id . |
Result
Parameter name | Type | Description |
---|---|---|
Success | Boolean | Whether the execution succeeded or failed |
POST /v1.0/devices/vdevo1575XXXX00013095/scenes/EqFkQ79XXXXXtjlkTm
{
"code":"scene_1",
"value":"scene"
}
{
"result": {
"success": true
},
"success": true,
"t": 1575972372805
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
The API mainly applies to scene switches. After a switch of the scene switch is bound to a specified scene, it can be unbound through this API.
DELETE /v1.0/devices/{device_id}/scenes/{scene_id}
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
device_id | String | URI | Device ID | Yes |
scene_id | String | URI | Scene ID | Yes |
code | String | BODY | Code of standard instruction. The value corresponds to the scene switch button one by one. | Yes |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | Long | Room ID, room_id . |
Result
Parameter name | Type | Description |
---|---|---|
Success | Boolean | Whether the execution succeeded or failed |
DELETE /v1.0/devices/vdevo1575XXXX00013095/scenes/EqFkQ79XXXXXtjlkTm
{
"code":"scene_1"
}
{
"result": {
"success": true
},
"success": true,
"t": 1575972372805
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
The API mainly applies to scene switches. Through the scene switch ID, query the list of the scenes associated with the device.
GET /v1.0/devices/{device_id}/scenes
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
device_id | String | URI | Device ID | Yes |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
result | Long | Room ID, room_id . |
Result
Parameter name | Type | Description |
---|---|---|
device_id | Boolean | Device ID |
scenes | Object | List of bound scenes |
Scenes
Parameter name | Type | Description |
---|---|---|
scene_id | String | Scene ID. |
name | String | Scene name. |
code | String | Binding instruction. The scene switch. One switch corresponds to one standard instruction. |
value | Object | Input parameter range of the instruction. |
GET /v1.0/devices/vdevo15758XXXX13095/scenes
{
"result": {
"device_id": "vdevo15758XXXX13095",
"scenes": [
{
"code": "scene_2",
"name": "Add scene G test—turn off the lights",
"scene_id": "ilCZllmbXXXPOY36",
"value": "scene"
},
{
"code": "scene_1",
"name": "Scene with bulb lights on",
"scene_id": "EqFkQ79uXXXjlkTm",
"value": "scene"
}
]
},
"success": true,
"t": 1576036860284
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
1106 | Invalid permission |
Add automation to the home.
POST /v1.0/homes/{home_id}/automations
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | The user’s home ID. | Yes |
name | String | Body | The name of the automation. | Yes |
background | String | Body | Background picture. | Yes |
conditions | List | Body | A list of conditions. | Yes |
actions | List | Body | Action list. | Yes |
match_type | Integer | Body | Match types:
|
Yes |
condition_rule | String | String | Custom condition rules. When the match type is match_type=3 , this parameter is required. The custom condition rules follow the AND/OR formula. Each automation condition uses its order_num as the identification code. |
No |
preconditions | List | Body | Precondition, with the highest priority. | No |
Note: For example, the
order_num
incondition_rule
is 1, 2, and 3 in sequence. The service scene is as follows: the automation is triggered when conditions 1 and 2 are met at the same time, or condition 3 is met. Therefore, the expression is:1&&2||3
.
Conditions
Parameter name | Type | Description | Required |
---|---|---|---|
entity_type | Integer | Condition type. Currently, the following types are available:
|
Yes |
display | JSON | Display of conditions. | Yes |
order_num | Integer | Conditional sorting, starting from 1. | Yes |
entity_id | String | Action entities .
|
No |
Display device status conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The statusCode of the device. |
Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | String | Code value. | Yes |
Display external conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | Key of external conditions. | Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | Object | Code value corresponding to the key of the external condition. | Yes |
Display weather conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The key corresponding to weather conditions, such as temperature temp . |
Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | String | Code value corresponding to the key of the weather condition. | Yes |
Display timing conditions
Parameter name | Type | Description | Required |
---|---|---|---|
date | String | The trigger date in the format of yyyyMMdd , for example, 20191125 . |
Yes |
loops | String | A 7-digit number consisting of 0 and 1. 0 means not to execute, and 1 means to execute. The first digit represents Sunday, and the following digits represent Monday to Saturday in turn. For example, 0011000 means to execute every Tuesday and Wednesday. |
Yes |
time | String | The trigger time in 24-hour clock, for example, 14:00 . |
Yes |
timezone_id | String | The ID of the time zone, for example, Asia/Shanghai . |
Yes |
Description of preconditions
Predefined restrictions. Currently, it supports restrictions by time frame.
Parameter name | Type | Description | Required |
---|---|---|---|
cond_type | String | Currently, it only supports restrictions by time frame, which is fixed as timeCheck . |
Yes |
display | JSON | Display of conditions. | Yes |
Description of display in preconditions
Parameter name | Type | Description | Required |
---|---|---|---|
start | String | The start time in 24-hour clock. The default value is a certain time of the day. For example, 10:00 . |
Yes |
end | String | The end time in 24-hour clock. For example, 22:00 . |
Yes |
loops | String | A 7-digit number consisting of 0 and 1. 0 means not to execute, and 1 means to execute. The first digit represents Sunday, and the following digits represent Monday to Saturday in turn. For example, 0011000 means to execute every Tuesday and Wednesday. |
Yes |
timezone_id | String | The ID of the time zone, for example, Asia/Shanghai . |
Yes |
Description of Action
Parameter name | Type | Description | Required |
---|---|---|---|
entity_id | String | Target ID | Yes |
executor_property | JSON | Action parameters | No |
action_executor | String | Action type | Yes |
Action instruction
Device action
Disable automation
Enable automation
Trigger scene
POST /v1.0/homes/242****/automations
{
"conditions":[
{
"display":{
"code":"switch_1",
"operator":"==",
"value":true
},
"entity_id":"vdevo157259825422309",
"entity_type":1,
"order_num":1
}
],
"actions":[
{
"action_executor":"delay",
"executor_property":{
"hours": "0",
"minutes": "0",
"seconds": "5"
}
},
{
"action_executor":"dpIssue",
"entity_id":"vdevo157259825422309",
"executor_property":{
"switch_1": true
}
}
],
"background":"https://images.tuyacn.com/smart/rule/cover/bedroom.png",
"match_type":1,
"name":"Test the automation"
}
Example of preconditions
{
"preconditions":[
{
"display":{
"start":"10:00",
"end":"12:00",
"loops":"0010000",
"timezone_id":"Asia/Shanghai"
},
"cond_type":"timeCheck"
}
]
}
Example of device status conditions
{
"conditions":[
{
"display":{
"code":"switch_1",
"operator":"==",
"value":true
},
"entity_id":"vdevo157259825422309",
"entity_type":1,
"order_num":1
}
]
}
Example of external conditions
{
"conditions":[
{
"display":{
"code":"test",
"operator":"==",
"value":"test"
},
"entity_type":15,
"order_num":1
}
]
}
Example of weather conditions
{
"conditions":[
{
"display":{
"code":"temp",
"operator":"==",
"value":"20"
},
"entity_id":"10",
"entity_type":3,
"order_num":1
}
]
}
Example of timing conditions
{
"conditions":[
{
"display":{
"date":"20200301",
"loops":"0000000",
"time":"14:00",
"timezone_id":"Asia/Shanghai"
},
"entity_id":"timer",
"entity_type":6,
"order_num":1
}
]
}
Example of external actions
{
"actions":[
{
"action_executor":"externalAction",
"executor_property":{
//Custom. It will be pushed through the message queue.
}
}
]
}
Code data type and operator mapping description
type | operator |
---|---|
Boolean | “==” |
Integer | “>”,“==”,“<” |
Enum | “==” |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | String | Automation ID. |
{
"success": true,
"t": 1541072348540,
"result":"53IYSXI3gEn2w3Oc"
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
Modify the home automation configuration.
PUT /v1.0/homes/{home_id}/automations/{automation_id}
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | The user’s home ID | Yes |
automation_id | String | URI | Automation ID. | Yes |
name | String | Body | The name of the automation. | Yes |
background | String | Body | Background picture. | Yes |
conditions | List | Body | A list of conditions. | Yes |
actions | List | Body | Action list. | Yes |
match_type | Integer | Body | Match types:
|
Yes |
condition_rule | String | String | Custom condition rules. When the match type is match_type=3 , this parameter is required. The custom condition rules follow the AND/OR formula. Each automation condition uses its order_num as the identification code. |
No |
preconditions | List | Body | Precondition, with the highest priority. | No |
Note: For example, the
order_num
incondition_rule
is 1, 2, and 3 in sequence. The service scene is as follows: the automation is triggered when conditions 1 and 2 are met at the same time, or condition 3 is met. Therefore, the expression is:1&&2||3
.
Conditions
Parameter name | Type | Description | Required |
---|---|---|---|
entity_type | Integer | Condition type. Currently, the following types are available:
|
Yes |
display | JSON | Display of conditions. | Yes |
order_num | Integer | Conditional sorting, starting from 1. | Yes |
entity_id | String | Action entities .
|
No |
Display device status conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The statusCode of the device. |
Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | String | Code value. | Yes |
Display external conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | Key of external conditions. | Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | Object | Code value corresponding to the key of the external condition. | Yes |
Display weather conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The key corresponding to weather conditions, such as temperature temp . |
Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | String | Code value corresponding to the key of the weather condition. | Yes |
Display timing conditions
Parameter name | Type | Description | Required |
---|---|---|---|
date | String | The trigger date in the format of yyyyMMdd , for example, 20191125 . |
Yes |
loops | String | A 7-digit number consisting of 0 and 1. 0 means not to execute, and 1 means to execute. The first digit represents Sunday, and the following digits represent Monday to Saturday in turn. For example, 0011000 means to execute every Tuesday and Wednesday. |
Yes |
time | String | The trigger time in 24-hour clock, for example, 14:00 . |
Yes |
timezone_id | String | The ID of the time zone, for example, Asia/Shanghai . |
Yes |
Description of preconditions
Predefined restrictions. Currently, it supports restrictions by time frame.
Parameter name | Type | Description | Required |
---|---|---|---|
cond_type | String | Currently, it only supports restrictions by time frame, which is fixed as timeCheck . |
Yes |
display | JSON | Display of conditions. | Yes |
Description of display in preconditions
Parameter name | Type | Description | Required |
---|---|---|---|
start | String | The start time in 24-hour clock. The default value is a certain time of the day. For example, 10:00 . |
Yes |
end | String | The end time in 24-hour clock. For example, 22:00 . |
Yes |
loops | String | A 7-digit number consisting of 0 and 1. 0 means not to execute, and 1 means to execute. The first digit represents Sunday, and the following digits represent Monday to Saturday in turn. For example, 0011000 means to execute every Tuesday and Wednesday. |
Yes |
timezone_id | String | The ID of the time zone, for example, Asia/Shanghai . |
Yes |
Description of actions device
Parameter name | Type | Description | Required |
---|---|---|---|
entity_id | String | Device ID. | Yes |
executor_property | JSON | Action parameters. | Yes |
action_executor | String | Action category, which is fixed to dpIssue . |
Yes |
Description of external actions
Parameter name | Type | Description | Required |
---|---|---|---|
executor_property | JSON | Custom external actions. | Yes |
action_executor | String | Action category, which is fixed to externalAction . |
Yes |
Description of actions delay
Parameter name | Type | Description | Required |
---|---|---|---|
executor_property | JSON | Action parameters. | Yes |
action_executor | String | Action category, which is fixed to delay . |
Yes |
PUT /v1.0/homes/242****/automations/53IYSXI3gEn2w3Oc
{
"actions":[
{
"action_executor":"delay",
"executor_property":{
"hours":"0",
"minutes": "0",
"seconds": "5"
}
},
{
"action_executor":"dpIssue",
"entity_id":"vdevo157259825422309",
"executor_property":{
"switch_1":true
}
},
{
"action_executor":"externalAction",
"executor_property":{
// User customized
}
}
],
"background":"https://images.tuyacn.com/smart/rule/cover/bedroom.png",
"conditions":[
{
"display":{
"code":"switch_1",
"operator":"==",
"value":true
},
"entity_id":"vdevo157259825422309",
"entity_type":1,
"order_num":1
},
{
"display":{
"code":"mode",
"operator":"==",
"value":1
},
"entity_type":15,
"order_num":2
}
],
"match_type":1,
"name":"Test the automation"
}
Example of preconditions
{
"preconditions":[
{
"display":{
"start":"10:00",
"end":"12:00",
"loops":"0000000",
"timezone_id":"Asia/Shanghai"
},
"cond_type":"timeCheck"
}
]
}
Example of device status conditions
{
"conditions":[
{
"display":{
"code":"switch_1",
"operator":"==",
"value":true
},
"entity_id":"vdevo157259825422309",
"entity_type":1,
"order_num":1
}
]
}
Example of external conditions
{
"conditions":[
{
"display":{
"code":"test",
"operator":"==",
"value":"test"
},
"entity_type":15,
"order_num":1
}
]
}
Example of weather conditions
{
"conditions":[
{
"display":{
"code":"temp",
"operator":"==",
"value":"20"
},
"entity_id":"10",
"entity_type":3,
"order_num":1
}
]
}
Example of timing conditions
{
"conditions":[
{
"display":{
"date":"20200301",
"loops":"0000000",
"time":"14:00",
"timezone_id":"Asia/Shanghai"
},
"entity_id":"timer",
"entity_type":6,
"order_num":1
}
]
}
Example of external actions
{
"actions":[
{
"action_executor":"externalAction",
"executor_property":{
//Custom. It will be pushed through the message queue.
}
}
]
}
Example of delay actions
{
"action_executor":"delay",
"executor_property":{
"hours":"0",
"minutes": "0",
"seconds": "5"
}
}
Code data type and operator mapping description
type | operator |
---|---|
Boolean | “==” |
Integer | “>”,“==”,“<” |
Enum | “==” |
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | String | true is returned if the request succeeds. |
{
"success": true,
"t": 1541072348540,
"result": true
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
Delete the home automation configuration.
DELETE /v1.0/homes/{home_id}/automations/{automation_id}
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | The user’s home ID | Yes |
automation_id | String | URI | Automation ID | Yes |
DELETE /v1.0/homes/242****/automations/53IYSXI3gEn2w3Oc
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | String | Whether the automation is deleted successfully. true is returned if the request succeeds. |
{
"success": true,
"t": 1541072348540,
"result":true
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
Query the automation list.
GET /v1.1/homes/{home_id}/automations
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | The user’s home ID | Yes |
GET /v1.1/homes/242****/automations
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | List | The returned result. |
Result
Parameter name | Type | Description |
---|---|---|
automation_id | String | Automation ID. |
name | String | The name of the automation. |
enabled | Boolean | Enable status. |
status | String | The status. 1 : valid, 2 : invalid |
background | String | Background picture. |
conditions | List | A list of conditions. |
preconditions | List | Preconditions. |
actions | List | Action list. |
match_type | Integer | Match types:
|
condition_rule | String | Custom condition rules. When the match type is match_type=3 , this parameter is required. The custom condition rules follow the AND/OR formula. Each automation condition uses its order_num as the identification code. |
Conditions
Parameter name | Type | Description | Required |
---|---|---|---|
entity_type | Integer | Condition type. Currently, the following types are available:
|
Yes |
display | JSON | Display of conditions. | Yes |
order_num | Integer | Conditional sorting, starting from 1. | Yes |
entity_id | String | Action entities .
|
No |
Display device status conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The statusCode of the device. |
Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | String | Code value. | Yes |
Display external conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | Key of external conditions. | Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | Object | Code value corresponding to the key of the external condition. | Yes |
Display weather conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The key corresponding to weather conditions, such as temperature temp . |
Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | String | Code value corresponding to the key of the weather condition. | Yes |
Display timing conditions
Parameter name | Type | Description | Required |
---|---|---|---|
date | String | The trigger date in the format of yyyyMMdd , for example, 20191125 . |
Yes |
loops | String | A 7-digit number consisting of 0 and 1. 0 means not to execute, and 1 means to execute. The first digit represents Sunday, and the following digits represent Monday to Saturday in turn. For example, 0011000 means to execute every Tuesday and Wednesday. |
Yes |
time | String | The trigger time in 24-hour clock, for example, 14:00 . |
Yes |
timezone_id | String | The ID of the time zone, for example, Asia/Shanghai . |
Yes |
Description of preconditions
Predefined restrictions. Currently, it supports restrictions by time frame.
Parameter name | Type | Description | Required |
---|---|---|---|
cond_type | String | Currently, it only supports restrictions by time frame, which is fixed as timeCheck . |
Yes |
display | JSON | Display of conditions. | Yes |
Description of display in preconditions
Parameter name | Type | Description | Required |
---|---|---|---|
start | String | The start time in 24-hour clock. The default value is a certain time of the day. For example, 10:00 . |
Yes |
end | String | The end time in 24-hour clock. For example, 22:00 . |
Yes |
loops | String | A 7-digit number consisting of 0 and 1. 0 means not to execute, and 1 means to execute. The first digit represents Sunday, and the following digits represent Monday to Saturday in turn. For example, 0011000 means to execute every Tuesday and Wednesday. |
Yes |
timezone_id | String | The ID of the time zone, for example, Asia/Shanghai . |
Yes |
Description of actions device
Parameter name | Type | Description | Required |
---|---|---|---|
entity_id | String | Device ID. | Yes |
executor_property | JSON | Action parameters. | Yes |
action_executor | String | Action category, which is fixed to dpIssue . |
Yes |
Description of external actions
Parameter name | Type | Description | Required |
---|---|---|---|
executor_property | JSON | Custom external actions. | Yes |
action_executor | String | Action category, which is fixed to externalAction . |
Yes |
Code data type and operator mapping description
type | operator |
---|---|
Boolean | “==” |
Integer | “>”,“==”,“<” |
Enum | “==” |
{
"result":[
{
"actions":[
{
"action_executor":"delay",
"executor_property":{
"hours":"0",
"minutes": "0",
"seconds": "5"
}
},
{
"action_executor":"dpIssue",
"entity_id":"vdevo157259825422309",
"executor_property":{
"switch_1":true
}
},
{
"action_executor":"externalAction",
"executor_property":{
// User customized
}
}
],
"automation_id":"p2aWOkEOe2RzATHL",
"background":"https://images.tuyacn.com/smart/rule/cover/bedroom.png",
"conditions":[
{
"display":{
"code":"switch_1",
"operator":"==",
"value":true
},
"entity_id":"vdevo157259825422309",
"entity_type":1,
"order_num":1
}
],
"enabled": true,
"status": "1",
"match_type":1,
"name":"Test the automation"
},
{
"automation_id":"L07BQVabdqwFPT9K",
"background":"https://images.tuyacn.com/smart/rule/cover/house6.png",
"conditions":[
{
"display":{
"code":"battery_percentage",
"operator":"<",
"value":255
},
"entity_id":"vdevo156958314001174",
"entity_type":1,
"order_num":1
},
{
"display":{
"code":"mode",
"operator":"==",
"value":1
},
"entity_id":"weqszcaokqlmlkmlcanqklwokljlaf",
"entity_type":15,
"order_num":2
}
],
"enabled": true,
"status": "1",
"match_type":1,
"name":"Automation test 1"
}
],
"success":true,
"t":1572936751228
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
Query a single automation scene in the home.
GET /v1.0/homes/{home_id}/automations/{automation_id}
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | The user’s home ID | Yes |
automation_id | String | URI | Automation scene ID | Yes |
GET /v1.0/homes/242****/automations/53IYSXI3gEn2w3Oc
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | Object | The returned result. |
Result
Parameter name | Type | Description |
---|---|---|
automation_id | String | Automation scene ID. |
name | String | Automation scene name. |
enabled | Boolean | Enable status. |
background | String | Background picture. |
conditions | List | A list of conditions. |
preconditions | List | Preconditions. |
actions | List | Action list. |
match_type | Integer | Match types:
|
condition_rule | String | Custom condition rules. When the match type is match_type=3 , this parameter is required. The custom condition rules follow the AND/OR formula. Each automation condition uses its order_num as the identification code. |
Conditions
Parameter name | Type | Description | Required |
---|---|---|---|
entity_type | Integer | Condition type. Currently, the following types are available:
|
Yes |
display | JSON | Display of conditions. | Yes |
order_num | Integer | Conditional sorting, starting from 1. | Yes |
entity_id | String | Action entities .
|
No |
Display device status conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The statusCode of the device. |
Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | String | Code value. | Yes |
Display external conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | Key of external conditions. | Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | Object | Code value corresponding to the key of the external condition. | Yes |
Display weather conditions
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The key corresponding to weather conditions, such as temperature temp . |
Yes |
operator | String | Operators. See Code data type and operator mapping description. | Yes |
value | String | Code value corresponding to the key of the weather condition. | Yes |
Display timing conditions
Parameter name | Type | Description | Required |
---|---|---|---|
date | String | The trigger date in the format of yyyyMMdd , for example, 20191125 . |
Yes |
loops | String | A 7-digit number consisting of 0 and 1. 0 means not to execute, and 1 means to execute. The first digit represents Sunday, and the following digits represent Monday to Saturday in turn. For example, 0011000 means to execute every Tuesday and Wednesday. |
Yes |
time | String | The trigger time in 24-hour clock, for example, 14:00 . |
Yes |
timezone_id | String | The ID of the time zone, for example, Asia/Shanghai . |
Yes |
Description of preconditions
Predefined restrictions. Currently, it supports restrictions by time frame.
Parameter name | Type | Description | Required |
---|---|---|---|
cond_type | String | Currently, it only supports restrictions by time frame, which is fixed as timeCheck . |
Yes |
display | JSON | Display of conditions. | Yes |
Description of display in preconditions
Parameter name | Type | Description | Required |
---|---|---|---|
start | String | The start time in 24-hour clock. The default value is a certain time of the day. For example, 10:00 . |
Yes |
end | String | The end time in 24-hour clock. For example, 22:00 . |
Yes |
loops | String | A 7-digit number consisting of 0 and 1. 0 means not to execute, and 1 means to execute. The first digit represents Sunday, and the following digits represent Monday to Saturday in turn. For example, 0011000 means to execute every Tuesday and Wednesday. |
Yes |
timezone_id | String | The ID of the time zone, for example, Asia/Shanghai . |
Yes |
Description of actions device
Parameter name | Type | Description | Required |
---|---|---|---|
entity_id | String | Device ID. | Yes |
executor_property | JSON | Action parameters. | Yes |
action_executor | String | Action category, which is fixed to dpIssue . |
Yes |
Description of external actions
Parameter name | Type | Description | Required |
---|---|---|---|
executor_property | JSON | Custom external actions. | Yes |
action_executor | String | Action category, which is fixed to externalAction . |
Yes |
Code data type and operator mapping description
type | operator |
---|---|
Boolean | “==” |
Integer | “>”,“==”,“<” |
Enum | “==” |
{
"result":[{
"actions":[
{
"action_executor":"delay",
"executor_property":{
"hours":"0",
"minutes": "0",
"seconds": "5"
}
},
{
"action_executor":"dpIssue",
"entity_id":"vdevo157259825422309",
"executor_property":{
"switch_1":true
}
},
{
"action_executor":"externalAction",
"executor_property":{
// User customized
}
}
],
"automation_id":"p2aWOkEOe2RzATHL",
"background":"https://images.tuyacn.com/smart/rule/cover/bedroom.png",
"conditions":[
{
"display":{
"code":"switch_1",
"operator":"==",
"value":true
},
"entity_id":"vdevo157259825422309",
"entity_type":1,
"order_num":1
}
],
"enabled": true,
"match_type":1,
"name":"Test the automation"
},
{
"automation_id":"L07BQVabdqwFPT9K",
"background":"https://images.tuyacn.com/smart/rule/cover/house6.png",
"conditions":[
{
"display":{
"code":"battery_percentage",
"operator":"<",
"value":255
},
"entity_id":"vdevo156958314001174",
"entity_type":1,
"order_num":1
},
{
"display":{
"code":"mode",
"operator":"==",
"value":1
},
"entity_id":"weqszcaokqlmlkmlcanqklwokljlaf",
"entity_type":15,
"order_num":2
}
],
"enabled": true,
"match_type":1,
"name":"Automation test 1"
},
"success":true,
"t":1572936751228
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
An external condition that triggers an automation scene in the home.
POST /v1.0/homes/{home_id}/automations/{automation_id}/conditions/trigger
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | The user’s home ID | Yes |
automation_id | String | URI | Automation scene ID | Yes |
conditions | List | Body | A list of conditions | Yes |
Conditions
Parameter name | Type | Description | Required |
---|---|---|---|
entity_id | String | ID of an external condition | Yes |
display | JSON | Condition | Yes |
Display
Parameter name | Type | Description | Required |
---|---|---|---|
code | String | The statusCode of the device |
Yes |
value | String | Code value | Yes |
POST /v1.0/homes/242****/automations/53IYSXI3gEn2w3Oc/conditions/trigger
[{
"entity_id":"c9a5a524-d973-4b59-9390-0dcda0f172ec",
"display":{
"code":"test",
"value":"test"
}
}]
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | String | Whether the scene is triggered successfully. true is returned if the request succeeds. |
{
"success": true,
"t": 1541072348540,
"result": true
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
Query the list of devices that support automation scenes in the home.
GET /v1.0/homes/{home_id}/automation/devices
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | URI | The user’s home ID | Yes |
type | String | URL | Supported types:
|
No |
Note: If the
type
parameter is not output, all devices that support automation scenes will be returned.
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | List | The returned result. |
Result
Parameter name | Type | Description |
---|---|---|
device_id | String | Device ID |
uuid | String | Universally unique identifier of the device |
name | String | Name |
home_id | String | Home ID |
product_id | String | Product ID |
GET /v1.0/homes/242****/automation/devices?type=condition
{
"result":[
{
"id":"vedo123****",
"uuid":"asdfghnbvcx****",
"name":"Test device",
"product_id":"r4567543****",
"home_id":"242****"
}
],
"success":true,
"t":1572936751228
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
Query weather conditions supported by automation
GET /v1.0/homes/automation/weather/conditions
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | List | The returned result. |
Result
Parameter name | Type | Description |
---|---|---|
category | String | Category |
category_name | String | Category name |
operators | String | Operator |
property | JSON | Category property |
GET /v1.0/homes/automation/weather/conditions
{
"result":[
{
"category":"temp",
"category_name":"Temperature",
"operators":"[\"<\",\"==\",\">\"]",
"property":{
"unit": "℃",
"min": -40,
"max": 40,
"step": 1,
"type": "value"
},
}
],
"success":true,
"t":1572936751228
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
Get linkage conditions or standard data points for performing actions based on the home ID.
GET /v1.0/homes/{home_id}/enable-linkage/codes
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | String | URI | Home ID | Yes |
GET /v1.0/homes/5232322/enable-linkage/codes
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | List | The returned result. |
Result
Parameter name | Type | Description |
---|---|---|
device_id | String | Automation device ID. |
functions | List | Operation performed. |
status | List | The condition triggering operation. |
Functions
Parameter name | Type | Description |
---|---|---|
code | String | Code of standard instructions sent. |
name | String | Code name. |
type | String | Types of the sent data. Currently, the following three types are available:
|
values | JSON | Code value range. |
Status
Parameter name | Type | Description |
---|---|---|
code | String | Code of standard statuses reported. |
name | String | Code name. |
type | String | Types of the reported data. Currently, the following three types are available:
|
values | JSON | Code value range. |
{
"success": true,
"t": 1541072348540,
"result": [
{
"device_id": "0120090568c63a89cb34",
"functions": [
{
"name": "Brightness",
"code": "bright_value",
"type": "Integer",
"values": {
"max":255,
"min":25,
"scale":0,
"step":1,
"type":"value",
"unit":""
}
},
{
"name": "Switch",
"code": "switch_led",
"type": "Boolean"
}
],
"status": [
{
"name": "Mode",
"code": "work_mode",
"type": "Enum",
"values": {
"range": [
"white",
"colour",
"scene",
"scene_1",
"scene_2",
"scene_3",
"scene_4"
],
"type": "Enum"
}
}
]
}
]
}
{ "success": false, "code": 1100, "msg": "param is empty", "t": 1540954683193 }
Get linkage conditions or standard data points for performing actions based on the home ID.
GET /v1.0/devices/{device_id}/enable-linkage/codes
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
device_id | String | URI | Device ID | Yes |
GET /v1.0/devices/0120090568c63a89cb34/enable-linkage/codes
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | Object | The returned result. |
Result
Parameter name | Type | Description |
---|---|---|
device_id | String | Device ID. |
functions | List | Standard instructions for performing actions. |
status | List | The standard status to trigger actions. |
Functions
Parameter name | Type | Description |
---|---|---|
code | String | Code of standard instructions sent. |
name | String | Code name. |
type | String | Types of the sent data. Currently, the following three types are available:
|
values | JSON | Code value range. |
Status
Parameter name | Type | Description |
---|---|---|
code | String | Code of standard statuses reported. |
name | String | Code name. |
type | String | Types of the reported data. Currently, the following three types are available:
|
values | JSON | Code value range. |
{
"success": true,
"t": 1541072348540,
"result": {
"device_id": "0120090568c63a89cb34",
"functions": [
{
"name": "Brightness",
"code": "bright_value",
"type": "Integer",
"values": {
"max":255,
"min":25,
"scale":0,
"step":1,
"type":"Integer",
"unit":""
}
},
{
"name": "Switch",
"code": "switch_led",
"type": "Boolean",
"values": {
"type": "Boolean"
}
}
],
"status": [
{
"name": "Mode",
"code": "work_mode",
"type": "Enum",
"values": {
"range": [
"white",
"colour",
"scene",
"scene_1",
"scene_2",
"scene_3",
"scene_4"
],
"type": "Enum"
}
}
]
}
}
{
"success": false,
"code": 1100,
"msg": "param is empty",
"t": 1540954683193
}
Enable automation scenes.
PUT /v1.0/homes/{home_id}/automations/{automation_id}/actions/enable
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | Home ID | URI | Yes |
automation_id | String | Automation scene ID | URI | Yes |
Return parameter:
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | Boolean | The returned result. |
PUT /v1.0/homes/242****/automations/53IYSXI3gEn2w3Oc/actions/enable
{
"success": true,
"t": 1541072348540,
"result": true
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
Disable automation scenes.
PUT /v1.0/homes/{home_id}/automations/{automation_id}/actions/disable
Parameter name | Type | Parameter type | Description | Required |
---|---|---|---|---|
home_id | Long | Home ID | URI | Yes |
automation_id | String | Automation scene ID | URI | Yes |
Return parameter:
Parameter name | Type | Description |
---|---|---|
code | Integer | Response code. See Error Code. |
success | Boolean | Whether the request succeeded or not.
|
msg | String | The message returned if the request fails. It is empty on success. |
t | Long | Return a 13-bit timestamp. |
result | Boolean | The returned result. |
PUT /v1.0/homes/242****/automations/53IYSXI3gEn2w3Oc/actions/disable
{
"success": true,
"t": 1541072348540,
"result": true
}
The following are common service exceptions for this API. For more exception errors, see Error Code.
Error code | Description |
---|---|
500 | System error |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback