ESP32 library for automatic OTA updates from a remote server
See the codeOTA client for ESP32 with the Arduino framework.
Managed OTA updates through the Otamatic platform: the device periodically checks for a new firmware version and, when available, downloads and installs it automatically.
Client (Wi-Fi, Ethernet, GSM — HTTP or HTTPS)Devices can be easily managed through the Otamatic platform at www.otamatic.eu, which lets you set up and manage your devices fleet in less than 5 minutes.
It offers advanced features, including:
OtamaticClient is available both in the Arduino Library Manager and in the PlatformIO Library Registry.
Open Sketch → Include Library → Manage Libraries..., search for OtamaticClient by Timothy Franceschi (TimothyFran) and click Install (with the latest version selected).
Add it to the lib_deps section of your platformio.ini:
[env:esp32dev]
platform = espressif32
framework = arduino
lib_deps = timothyfran/OtamaticClient @ ^0.4.0
or install it from the PlatformIO Home → Libraries panel by searching for OtamaticClient.
OtamaticClient is transport agnostic: it implements plain HTTP/1.1 on top of any Client implementation, so it works over Wi-Fi, Ethernet, GSM, in both HTTP and HTTPS (depending on the client class you pass in).
The transport is attached with setClient() and can be re-bound at runtime (e.g. after a network change) without losing any configuration.
#include <Arduino.h>
#include <OtamaticClient.h>
#include <WiFi.h>
#define FIRMWARE_VERSION 1
WiFiClient httpClient; // HTTP over Wi-Fi
// WiFiClientSecure httpClient; // HTTPS over Wi-Fi (setCABundle/setInsecure)
// EthernetClient httpClient; // HTTP over Ethernet (Arduino Ethernet)
// TinyGsmClient httpClient(modem); // HTTP over GSM/LTE (TinyGSM)
OtamaticClient ota;
void setup() {
// ... connect your network first ...
ota.setClient(&httpClient);
ota.begin(FIRMWARE_VERSION, "your-otamatic-service-key");
}
void loop() {
ota.loop();
}
That's it: the device now checks for updates every 5 minutes and applies them automatically (rebooting when done).
src/*.h headers and the extras folder for the full API documentation.This project is licensed under the Business Source License 1.1 (SPDX: BUSL-1.1) — see the LICENSE file.
You CAN
You CANNOT
These restrictions only apply if you are competing directly with the Licensor's own managed OTA offering. If in doubt, contact us.
For commercial licensing, contact the Licensor: Timothy Franceschi [email protected].
ESP32 library for automatic OTA updates from a remote server
See the codeOTA client for ESP32 with the Arduino framework.
Managed OTA updates through the Otamatic platform: the device periodically checks for a new firmware version and, when available, downloads and installs it automatically.
Client (Wi-Fi, Ethernet, GSM — HTTP or HTTPS)Devices can be easily managed through the Otamatic platform at www.otamatic.eu, which lets you set up and manage your devices fleet in less than 5 minutes.
It offers advanced features, including:
OtamaticClient is available both in the Arduino Library Manager and in the PlatformIO Library Registry.
Open Sketch → Include Library → Manage Libraries..., search for OtamaticClient by Timothy Franceschi (TimothyFran) and click Install (with the latest version selected).
Add it to the lib_deps section of your platformio.ini:
[env:esp32dev]
platform = espressif32
framework = arduino
lib_deps = timothyfran/OtamaticClient @ ^0.4.0
or install it from the PlatformIO Home → Libraries panel by searching for OtamaticClient.
OtamaticClient is transport agnostic: it implements plain HTTP/1.1 on top of any Client implementation, so it works over Wi-Fi, Ethernet, GSM, in both HTTP and HTTPS (depending on the client class you pass in).
The transport is attached with setClient() and can be re-bound at runtime (e.g. after a network change) without losing any configuration.
#include <Arduino.h>
#include <OtamaticClient.h>
#include <WiFi.h>
#define FIRMWARE_VERSION 1
WiFiClient httpClient; // HTTP over Wi-Fi
// WiFiClientSecure httpClient; // HTTPS over Wi-Fi (setCABundle/setInsecure)
// EthernetClient httpClient; // HTTP over Ethernet (Arduino Ethernet)
// TinyGsmClient httpClient(modem); // HTTP over GSM/LTE (TinyGSM)
OtamaticClient ota;
void setup() {
// ... connect your network first ...
ota.setClient(&httpClient);
ota.begin(FIRMWARE_VERSION, "your-otamatic-service-key");
}
void loop() {
ota.loop();
}
That's it: the device now checks for updates every 5 minutes and applies them automatically (rebooting when done).
src/*.h headers and the extras folder for the full API documentation.This project is licensed under the Business Source License 1.1 (SPDX: BUSL-1.1) — see the LICENSE file.
You CAN
You CANNOT
These restrictions only apply if you are competing directly with the Licensor's own managed OTA offering. If in doubt, contact us.
For commercial licensing, contact the Licensor: Timothy Franceschi [email protected].