Skip to content

Instantly share code, notes, and snippets.

View DeanCording's full-sized avatar

Dean Cording DeanCording

  • Queensland, Australia
  • 10:47 (UTC +10:00)
View GitHub Profile
@DeanCording
DeanCording / README.md
Last active December 4, 2021 07:31
ESP8266 OTA Firmware Upgrade Manager

This flow provides a tool for managing Over The Air firmware updates for ESP8266 Wifi SoC modules running the Arduino ESP8266 environment. It also supports Sonoff devices running the Tasmota firmware.

The ESP8266 is a very small, cheap, and reasonably powerful microcontroller with integrated WiFi. The OTA firmware upgrade process allows you to install these modules in location and have them automatically upgrade their firmware over WiFi.

The OTA upgrade library contacts a specified URL and passes the name and MD5 hash of the module's current firmware. This server implemented in this flow will compare the supplied MD5 hash against the one for the latest firmware and, if different, send the new firmware to the module. The server will uses either the module's MAC address or firmware name to identify the correct firmware file to send. The firmware can be specified in either the request URL or in the x-esp8266-version property in the

@DeanCording
DeanCording / Template_ESP8266.ino
Last active April 29, 2023 03:23
ESP8266 Arduino project template with optional OTA firmware update
/**
* ESP8266 project template with optional:
* - WiFi config portal - auto or manual trigger
* - OTA update - Arduino or web server
* - Deep sleep
* - Process timeout watchdog
*
* Copyright (c) 2016 Dean Cording <dean@cording.id.au>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy