mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-04-29 20:15:13 +00:00
sync with core3 features
This commit is contained in:
@@ -491,6 +491,8 @@ void WebSettings::set_board_profile(WebSettings & settings) {
|
||||
settings.board_profile = "S2MINI";
|
||||
#elif CONFIG_IDF_TARGET_ESP32S3
|
||||
settings.board_profile = "S32S3"; // BBQKees Gateway S3
|
||||
#elif CONFIG_IDF_TARGET_ESP32C6
|
||||
settings.board_profile = "CUSTOM";
|
||||
#endif
|
||||
// apply the new board profile setting
|
||||
System::load_board_profile(data, settings.board_profile.c_str());
|
||||
|
||||
@@ -310,26 +310,24 @@ void WebStatusService::allvalues(JsonObject output) {
|
||||
// action = export
|
||||
// returns data for a specific feature/settings as a json object
|
||||
bool WebStatusService::exportData(JsonObject root, std::string & type) {
|
||||
root["type"] = type;
|
||||
|
||||
if (type == "settings") {
|
||||
JsonObject node = root["System"].to<JsonObject>();
|
||||
node["version"] = EMSESP_APP_VERSION;
|
||||
System::extractSettings(NETWORK_SETTINGS_FILE, "Network", root);
|
||||
System::extractSettings(AP_SETTINGS_FILE, "AP", root);
|
||||
System::extractSettings(MQTT_SETTINGS_FILE, "MQTT", root);
|
||||
System::extractSettings(NTP_SETTINGS_FILE, "NTP", root);
|
||||
System::extractSettings(SECURITY_SETTINGS_FILE, "Security", root);
|
||||
System::extractSettings(EMSESP_SETTINGS_FILE, "Settings", root);
|
||||
root["type"] = type; // add settings as a group
|
||||
System::exportSettings(type, NETWORK_SETTINGS_FILE, root);
|
||||
System::exportSettings(type, AP_SETTINGS_FILE, root);
|
||||
System::exportSettings(type, MQTT_SETTINGS_FILE, root);
|
||||
System::exportSettings(type, NTP_SETTINGS_FILE, root);
|
||||
System::exportSettings(type, SECURITY_SETTINGS_FILE, root);
|
||||
System::exportSettings(type, EMSESP_SETTINGS_FILE, root);
|
||||
} else if (type == "schedule") {
|
||||
System::extractSettings(EMSESP_SCHEDULER_FILE, "Schedule", root);
|
||||
System::exportSettings(type, EMSESP_SCHEDULER_FILE, root);
|
||||
} else if (type == "customizations") {
|
||||
System::extractSettings(EMSESP_CUSTOMIZATION_FILE, "Customizations", root);
|
||||
System::exportSettings(type, EMSESP_CUSTOMIZATION_FILE, root);
|
||||
} else if (type == "entities") {
|
||||
System::extractSettings(EMSESP_CUSTOMENTITY_FILE, "Entities", root);
|
||||
System::exportSettings(type, EMSESP_CUSTOMENTITY_FILE, root);
|
||||
} else if (type == "allvalues") {
|
||||
root.clear(); // don't need the "type" key added to the output
|
||||
allvalues(root);
|
||||
} else if (type == "systembackup") {
|
||||
System::exportSystemBackup(root);
|
||||
} else {
|
||||
return false; // error
|
||||
}
|
||||
@@ -367,7 +365,7 @@ bool WebStatusService::getCustomSupport(JsonObject root) {
|
||||
#endif
|
||||
|
||||
#if defined(EMSESP_DEBUG)
|
||||
EMSESP::logger().debug("Showing custom support page");
|
||||
EMSESP::logger().debug("Sending custom support page");
|
||||
#endif
|
||||
|
||||
root.set(doc.as<JsonObject>()); // add to web response root object
|
||||
|
||||
Reference in New Issue
Block a user