#ifdef WEBSERVER_ADVANCED #include "src/Globals/TimeZone.h" // ******************************************************************************** // Web Interface config page // ******************************************************************************** void handle_advanced() { checkRAM(F("handle_advanced")); if (!isLoggedIn()) { return; } navMenuIndex = MENU_INDEX_TOOLS; TXBuffer.startStream(); sendHeadandTail_stdtemplate(); int timezone = getFormItemInt(F("timezone")); int dststartweek = getFormItemInt(F("dststartweek")); int dststartdow = getFormItemInt(F("dststartdow")); int dststartmonth = getFormItemInt(F("dststartmonth")); int dststarthour = getFormItemInt(F("dststarthour")); int dstendweek = getFormItemInt(F("dstendweek")); int dstenddow = getFormItemInt(F("dstenddow")); int dstendmonth = getFormItemInt(F("dstendmonth")); int dstendhour = getFormItemInt(F("dstendhour")); String edit = web_server.arg(F("edit")); if (edit.length() != 0) { // Settings.MessageDelay_unused = getFormItemInt(F("messagedelay")); Settings.IP_Octet = web_server.arg(F("ip")).toInt(); strncpy_webserver_arg(Settings.NTPHost, F("ntphost")); Settings.TimeZone = timezone; TimeChangeRule dst_start(dststartweek, dststartdow, dststartmonth, dststarthour, timezone); if (dst_start.isValid()) { Settings.DST_Start = dst_start.toFlashStoredValue(); } TimeChangeRule dst_end(dstendweek, dstenddow, dstendmonth, dstendhour, timezone); if (dst_end.isValid()) { Settings.DST_End = dst_end.toFlashStoredValue(); } str2ip(web_server.arg(F("syslogip")).c_str(), Settings.Syslog_IP); Settings.UDPPort = getFormItemInt(F("udpport")); Settings.SyslogFacility = getFormItemInt(F("syslogfacility")); Settings.UseSerial = isFormItemChecked(F("useserial")); setLogLevelFor(LOG_TO_SYSLOG, getFormItemInt(getInternalLabel(LabelType::SYSLOG_LOG_LEVEL))); setLogLevelFor(LOG_TO_SERIAL, getFormItemInt(getInternalLabel(LabelType::SERIAL_LOG_LEVEL))); setLogLevelFor(LOG_TO_WEBLOG, getFormItemInt(getInternalLabel(LabelType::WEB_LOG_LEVEL))); #ifdef FEATURE_SD setLogLevelFor(LOG_TO_SDCARD, getFormItemInt(getInternalLabel(LabelType::SD_LOG_LEVEL))); #endif // ifdef FEATURE_SD Settings.UseValueLogger = isFormItemChecked(F("valuelogger")); Settings.BaudRate = getFormItemInt(F("baudrate")); Settings.UseNTP = isFormItemChecked(F("usentp")); Settings.DST = isFormItemChecked(F("dst")); Settings.WDI2CAddress = getFormItemInt(F("wdi2caddress")); #ifdef USES_SSDP Settings.UseSSDP = isFormItemChecked(F("usessdp")); #endif // USES_SSDP Settings.WireClockStretchLimit = getFormItemInt(F("wireclockstretchlimit")); Settings.UseRules = isFormItemChecked(F("userules")); Settings.ConnectionFailuresThreshold = getFormItemInt(F("cft")); Settings.ArduinoOTAEnable = isFormItemChecked(F("arduinootaenable")); Settings.UseRTOSMultitasking = isFormItemChecked(F("usertosmultitasking")); // MQTT settings now moved to the controller settings. // Settings.MQTTRetainFlag_unused = isFormItemChecked(F("mqttretainflag")); // Settings.MQTTUseUnitNameAsClientId = isFormItemChecked(F("mqttuseunitnameasclientid")); // Settings.uniqueMQTTclientIdReconnect(isFormItemChecked(F("uniquemqttclientidreconnect"))); Settings.Latitude = getFormItemFloat(F("latitude")); Settings.Longitude = getFormItemFloat(F("longitude")); Settings.OldRulesEngine(isFormItemChecked(F("oldrulesengine"))); Settings.TolerantLastArgParse(isFormItemChecked(F("tolerantargparse"))); Settings.SendToHttp_ack(isFormItemChecked(F("sendtohttp_ack"))); Settings.ForceWiFi_bg_mode(isFormItemChecked(getInternalLabel(LabelType::FORCE_WIFI_BG))); Settings.WiFiRestart_connection_lost(isFormItemChecked(getInternalLabel(LabelType::RESTART_WIFI_LOST_CONN))); Settings.EcoPowerMode(isFormItemChecked(getInternalLabel(LabelType::CPU_ECO_MODE))); Settings.WifiNoneSleep(isFormItemChecked(getInternalLabel(LabelType::FORCE_WIFI_NOSLEEP))); #ifdef SUPPORT_ARP Settings.gratuitousARP(isFormItemChecked(getInternalLabel(LabelType::PERIODICAL_GRAT_ARP))); #endif // ifdef SUPPORT_ARP addHtmlError(SaveSettings()); if (node_time.systemTimePresent()) { node_time.initTime(); } } addHtml(F("