POST api/v1/locations/{LocationID}/AutomationDevice/createSmartScene
To add or Edit the Scenes
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| LocationID |
location |
integer |
Required |
Body Parameters
smartscene
SmartScene| Name | Description | Type | Additional information |
|---|---|---|---|
| SmartSceneID | integer |
None. |
|
| SmartSceneIndex | integer |
None. |
|
| LocationID | integer |
None. |
|
| Name | string |
None. |
|
| TriggerType | integer |
None. |
|
| IsSmartSceneEnabled | boolean |
None. |
|
| SmartSceneIconID | integer |
None. |
|
| SceneSwitchSubActions | Collection of SceneSwitchSubAction |
None. |
|
| SceneLockSubActions | Collection of SceneLockSubAction |
None. |
|
| SceneThermostatSubActions | Collection of SceneThermostatSubAction |
None. |
|
| TimeTriggeredAction | ScenesTimeTriggeredAction |
None. |
|
| TriggerEvent | ScenesTriggerEvent |
None. |
Request Formats
application/json, text/json
Sample:
{
"SmartSceneID": 1,
"SmartSceneIndex": 2,
"LocationID": 3,
"Name": "sample string 4",
"TriggerType": 5,
"IsSmartSceneEnabled": true,
"SmartSceneIconID": 7,
"SceneSwitchSubActions": [
{
"SwitchID": 1,
"SwitchState": 2,
"SwitchType": 3,
"SwitchLevel": 4
},
{
"SwitchID": 1,
"SwitchState": 2,
"SwitchType": 3,
"SwitchLevel": 4
}
],
"SceneLockSubActions": [
{
"LockID": 1,
"LockState": true,
"AuthorizationCode": "sample string 3"
},
{
"LockID": 1,
"LockState": true,
"AuthorizationCode": "sample string 3"
}
],
"SceneThermostatSubActions": [
{
"ThermostatID": 1,
"ModeID": 2,
"FanMode": 3,
"HeatSetPoint": 4,
"CoolSetPoint": 5
},
{
"ThermostatID": 1,
"ModeID": 2,
"FanMode": 3,
"HeatSetPoint": 4,
"CoolSetPoint": 5
}
],
"TimeTriggeredAction": {
"DeviceID": 1,
"EventItemID": 2,
"TriggerTime": "sample string 3",
"SelectedDayID": 4,
"IsEnabled": true,
"FlashEventCardType": 6,
"IsNew": false,
"FrequencyTypeID": 4
},
"TriggerEvent": {
"EventTypeID": 1,
"EventItemID": 2,
"EventModifierID": 3,
"DeviceID": 4,
"IsEnabled": true,
"FlashEventCardType": 6,
"IsNew": false
}
}
application/xml, text/xml
Sample:
<SmartScene xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TC2Domain.SmartScene">
<SceneLockSubActions>
<SceneLockSubAction>
<AuthorizationCode>sample string 3</AuthorizationCode>
<LockID>1</LockID>
<LockState>true</LockState>
</SceneLockSubAction>
<SceneLockSubAction>
<AuthorizationCode>sample string 3</AuthorizationCode>
<LockID>1</LockID>
<LockState>true</LockState>
</SceneLockSubAction>
</SceneLockSubActions>
<SceneSwitchSubActions>
<SceneSwitchSubAction>
<SwitchID>1</SwitchID>
<SwitchLevel>4</SwitchLevel>
<SwitchState>2</SwitchState>
<SwitchType>3</SwitchType>
</SceneSwitchSubAction>
<SceneSwitchSubAction>
<SwitchID>1</SwitchID>
<SwitchLevel>4</SwitchLevel>
<SwitchState>2</SwitchState>
<SwitchType>3</SwitchType>
</SceneSwitchSubAction>
</SceneSwitchSubActions>
<SceneThermostatSubActions>
<SceneThermostatSubAction>
<CoolSetPoint>5</CoolSetPoint>
<FanMode>3</FanMode>
<HeatSetPoint>4</HeatSetPoint>
<ModeID>2</ModeID>
<ThermostatID>1</ThermostatID>
</SceneThermostatSubAction>
<SceneThermostatSubAction>
<CoolSetPoint>5</CoolSetPoint>
<FanMode>3</FanMode>
<HeatSetPoint>4</HeatSetPoint>
<ModeID>2</ModeID>
<ThermostatID>1</ThermostatID>
</SceneThermostatSubAction>
</SceneThermostatSubActions>
<TimeTriggeredAction>
<DeviceID>1</DeviceID>
<EventItemID>2</EventItemID>
<FlashEventCardType>6</FlashEventCardType>
<IsEnabled>true</IsEnabled>
<SelectedDayID>4</SelectedDayID>
<TriggerTime>sample string 3</TriggerTime>
</TimeTriggeredAction>
<TriggerEvent>
<DeviceID>4</DeviceID>
<EventItemID>2</EventItemID>
<EventModifierID>3</EventModifierID>
<EventTypeID>1</EventTypeID>
<FlashEventCardType>6</FlashEventCardType>
<IsEnabled>true</IsEnabled>
</TriggerEvent>
<IsSmartSceneEnabled>true</IsSmartSceneEnabled>
<LocationID>3</LocationID>
<Name>sample string 4</Name>
<SmartSceneID>1</SmartSceneID>
<SmartSceneIconID>7</SmartSceneIconID>
<SmartSceneIndex>2</SmartSceneIndex>
<TriggerType>5</TriggerType>
</SmartScene>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
BaseResults
BaseResults| Name | Description | Type | Additional information |
|---|---|---|---|
| ResultCode | integer |
None. |
|
| ResultData | string |
None. |
Response Formats
application/json, text/json
Sample:
{
"ResultCode": 1,
"ResultData": "sample string 2"
}
application/xml, text/xml
Sample:
<BaseResults xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TC2Utilities.RestApi"> <ResultCode>1</ResultCode> <ResultData>sample string 2</ResultData> </BaseResults>