View update status

更新时间:
复制 MD 格式

After you submit a batch update task, you can monitor the update status of target devices and view update package details in the IoT Platform console.

Prerequisites

You have created a batch update task for your devices. For more information, see Create a batch update task.

Procedure

  1. Log on to the IoT Platform console.

  2. On the Overview page, find the instance that you want to manage and click the instance ID or instance name.

  3. In the left-side navigation pane, choose Maintenance > OTA Update.
    Note To provide better services, IoT Platform improves the OTA update feature and adds statistics on update package versions. When you use the new OTA update feature in the console for the first time, you must associate the uploaded update packages with products. You can associate an update package with only one product. For more information about how to associate update packages with products, see the instructions in the console.
  4. In the update package list, find the target package, click View in the Actions column, and then select one of the following tabs:
    • Batch management
      • View the types of update batches, such as Verify update package and Batch update.
      • Click View in the Actions column of the target update batch. On the Batch details page, click the Device list tab to view the devices in this batch, grouped by their update status.
        Status Description
        Pending Confirmation The OTA update is awaiting confirmation in the mobile app.

        This status applies only if you set App confirm upgrade to Yes when you create the batch update task.

        To Be Pushed The system has not yet sent the OTA update notification to the device.

        This state can occur when the device is offline, the update is scheduled, or rate limiting is in effect. The specific status is displayed as:

        • To Be Pushed (Device Offline)
        • To Be Pushed (Scheduled: YYYY/MM/DD hh:mm:ss)
        • To Be Pushed
        Pushed The OTA update notification has been sent to the device, but the device has not reported its progress.
        Upgrading The device has received the update notification and started reporting its progress.
        Updated The device successfully completed the update and reported the new version number.
        Note After an update is complete, the device must immediately report the new version number. Otherwise, the update may time out and be marked as failed.
        update failed An update can fail for several reasons:
        • You start a new batch update task for a device before the previous one is complete and choose not to overwrite the previous task. In this case, the new task fails.

          You can perform one of the following operations:

          • Wait for the previous update to complete before you start a new one.
          • When you start the new update, choose to overwrite the previous task.
            Note An update task cannot be overwritten if the device is in the Upgrading state.
        • The device reports a failure code (-1, -2, -3, or -4) to IoT Platform on the progress-reporting topic. The codes indicate the following information:
          • -1: The update failed.
          • -2: The download failed.
          • -3: The verification failed.
          • -4: The flashing failed.
        • The update times out. The system starts a timer when the device first reports its progress. If the device does not report the target version number before the timeout period ends, the update fails.
        • The device reports a version number that is neither the source version nor the target version while in the Upgrading state.

        If you specified a version to update and enabled retries when creating the batch update task, the system automatically retries the update in the following failure scenarios:

        • The update failed because the device reported a version number that was neither the source version nor the target version while in the Upgrading state.
        • The update failed because the device actively reported a failure by sending a value of -1, -2, -3, or -4 over the progress-reporting topic.

        During an automatic retry, the update status of the device in the IoT Platform console does not change. For example, if a retry is triggered while the device is in the Pushed state, its status remains Pushed. If a retry is triggered while the device is in the Upgrading state, its status remains Upgrading.

        Note

        IoT Platform does not trigger automatic retries in the following cases:

        • The update failed due to a timeout. The failure reason is timeout.
        • You manually canceled the update.
        Canceled The update for this device has been canceled.

        If an update batch is Upgrading, an Edit button appears in the Actions column. Click Edit to modify the Update package push rate in Update policy configuration, such as constant rate or variable rate values, or to modify and add tags. For more information, see Create a batch update task.

        You can also click the Batch information tab to view basic information about the batch update task. If the update batch is in the Upgrading state, an Edit button appears next to Tag information. Click Edit to modify or add tags.

        In the Edit tag dialog box, enter the tag key and tag value for the batch, and then click OK. Device notifications will use the new tags within one minute.
      • Click Cancel in the Actions column for the target update batch:
        • For a static update batch, this action cancels the batch and all its associated update tasks by default, including those in the Pending Confirmation, To Be Pushed, Pushed, and Upgrading states.
        • For a dynamic update batch, this action cancels only the dynamic update policy by default. You can choose whether to also cancel all ongoing tasks, including tasks in the To Be Pushed, Pushed, and Upgrading states.

        You can cancel all update tasks that are in the Pending Confirmation, To Be Pushed, or Pushed state in a batch.

    • Device list

      View target devices for the update package, their update statuses, and statistics on updated, failed, and canceled tasks.

      Find a target device and click View in the Actions column. On the Batch details page, you can cancel the update task for a single device or for multiple devices.

    • Update package information
      • View basic information about the update package, such as its ID, name, signature, signature algorithm, version number, status, and module.
      • To download the update package file, click Download next to Update package signature.

What to do next

View update package versions and success rates: After OTA updates are complete, use data analytics to view the distribution of update package versions and update success rate statistics.

API reference

API Description
ListOTAJobByFirmware Queries the list of update batches for an update package.
ListOTAJobByDevice Queries the list of update batches that include a specific device.
ListOTATaskByJob Queries the list of device update tasks within a specified update batch.
QueryOTAJob Queries the details of a specified update batch.

For more information about API operations related to the OTA update feature, see OTA update APIs.