File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 2121#include < ESP8266mDNS.h>
2222#include < ArduinoOTA.h>
2323#include < ESP8266WebServer.h>
24+ #include < ESP8266HTTPUpdateServer.h>
2425#include < EEPROM.h>
2526
2627ESP8266WebServer server (80 );
28+ ESP8266HTTPUpdateServer httpUpdater;
2729
2830// Default SSID and PASSWORD for AP Access Point Mode
2931const char * ssid = " OpenEVSE" ;
@@ -213,7 +215,9 @@ void setup() {
213215 s += st;
214216 s += " <p>" ;
215217 s += " <form method='get' action='a'><label><b><i>WiFi SSID:</b></i></label><input name='ssid' length=32><p><label><b><i>Password :</b></i></label><input name='pass' length=64><p><label><b><i>Device Access Key:</b></i></label><input name='ekey' length=32><p><label><b><i>Node:</b></i></label><select name='node'><option value='0'>0 - Default</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option><option value='6'>6</option><option value='7'>7</option><option value='8'>8</option><option value='9'>9</option></select><p><label><b><i>Ohm Connect Key - Optional:</b></i></label><input name='ohm' length=64><p><input type='submit'></form>" ;
216- s += " <a href='/status'>Status </a><a href='/rapi'>RAPI </a>" ;
218+ s += " <a href='/status'>Status </a><a href='/rapi'>RAPI </a><br><br>" ;
219+ s += " <p><b>Firmware Update</b><p>" ;
220+ s += " <iframe style='width:380px; height:50px;' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='/update'></iframe>" ;
217221 s += " </html>\r\n\r\n " ;
218222 server.send (200 , " text/html" , s);
219223 });
@@ -389,8 +393,10 @@ void setup() {
389393 s += " </html>\r\n\r\n " ;
390394 server.send (200 , " text/html" , s);
391395 });
392-
396+
397+ httpUpdater.setup (&server);
393398 server.begin ();
399+ httpUpdater.setup (&server);
394400 // Serial.println("HTTP server started");
395401 delay (100 );
396402 Timer = millis ();
You can’t perform that action at this time.
0 commit comments