The UpdateOTA Library facilitates Over-The-Air (OTA) firmware updates for ESP8266-based projects using the Arduino framework. It provides a straightforward interface for handling OTA updates, including the ability to start updates, retrieve version numbers, and convert update errors to human-readable strings.
- Introduction
- Features
- Installation
- Dependencies
- Usage
- API
- Example
- License
- Contributions
- Platformio Registry
The UpdateOTA Library streamlines the implementation of Over-The-Air firmware updates for ESP8266-based projects. It introduces an abstract class, UpdateOTAInterface, defining methods for starting updates, retrieving version numbers, and handling update errors. The library is designed to work seamlessly with ESP8266, Arduino, and other related libraries.
- Abstracts OTA update functionality into a clear and consistent interface.
- Handles various update errors through the UpdateOTAError enumeration.
- Supports firmware and version retrieval from specified URLs.
- Utilizes secure communication through WiFiClientSecure and HTTP requests.
- Provides customizable LED control during the update process.
The UpdateOTA Library depends on the following libraries:
- MultiPrinterLogger @ 4.1.0
- RelayModule @ 4.1.0
- HTTPClient
- WiFi
- WiFiClientSecure
- esp_ota_ops.h
- esp_partition.h
Ensure that these dependencies are correctly configured in your project.
Method 1: To integrate the UpdateOTA library into your PlatformIO project, follow these steps:
-
Open "platformio.ini," located in the root of your PlatformIO project.
-
Add the following line to the
lib_deps
option under the[env:]
section:
ronny-antoon/UpdateOTA@^7.0.0
- Build your project, and PlatformIO will automatically handle library installation.
Method 2: To use the UpdateOTA library in your Arduino project, follow these steps:
-
Download the latest release from the GitHub repository.
-
In the Arduino IDE, click "Sketch" -> "Include Library" -> "Add .ZIP Library" and select the downloaded
.zip
file. -
Make sure to link your project with the necessary ESP-IDF libraries for NVS support.
Include the UpdateOTA.hpp header file in your project to use the UpdateOTA library. The UpdateOTA class provides methods to initiate firmware updates, retrieve version numbers, and handle update errors. For detailed usage information, refer to the library's source code.
The UpdateOTA Library exposes an abstract class, UpdateOTAInterface, with methods defining the OTA update interface. Refer to the header files in the source code for comprehensive documentation and usage examples.
Explore example sketches in the "examples" directory of the library repository to understand the implementation of OTA updates using UpdateOTA.
This library is provided under the MIT License. You are free to use, modify, and distribute it as needed.
If you'd like to contribute to the Database Library, please follow these guidelines:
- Fork the repository.
- Make your changes and document them.
- Submit a pull request.
This library was created by Ronny Antoon. You can contact me at [[email protected]] for any questions or feedback.
https://registry.platformio.org/libraries/ronny-antoon/UpdateOTA