Cloud initiated actions
Cloud server may include system_actions to any response sent back to device. It is expected that device will read and process that information. A cloud server will include system_actions information as long as actions are valid and device has not processed them.
Response may contain the following JSON structure
Where status is
|1||TSCLOUD_ERR_GENERIC||Error, generic error. No detailed reason known.|
|2||TSCLOUD_ERR_DATA||Device has sent invalid or corrupted data.|
System actions object is an array of action objects that cloud service expects the device to handle. The nature of Thingsee device is offline use, and therefore this mechanism has been created to initiate specific device-side functions as soon as a device comes back online.
Device actions are independent from status field. A cloud may send an array of actions even though the actual processing of previous request has failed with some error code.
Each Connector is responsible for initiating firmware update procedure whenever it has received indication of a new firmware version. Connector itself does not need to perform the actual firmware update, but it must act as an initiator for the process and handle firmware location (url) configuration and other initiative actions on behalf of the actual component that is responsible for the final flashing procedure. Cloud service must host and support Thingsee FOTA implementation – more detailed FOTA specification will be added in later versions.
Download new profile
A Connector can implement Profile download functionality in case device needs to update its purpose remotely. Profile download (REST) API and communication protocol may be cloud-specific, but the data structure should follow Thingsee Profile definition.