|
|
|
@ -54,6 +54,9 @@ void setupWebUpdater(String device, String ip)
|
|
|
|
|
#ifdef DEBUG_WINDSPEED_MEASUREMENT
|
|
|
|
|
httpServer.on("/measWind", measureWindspeed);
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef WEB_RESET
|
|
|
|
|
httpServer.on("/resetESP", resetESP);
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef USE_LOGGER
|
|
|
|
|
httpServer.on("/showlog", showLog);
|
|
|
|
|
#endif
|
|
|
|
@ -125,6 +128,9 @@ void showHTMLMain(void)
|
|
|
|
|
#ifdef HOMEBRIDGE_WEBSTAT
|
|
|
|
|
"<br><a href=\"http://" + _webUpdater_ip + ":8080/hbWebstat\">homebridge websatt</a><br>"
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef WEB_RESET
|
|
|
|
|
"<br><a href=\"http://" + _webUpdater_ip + ":8080/resetESP\">reset ESP</a><br>"
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef SHOW_SENSOR_DATA_ON_WEBUPDATER_MAIN_PAGE
|
|
|
|
|
"<br><br><table>"
|
|
|
|
|
TR_TD_START_STR + "temperature" + TD_TD_MID_STR + String(_webUpdater_sensValues[SENSOR_TEMPERATURE]) + TR_TD_END_STR
|
|
|
|
@ -182,6 +188,27 @@ void hb_webstat_send(void)
|
|
|
|
|
|
|
|
|
|
//*************************************************************************//
|
|
|
|
|
|
|
|
|
|
#ifdef WEB_RESET
|
|
|
|
|
|
|
|
|
|
void resetESP()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
String message = "<html><head><title>OKO Weatherstation - " + String(_webUpdater_dev) + " - reset WiFi manager</title>"
|
|
|
|
|
"<meta http-equiv=\"refresh\" content=\"20\">"
|
|
|
|
|
"</head><body>"
|
|
|
|
|
"Rebooting...<br>"
|
|
|
|
|
"</body></html>";
|
|
|
|
|
|
|
|
|
|
httpServer.send(200, "text/html", message);
|
|
|
|
|
|
|
|
|
|
delay(5000);
|
|
|
|
|
|
|
|
|
|
// manual reset after restart is required
|
|
|
|
|
ESP.restart();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef DISABLE_WIFIMANAGER
|
|
|
|
|
|
|
|
|
|
void resetWifiManager()
|
|
|
|
|