Data Packet
Basic Data Packet
Basic Data Packet is the data packet transmitted between the API Server and the API Client. Where BDDP is the packet sent from the client to the API Server and BUDP is the packet sent from the API Server to the client.
Basic Downlink Data Packet
Params | Type | Description |
---|---|---|
time | Timestamp <Necessary> | Current Timestamp; |
method | String <Necessary> | Method to invoke, Details in Methods Pages; |
msgid | String <Optional> | Identification of this BDDP; BUDP will return it; default is the timestamp; |
targetDevice | String <Optional> | The deviceId you want to control; It's necessary if you send a message to device; |
token | String <Optional> | The token of the targetDevice; It's necessary if you send a message to device; |
params | Object <Optional> | Required by Special Methods; |
Basic Uplink Data Packet
Params | Type | Description |
---|---|---|
time | Timestamp <Necessary> | Current Timestamp |
method | String <Necessary> | Method invoked; Same as BDDP's method |
msgid | String <Necessary> | Identification of this BUDP; Same as BDDP's msgid; |
code | String <Necessary> | Status Code; Details in 'Status Code' Page; '000000' means Success, Here is more |
desc | String <Optional> | Description of Status Code; |
data | Object <Optional> | Result Data for this request; Details in special Methods/Commands; |
tip
The method in BDDP points to the method you will be accessing, and the params is the parameter required to access the method; please check the Methods module for specific information on the parameters of each method.