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

KeyTypeRequestDescription
tid
IntYDevice tid

Headers Parameter

KeyTypeRequestVlues
Content-Type
StringYapplication/json
Authorization
StringYBearer [access_token value]


Body Parameter

NameTypeRequiredDescription
power_taking_status
IntYPower supply from control switch 1:Open 0:close
expiration_time
IntYConvert expiry time to 10-digit timestamp

3. Return Parameters and Examples

Name
Type
Description
code
Int
data
String
message
String
binStringAfter 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