From 79285489d73e9ff2fc1443e0d55b77557e572bf8 Mon Sep 17 00:00:00 2001 From: Chrome Legion Date: Sun, 25 Nov 2018 17:32:41 -0700 Subject: [PATCH] Qrome - added ability to update firmware from web interface --- printermonitor/Settings.h | 1 + printermonitor/printermonitor.ino | 3 +++ 2 files changed, 4 insertions(+) diff --git a/printermonitor/Settings.h b/printermonitor/Settings.h index 5bf439c..3b5d478 100644 --- a/printermonitor/Settings.h +++ b/printermonitor/Settings.h @@ -40,6 +40,7 @@ SOFTWARE. #include #include #include +#include #include "TimeClient.h" #include "OctoPrintClient.h" #include "OpenWeatherMapClient.h" diff --git a/printermonitor/printermonitor.ino b/printermonitor/printermonitor.ino index 1f662f9..fb4bb09 100644 --- a/printermonitor/printermonitor.ino +++ b/printermonitor/printermonitor.ino @@ -95,12 +95,14 @@ void configModeCallback (WiFiManager *myWiFiManager); int8_t getWifiQuality(); ESP8266WebServer server(WEBSERVER_PORT); +ESP8266HTTPUpdateServer serverUpdater; String WEB_ACTIONS = " Home" " Configure" " Weather" " Reset Settings" " Forget WiFi" + " Firmware Update" " About"; String CHANGE_FORM = "

Station Config:

" @@ -263,6 +265,7 @@ void setup() { server.on("/configure", handleConfigure); server.on("/configureweather", handleWeatherConfigure); server.onNotFound(redirectHome); + serverUpdater.setup(&server, "/update", www_username, www_password); // Start the server server.begin(); Serial.println("Server started");