1.URL
http://124.223.60.234:8080/system/asset/command/sendCommand2Device
or Server in US
https://cloud.aovx.com/prod/system/asset/command/sendCommand2Device
2.Request parameters
2.1.Request headers
Add token in Headers: After successful login verification, the corresponding tokenId in user login response data
2.2.Parameters example
{
"terminalId":"589D6C6B4678434FB962971BA8513432",
"terminalNum":"162070003356",
"msgId":33027,
"msgFlowId":1,
"childMsgId":0,
"params":"{\"staticPassword\":\"123456\",\"type\":3,\"times\":1,\"startTime\":\"2023-03-30 00:00:00\",\"endTime\":\"2023-04-01 00:00:00\"}",
"offline":0
}
2.3.Parameters description
Field | Data type | description | required |
---|---|---|---|
terminalId | String | Unique identification of device in the system | Y |
terminalNum | String | Device number | Y |
msgId | int | The message ID varies depending on the device. Currently, we only have (0x8103, 0x8104, 0x8105, 0x8900, 0x8A00), which is converted to a decimal value when send. For example, 0x8103=33027 | Y |
msgFlowId | int | Message serial number, in the range of (1~65534), can be randomly generated | Y |
childMsgId | int | Subcommand represent different meanings depending on the message ID | Y |
params | String | Command parameters, assembled according to different messages, converted into JSON strings and passed in | Y |
offline | int | Whether to send commands offline (0: real-time; 1: offline (if the current device is not online, the system will automatically send this command after the device goes online) | Y |
params description
For different message IDs, the corresponding fields for sending are different
0x0A(Set password type for use)
childMsgId:1: Use static password, 2: Use dynamic password, 3: Use multi restriction static password
The JSON string corresponding to params is as follows:
{
"staticPassword":"123456",
"type":3,
"times":1,
"startTime":"2023-03-30 00:00:00",
"endTime":"2023-04-01 00:00:00"
}
params description
Field | Data type | description | required |
---|---|---|---|
staticPassword | String | Static password of 6 bytes (if using dynamic password, the static password is 0xfe) | Y |
type | int | Static password usage control method (0: unlimited; 1: usage limit enable; 2: usage time limit enable; 3: usage time limit+usage time limit) | Y |
times | int | Static password count (1-255), 255 represents always valid | Y |
startTime | String | Static password start time(yyyy-MM-dd HH:mm:ss),UTC | Y |
endTime | String | Static password end time(yyyy-MM-dd HH:mm:ss),UTC | Y |
0x0C(Upload interval instruction)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
uploadInterval | int | Positioning reporting interval(5-65535s) | Y |
duration | int | Duration length(30-65535s) | Y |
0x0D(Set IP and Port)
childMsgId:1: Primary IP. 2: Secondary IP, 3: Backup IP
params description
Field | Data type | description | required |
---|---|---|---|
address | String | IP or domain name of the server (no more than 30 bytes) | Y |
port | int | Port | Y |
0x0E(Query all IPs and ports)
childMsgId:Default 0
params:No additional parameters need to be passed in
0x13(Set physical parameters)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
uploadInterval | int | Positioning reporting interval(5-65535s) | Y |
enable | int | Physical quantity enable flag: 0: none set; 1: Temperature; 2: Humidity; 3: Temperature+humidity; 4: Illuminance; 5: Illumination+temperature; 6: Illumination+humidity; 7: Illumination+temperature+humidity | Y |
thresholdEnable | int | Physical quantity threshold valid flag: 0: None effective; 1: Temperature; 2: Humidity; 3: Temperature+humidity; 4: Illuminance; 5: Illumination+temperature; 6: Illumination+humidity; 7: Illumination+temperature+humidity | Y |
tempThreshold | int | Temperature threshold | Y |
humidityThreshold | int | Humidity threshold | Y |
lightThreshold | int | Illumination threshold | Y |
0x14(Set lock authorization code)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
code | String | 8-byte authorization code | Y |
0x16(remote shutdown)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
password | String | Lock password | Y |
0x17(Shield alarm)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
type | int | Shield alarm flag 1: Shield alarm, 2: Do not shield alarm | Y |
duration | int | Shielding time (1-65200) Shielding alarm time, 65278 is permanently valid until the next switch lock operation ends | Y |
0x18(Other devices shield alarm)
childMsgId:Default 1
params description
Field | Data type | description | required |
---|---|---|---|
type | int | 1: Local, 2: SMS, 3: Reserved, 4: RF device | Y |
deviceId | String | Shielding alarm device ID, 8 digits, type=4 only needs to be passed in | Y |
duration | int | Shielding time (1-65200) Shielding alarm time, 65278 is permanently valid until the next switch lock operation ends | Y |
0x19(Switch lock enable)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
enable | int | Switch lock enable state; 1: On, 2: Off | Y |
dateTime | String | Allow running time(yyyy-MM-dd HH:mm:ss),UTC | Y |
0x1A(Positioning enable)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
enable | int | Positioning enabling status; 1: On, 2: Off | Y |
0x1B(Vibration sensor settings)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
enable | int | Enabling state; 1: On, 2: Off | Y |
threshold | int | Vibration threshold | Y |
0x1C(RF Enable)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
enable | int | Enabling state; 1: On, 2: Off | Y |
0x1D(Networking method settings)
childMsgId:Default 0
params description
Field | Data type | description | required |
---|---|---|---|
type | int | Networking method (1: Long connection, 2: Intermittent connection) | Y |
onlineDuration | int | Intermittent connection networking duration (unit: seconds) | Y |
offlineDuration | int | Interrupted connection and disconnection duration(unit: seconds) | Y |
3.Response content
3.1.Response example
{
"code": 200,
"message": "Operation succeeded",
"data": null
}
3.2.Response description
Field | Data type | description |
---|---|---|
code | int | Return code |
message | String | Return message |
data | object | Response data |
最后编辑:admin 更新时间:2024-12-27 19:48