Skip to content
Experiments in firmware OTA updates for ESP32 dev boards
Branch: master
Clone or download
chrisjoyce911 Merge pull request #5 from rljonesau/execHTTPcheck_bugfix
return false added to execHTTPcheck for when connection test fails
Latest commit 752cc70 Jun 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github getting ready to convert to libary Dec 9, 2018
examples Make sketch filename case match folder name May 8, 2019
.gitignore Final changes for first release Dec 10, 2018
LICENSE Initial commit Dec 8, 2018 Updated Readme Dec 10, 2018
keywords.txt Final changes for first release Dec 10, 2018
library.json Fixed error with checkURL Jan 5, 2019

esp32FOTA library for Arduino


A simple library to add support for Over-The-Air (OTA) updates to your project.


  • Web update (requires web server)
  • Batch firmware sync
  • Multi firmware update record
  • Stream update (e.g. MQTT or other)

How it works

This library tries to access a JSON file hosted on a webserver, and reviews it to decide if a newer firmware has been published, if so it will download it and install it.

There are a few things that need to be inplace for an update to work.

  • A webserver with the firmware information in a JSON file
  • Firmware version
  • Firmware type
  • Firmware bin


Hosted JSON

This is hosted by a webserver and contains information about the latest firmware

    "type": "esp32-fota-http",
    "version": 2,
    "host": "",
    "port": 80,
    "bin": "/fota/esp32-fota-http-2.bin"

Firemare types

Types are used to compare with the current loaded firmware, this is used to make sure that when loaded the devie will still to the intended job.

As an example a device used as a data logger should ony be updated with new versions of the data logger.

  • TTGO-T8-ESP32-Logger
  • TTGO-T8-ESP32-Temp
  • TTGO-T8-ESP32-Relay


In this example a version 1 of 'esp32-fota-http' is in use, it would be updated when using the JSON example.

#include <esp32fota.h>
#include <WiFi.h>

const char *ssid = "";
const char *password = "";

esp32FOTA esp32FOTA("esp32-fota-http", 1);

void setup()
  esp32FOTA.checkURL = "http://server/fota/fota.json";

void setup_wifi()
  Serial.print("Connecting to ");
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED)

void loop()
  bool updatedNeeded = esp32FOTA.execHTTPcheck();
  if (updatedNeeded)
You can’t perform that action at this time.