Device API - Result Codes

Server to Device Result Codes

All POSTed messages from a device or gateway to the server will contain an incrementing sequence number attribute. The server will reply back to each message using the sequence number of the original message it is replying to. The format of the response will be:
<?xml version="1.0" encoding="UTF-8"?> <s2h seq="1021" status="ACK" ver="2"/>

Where "ACK" declares the message was received and parsed by the server correctly.

Server response codes include:

Server to Hub Result Definition
ACK The message was received and parsed successfully. The device or gateway should send the next message according to its upload interval.
CONT The message was received and parsed successfully. The device or gateway should continue sending measured data, because the user is actively watching the screen expecting real-time feedback.
ERR Error reading the data, retry.
ERR_FORMAT Message format error, check your XML.
UNKNOWN Hub or device gateway is not registered on the server.
UNAUTHORIZED Authentication token does not match to the token stored on the server.

Device to Server Response Codes
The device or gateway will send a response code to the server when it receives a command from the server. This response code can be sent immediately, or added to a message that contains other XML blocks such as measurement information.

The XML format of the response is:
<?xml version="1.0" encoding="UTF-8"?>
<h2s ver="2" hubId="0123456ABCDEF">
  <response cmdId="5" result="0" />
</h2s>

The hubId describes your device or gateway which owns the Internet connection. The cmdId is the command ID generated by the server in its original command message. The result codes are as follows:

Device to Server Result Code Definition
0 The proxy got the message but it hasn't been executed yet. Don't send it again.
1 Successful command execution
4 The device is not identified
5 Command is not supported by the device
6 Device connection error
7 Error during execution on the device
8 Wrong command format