Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scottchiefbaker/esp-webota
Simple web based Over-the-Air (OTA) updates for ESP based projects
https://github.com/scottchiefbaker/esp-webota
arduino-library esp esp32 esp32-arduino esp8266 esp8266-arduino ota
Last synced: 5 days ago
JSON representation
Simple web based Over-the-Air (OTA) updates for ESP based projects
- Host: GitHub
- URL: https://github.com/scottchiefbaker/esp-webota
- Owner: scottchiefbaker
- License: mit
- Created: 2019-03-14T03:43:01.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-18T23:44:19.000Z (about 1 year ago)
- Last Synced: 2025-01-20T20:14:27.948Z (13 days ago)
- Topics: arduino-library, esp, esp32, esp32-arduino, esp8266, esp8266-arduino, ota
- Language: C++
- Homepage:
- Size: 55.7 KB
- Stars: 315
- Watchers: 14
- Forks: 41
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESP WebOTA
Easily add web based [OTA](https://en.wikipedia.org/wiki/Over-the-air_programming) updates to your ESP32/ESP8266 projects.
## Installation
Clone this repo to your Arduino libraries directory. On Linux this is `~/Arduino/libraries/`
## Usage
Include the WebOTA library
#include
Optionally initialize the WebOTA library if you want to change the defaults. This is done at the end of your `setup()` function:
void setup() {
// Other init code here (WiFi, etc)// To use a specific port and path uncomment this line
// Defaults are 8080 and "/webota"
// webota.init(8888, "/update");// If you call useAuth() in your setup function WebOTA will use
// HTTP digest authentication to request credentials from the user
// before allowing uploads
// webota.useAuth("username", "password");
}Listen for update requests at the end of your `loop()` function:
void loop() {
// Other loop code herewebota.handle();
}**Note:** If you have long `delay()` commands in your `loop()` WebOTA may not be responsive. We have provided `webota.delay()` as a drop-in replacement, which is more WebOTA friendly.
## Upload a sketch
You will need to create a binary sketch image to upload. This is done in the Arduino IDE by going to the `Sketch` menu and selecting `Export compiled Binary`.
Navigate to your ESP in a web browser to upload your binary image. Typical URLs are: http://esp-ota.local:8080/webota.
You can also use Curl if you want to script your uploads from the CLI
curl -F "[email protected]" http://esp-ota.local:8080/webota
## Based on
Borrowed from [randomnerdtutorials.com](https://randomnerdtutorials.com/esp32-over-the-air-ota-programming/) and improved upon.