io.edgehog.devicemanager.OTAEvent v0.1
OTA Events sampled data.
Allows to stream OTA Events data, including OTA Update status, its progress, code and internal message.
About
This interface is of type datastream and is owned by the device, meaning that it is the device which initiates the data flow. Thanks to this type of interface, the device can send a mutable, ordered stream of data, with no concept of persistent state or synchronization.
Data gets sent with an object aggregation. Astarte expects the owner to send all of the interface's mappings at the same time, packed in a single message.
Mappings
The interface has the following mappings:
/event/requestUUIDwithstringtype. OTA Request identifier./event/statuswithstringtype. OTA Update status./event/statusProgresswithintegertype. Current OTA Update status progress percentage [0%-100%]./event/statusCodewithstringtype. Status code expands OTA Update status with additional information./event/messagewithstringtype. Contains internal message for status code or empty string otherwise.
/event/requestUUID
OTA Request identifier.
This endpoint accepts values of type string: an UTF-8 string, at most 65536 bytes long.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when it has been received exactly once by the recipient. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 31556952 seconds before it is erased from the database.
/event/status
OTA Update status.
Value is one of the following strings:
Acknowledged: the device received an OTA Request.Downloading: an update is in the process of downloading.Deploying: an update is in the process of deploying.Deployed: an update deployed on the device.Rebooting: the device is in the process of rebooting.Success: an update succeeded. This is a final status of OTA Update.Error: an error happened during the update. Also this status can be used to notify about handled errors.Failure: an update failed. This is a final status of OTA Update.
This endpoint accepts values of type string: an UTF-8 string, at most 65536 bytes long.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when it has been received exactly once by the recipient. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 31556952 seconds before it is erased from the database.
/event/statusProgress
Current OTA Update status progress percentage [0%-100%].
Every OTA Update status has own progress that starts from 0 and ends at 100, for example (pairs of "status, progress"): "Downloading, 0", "Downloading, 50", "Downloading, 100", "Deploying, 10", etc.
This endpoint accepts values of type integer: a signed 32 bit integer.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when it has been received exactly once by the recipient. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 31556952 seconds before it is erased from the database.
/event/statusCode
Status code expands OTA Update status with additional information.
Some common status codes are:
InvalidRequest: an update request contains incorrect data.UpdateAlreadyInProgress: another update is currently in progress.NetworkError: a network error happened during the update.IOError: a filesystem error happened during the update.InternalError: an internal error happened during the update.InvalidBaseImage: an update failed to apply due to an invalid base image.SystemRollback: a system rollback has occurred.Canceled: an update was canceled.
This endpoint accepts values of type string: an UTF-8 string, at most 65536 bytes long.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when it has been received exactly once by the recipient. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 31556952 seconds before it is erased from the database.
/event/message
Contains internal message for status code or empty string otherwise.
This endpoint accepts values of type string: an UTF-8 string, at most 65536 bytes long.
The endpoint has a specific configuration for how data is stored, transferred and indexed. Astarte expects a valid timestamp to be attached each time data is produced. Data is considered delivered when it has been received exactly once by the recipient. Data is discarded if the transport is temporarily uncapable of delivering it. Delivered data is kept for 31556952 seconds before it is erased from the database.