Obtain Power Switch Command
https://api.orbitaiot.com/open/v1/dev/powerSwitch/{tid}
1. HTTP Request Method and Example
| POST /open/v1/dev/powerSwitch/1267 Host: api.orbitaiot.com Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzMCIsImp0aSI6IjA3ODk2NjQzZWNjNzkzYzBjN2M2MjZlYzdkZmNkMzc5ZTAyNG.................... Content-Type: application/json { "power_taking_status": 1, "expiration_time":1781249208} |
2. Parameter Description
Path Parameter
| Key | Type | Request | Description |
| tid | Int | Y | Device tid |
Headers Parameter
| Key | Type | Request | Vlues |
| Content-Type | String | Y | application/json |
| Authorization | String | Y | Bearer [access_token value] |
Body Parameter
| Name | Type | Required | Description |
| power_taking_status | Int | Y | Power supply from control switch 1:Open 0:close |
| expiration_time | Int | Y | Convert expiry time to 10-digit timestamp |
3. Return Parameters and Examples
| Name | Type | Description |
| code | Int | |
| data | String | |
| message | String | |
| bin | String | After obtaining the bin, Bluetooth unlocking is required, connect the Bluetooth device, and write it to the current feature value of the Bluetooth door lock |
{
"code": 0,
"message": "",
"data": {
"bin": "fd880102010195f6000004f3030031f2e4c91104f299ac1cc04ececb8e397220ad0975256c3e07667f1c69478d11e983fe"
}
}
4. Interface Example

