Request Commands¶
Commands can be used in order to receive requests from the server.
Commands must be polled by a regular interval, but not faster than every 10 s.
The command request must be sent to the following URL:
URL: POST /rmsService/wService3.DeviceService.svc/RequestCommandJson
{
"DeviceId":
"Serial":
"Token":
}
See table below for the available commands.
The command response must be sent to the following URL:
URL: POST /rmsService/wService3.DeviceService.svc/ResponseCommandJson
See table below for the response format.
| Command | { "DeviceId": "Serial": "Token": "Command": 15, "ID": XX "Parameter": { "From": 2016-04-23T18:25:43.511Z "To": 2016-04-23T18:35:43.511Z } } |
|---|---|
| Response | { "DeviceId": "Serial": "Token": "Command": 15, "ID": XX, "Status": 0 "Data": [{"Time": 2016-04-23T18:26:43.511Z, "Values": [12.23, 45.58]}, {"Time": 2016-04-23T18:27:43.511Z, "Values": [12.24, 45.57]}] } |
| Command | { "DeviceId": "Serial": "Token": "Command": 12, "ID": XX "Parameter": { "Index": 0 "Value": 1 } } |
|---|---|
| Response | { "DeviceId": "Serial": "Token": "Command": 12, "ID": XX, "Status": 0 } |