Go to file
2019-03-17 17:58:55 -07:00
examples Update the example hostnames 2019-03-17 16:54:43 -07:00
src Use some defines to target both ESP32 and ESP8266 2019-03-16 09:35:25 -07:00
.gitignore Ignore Makefiles and *.bin 2019-03-13 22:03:02 -07:00
library.properties Update the README to reflect the new methods 2019-03-17 17:58:55 -07:00
LICENSE Initial commit 2019-03-13 20:43:02 -07:00
README.md Update the README to reflect the new methods 2019-03-17 17:58:55 -07:00

ESP WebOTA

Easily add web based OTA updates to your ESP32 projects.

Installation

Clone this repo to your Arduino libraries directory. On Linux this is ~/Arduino/libraries/

Usage

Include the WebOTA library

#include <WebOTA.h>
WebServer OTAServer(8080);

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)

	// The defaults are 8080 and "/webota"
	// if you omit init_web_ota() it will use the defaults
    init_web_ota(8888, "/update");
}

Listen for update requests at the end of your loop() function:

void loop() {
    // Other loop code here

	handle_webota();
}

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 ESP32 in a web browser to upload your binary image. Typical URLs are: http://esp32-ota.local:8080/webota.

Based on

Borrowed from randomnerdtutorials.com and improved upon.