Last Updated on : 2024-06-24 09:26:41download
This topic describes how to deploy full or incremental updates to devices, which is used to deploy firmware updates to end devices via OTA.
For the MCU SDK or TuyaOS based devices that have been delivered, you can deploy firmware updates to them over the air (OTA) without flashing firmware.
The microcontroller board on the product must support OTA firmware updates.
Term | Explanation |
---|---|
Custom firmware | The custom firmware that a developer uploads to the Tuya Developer Platform. It is maintained by the developer. |
Tuya firmware | The firmware officially provided and maintained by Tuya. |
Manufacturer firmware | The firmware that a developer of the Tuya Developer Platform obtains through OEM Product or Copy Product. It is maintained by the firmware manufacturer. |
Firmware type | There are three types of firmware: production firmware, user area firmware, and firmware updates.
|
Firmware owner | The developer account that has permission to manage the firmware.
|
Tuya standard chip | The chips that are adapted to Tuya’s host program. You can use Tuya’s host to flash firmware to Tuya standard chips. |
Channel ID | Used for firmware updates only. The channel ID is used to identify types of firmware to perform updates on different firmware. |
Canary release | Canary release is a development strategy in which a new version of firmware is deployed to a small subset of users first, and the base version remains deployed for normal operations on the same stage. Once the new version is accepted, the update is rolled out to the rest of the users. |
You have created at least one product. For more information, see Create Products.
There are three types of firmware that can be updated via OTA.
Log in to the Tuya Developer Platform.
In the left navigation bar, choose Product > Device > Firmware Update.
For Tuya firmware or manufacturer firmware, an update can be deployed only when a new firmware version is provided by Tuya or the manufacturer.
Change to the target product and select the firmware.
Click New Update Deployment and complete the required settings.
Parameter classification | Parameter | Description |
---|---|---|
Basic Information | Target Product | The product that the current firmware is associated with. |
Firmware Name | The name of the current firmware. | |
Firmware Version | The firmware version to update to. Only the firmware version that has not been deployed for an update can be selected. | |
Critical Version | Specify whether the current firmware version is a critical version.
|
|
Upgrade Information | Update Method |
|
Auto Update | Automatic update is determined by the auto update setting on the Tuya Developer Platform and on the app together.Note: One product may have different firmware, so make sure to select the correct firmware and firmware version.
|
|
Description | Enter the description of the update in Chinese and English. The description will be displayed on the app. | |
Remarks | Enter the remarks about the update. | |
Publishing Scope Settings | Update Version | Enter one or more firmware versions to update from. All versions earlier than the firmware version set in Basic Information are selected by default. |
Update Region | The countries or regions where the firmware update will be rolled out. For China, you can select a specific city. All regions are selected by default. |
After the configuration is set, click OK. A record will be generated.
Click Common Verification Device to add devices under test (DUTs). This allows you to add a bunch of devices used for test purposes. Each time you perform a test, you can quickly select DUTs from the list.
You can select the data center where the device is deployed in the top right corner of the page.
You can add devices by using the app account. After your app account is verified, under your account, all the devices associated with the PID will be added to the allowlist.
For security purposes, your app account must be verified first.
Verify firmware update deployment.
Click Verify in the Firmware Update column. You can verify deployment to different data centers by changing the data center in the top right corner of the page.
You can add a DUT by selecting a device from the allowlist or by entering a device ID. If you choose Add by Device ID, the firmware update will be delivered to the specified device.
Click Verify Update to check the result.
Deploy an OTA firmware update.
After successful verification, you can click Release to deploy an OTA firmware update to devices. Due to the iteration of the firmware update feature, the legacy release process is also available.
The new process of releasing OTA updates appears by default. You can click Switch to Old Process to use the legacy release process. The legacy process will be retired in the future. Tuya will notify developers of such changes beforehand.
New OTA firmware update release
Click Release to enter the deployment process.
In Release Rule Settings, you can choose Grey Released to roll out the firmware update to a specified percentage of devices in a specific data center.
Data centers are isolated from each other. You can switch to another data center and deliver the firmware update to that data center.
Grayscale by proportion: Allows you to specify the percentage allocation of devices that will be exposed to the update. In the first rounds of deployment, it is recommended to set a small proportion, such as 5%. You can then examine the results, and if things go smoothly, gradually increase deployment to 100% of devices.
Pause: You can pause and resume the deployment as needed.
Key Metrics: Give you an overview of the deployment.
Total Number of Upgradable Devices
Number of Specified Devices to Update
Number of Devices Performing Updates
Number of Successfully Updated Devices
Data Analytics: Shows the distribution of update status and update installation.
Data Trend: Shows the number of devices that initiate the update as well as those that install the update successfully.
Details of Updated Devices: Allows you to check the update details by device ID.
Legacy OTA firmware update release
Click Release to enter the deployment process.
Click Switch to Old Process.
After you click Gray released or Full amount released, a request for releasing an update will be submitted. Tuya will verify firmware security. If your firmware is verified, Tuya will deliver the firmware update to the target devices as you requested.
Only the owner of the custom firmware can create a firmware version.
Log in to the Tuya Developer Platform.
In the left navigation bar, choose Product > Device > Firmware Update.
Select firmware with My Custom Firmware in the Firmware Source column.
Click New Update Deployment to set update rules.
For more information, see the configurations of Type 1.
Parameter | Description |
---|---|
Basic Information | You can upload a firmware version to update to. If this new version is planned for production, both production firmware and user area firmware can be uploaded. |
Production | This configuration is used for production and authorization.
|
Click Only Save or Save & Enable.
After you complete the basic information and upload the firmware, the firmware is not enabled by default. To update the firmware via OTA, click Save & Enabled.
You can set the Update Deployment Scope to specify which product this firmware update applies to.
Deploy a firmware update.
Click Update on the Firmware Version Management page, or in the left-side navigation pane, choose Product > Device > Firmware Update and select the firmware.
Select the target product, enter the parameters, and then click OK.
Follow Steps 6, 7, and 8 in Type 1 above to deploy an OTA firmware update.
This section applies to products that are developed with the TuyaLink solution and the Open Protocol.
Log in to the Tuya Developer Platform.
In the left navigation bar, choose Product > Development.
Find the target product and click Develop.
Under the Device Development tab, choose Firmware Management and click Add Firmware. Complete the required configuration and upload a firmware version.
Save and enable the firmware version.
The next steps are the same as Type 1 and Type 2.
TuyaLink-based devices do not support incremental updates.
OTA firmware update allows you to update a device remotely. Typically, a full update package is sent to the target device for installation. A large package requires more bandwidth for transmission and more memory for storage. For resource-constrained devices, such as NB-IoT and Cat.1, the smaller incremental updates make OTA firmware updates more feasible.
This feature applies to firmware that integrates with Tuya’s incremental update SDK. NB-IoT and Cat.1 devices are the typical use cases. Matter-certified devices also apply.
Term | Explanation |
---|---|
Target Version | The firmware version to update to. |
Earlier Version | The firmware version to update from. |
File to Build Incremental Package | The file used for incremental calculation. This file can be recognized by the incremental algorithm to compare it with another firmware version. |
Incremental Package | The incremental update package is generated based on the target version as well as the File to Build Incremental Package. It is the update package delivered to devices for installation. |
Before performing an incremental update, make sure:
Log in to the Tuya Developer Platform.
In the left navigation bar, choose Product > Device > Firmware Management.
Find the target firmware and click Details in the Operation column, and then click Add Firmware Version on the page that appears.
Enter the required information and upload the file in the File to Build Incremental Package field.
In the Firmware Version Management section, click Incremental Package in the Operation column.
Click Build Incremental Package.
The system generates an incremental package. If the File to Build Incremental Package is not uploaded for the earlier version, an incremental update cannot be performed.
In the Firmware Version Management section, click Enable. Then, the firmware version becomes Enabled.
Select Product > Device > Firmware Update, and click New Update Deployment.
Enable Incremental Update to allow the target devices to download the incremental package.
Check the available incremental package.
Click OK to generate a firmware update record. The target devices can then download the incremental package. The specific process depends on the update method supported by the devices. The full firmware package can still be obtained for an update.
The steps are the same as Type 1 and Type 2.
The steps are the same as Type 1 and Type 2.
Your account does not own the target firmware or your account is not authorized for the OTA firmware update. After your account is authorized by the firmware owner, you can add new versions for the firmware.
Check whether the firmware key was created with the current account. If not, the account does not have permission to view the firmware key.
For devices in mainland China: If the app is not allowed to access the location, the device connected to this app may not receive OTA firmware updates.
For devices outside mainland China: The country code of a user’s app account is used as the endpoint to receive OTA firmware updates. If the country code does not fall within the specified target regions, the device may not receive OTA firmware updates.
For more information, see Manage Custom Firmware.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback