Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
*fork of the ESP8266 IoT Framework by maakbaas with small change to allow Espalexa[https://github.com/Aircoookie/Espalexa.git] integration.*

## Using the changes

You can now initialise the onNotFound within your main code like below and also check if the incoming requests are for the Espalexa.

```ini
GUI.server.onNotFound([](AsyncWebServerRequest *request)
{
if (!espalexa.handleAlexaApiCall(request)) //if you don't know the URI, ask espalexa whether it is an Alexa control request
{
GUI.serveProgmem(request);
}
});
```
# ESP8266 IoT Framework ![Status](https://travis-ci.com/maakbaas/esp8266-iot-framework.svg?branch=master)

The ESP8266 IoT Framework is a set of modules to be used as a starting point in new ESP8266 projects, implementing HTTPS requests, a React web interface, WiFi manager, configuration manager, live dashboard and OTA updates.
Expand Down
2 changes: 1 addition & 1 deletion src/webServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void webServer::begin()

server.serveStatic("/download", LittleFS, "/");

server.onNotFound(serveProgmem);
// server.onNotFound(serveProgmem);

//handle uploads
server.on(PSTR("/upload"), HTTP_POST, [](AsyncWebServerRequest *request) {}, handleFileUpload);
Expand Down
3 changes: 2 additions & 1 deletion src/webServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ class webServer

private:
static void handleFileUpload(AsyncWebServerRequest *request, String filename, size_t index, uint8_t *data, size_t len, bool final);
static void serveProgmem(AsyncWebServerRequest *request);
// static void serveProgmem(AsyncWebServerRequest *request);
void bindAll();

public:
AsyncWebServer server = AsyncWebServer(80);
AsyncWebSocket ws = AsyncWebSocket("/ws");
static void serveProgmem(AsyncWebServerRequest *request);
void begin();
};

Expand Down