feat(zigbee): Add OTA client cluster support by P-R-O-C-H-Y · Pull Request #10946 · espressif/arduino-esp32 (original) (raw)

Description of Change

This PR adds support for Zigbee OTA Client cluster.

To add Client cluster to the endpoint, add zbDevice.addOTAClient() before adding the endpoint to the Zigbee Class.
The first 3 parameters are required and should be defined in your application, so you can control them when releasing a new updated version.

addOTAClient(uint32_t file_version, uint32_t downloaded_file_ver, uint16_t hw_version, uint16_t manufacturer = 0x1001, uint16_t image_type = 0x1011, uint8_t max_data_size = 223);

Added an simple OTA Client example to demonstrate how to use the OTA update.

For creating the OTA binary file (update file), you will need to get a python script from the esp-zigbee-sdk.

Tests scenarios

The OTA update was tested using the HomeAssistant, with specific configuration to allow the OTA updates for custom devices.

Thanks @lhespress for this tutorial: ZHA.OTA.Instructions.pdf
Link to the OTA creating process and how to use the image_builder_tool:
https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/user-guide/zcl_ota_upgrade.html#generate-and-apply-ota-upgrade-image

Related #10871
Related #10135