GitXplorerGitXplorer
s

ESP-WebOTA

public
289 stars
40 forks
11 issues

Commits

List of commits on branch master.
Unverified
5f7f7f72d21378f5b0c814e9a33c451563a291e0

Update the properties file so the linter is happier

sscottchiefbaker committed 9 months ago
Unverified
294ba8b385cdfd555e7d15819cc8a7d1aead97ce

Rename appropriately

sscottchiefbaker committed 9 months ago
Unverified
3f3001233840f36917a09e5db8fed565c8b2eb70

Fix the library name so the linter is happy

sscottchiefbaker committed 9 months ago
Unverified
298bf9f5611713e2a0076b000bf790dc0d810b98

Add authentication example to the README

sscottchiefbaker committed 10 months ago
Unverified
63839ab84de620377fff1ab6b52922a448e606e8

Add an auth example

sscottchiefbaker committed 10 months ago
Unverified
9fbd3e6c3886053592d3a683f3885b22c805b06f

Add support for the ESP8266 webserver

sscottchiefbaker committed 10 months ago

README

The README file for this repository.

ESP WebOTA

Easily add web based OTA 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 <WebOTA.h>

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 here

    webota.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 "file=@MyImage.bin" http://esp-ota.local:8080/webota

Based on

Borrowed from randomnerdtutorials.com and improved upon.