mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
@@ -1017,7 +1017,6 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
|
|||||||
#endif
|
#endif
|
||||||
node["reset reason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);
|
node["reset reason"] = EMSESP::system_.reset_reason(0) + " / " + EMSESP::system_.reset_reason(1);
|
||||||
|
|
||||||
|
|
||||||
#ifndef EMSESP_STANDALONE
|
#ifndef EMSESP_STANDALONE
|
||||||
// Network Status
|
// Network Status
|
||||||
node = output.createNestedObject("Network Status");
|
node = output.createNestedObject("Network Status");
|
||||||
@@ -1058,15 +1057,18 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
|
|||||||
node["low bandwidth"] = settings.bandwidth20;
|
node["low bandwidth"] = settings.bandwidth20;
|
||||||
node["disable sleep"] = settings.nosleep;
|
node["disable sleep"] = settings.nosleep;
|
||||||
});
|
});
|
||||||
|
#ifndef EMSESP_STANDALONE
|
||||||
EMSESP::esp8266React.getAPSettingsService()->read([&](APSettings & settings) {
|
EMSESP::esp8266React.getAPSettingsService()->read([&](APSettings & settings) {
|
||||||
const char * pM[] = {"always", "disconnected", "never"};
|
const char * pM[] = {"always", "disconnected", "never"};
|
||||||
node["AP provision mode"] = pM[settings.provisionMode];
|
node["AP provision mode"] = pM[settings.provisionMode];
|
||||||
node["AP security"] = settings.password.length() ? "wpa2" : "open";
|
node["AP security"] = settings.password.length() ? "wpa2" : "open";
|
||||||
node["AP ssid"] = settings.ssid;
|
node["AP ssid"] = settings.ssid;
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
// NTP status
|
// NTP status
|
||||||
node = output.createNestedObject("NTP Status");
|
node = output.createNestedObject("NTP Status");
|
||||||
|
#ifndef EMSESP_STANDALONE
|
||||||
node["network time"] = EMSESP::system_.ntp_connected() ? "connected" : "disconnected";
|
node["network time"] = EMSESP::system_.ntp_connected() ? "connected" : "disconnected";
|
||||||
EMSESP::esp8266React.getNTPSettingsService()->read([&](NTPSettings & settings) {
|
EMSESP::esp8266React.getNTPSettingsService()->read([&](NTPSettings & settings) {
|
||||||
node["enabled"] = settings.enabled;
|
node["enabled"] = settings.enabled;
|
||||||
@@ -1081,6 +1083,7 @@ bool System::command_info(const char * value, const int8_t id, JsonObject & outp
|
|||||||
node["enabled"] = settings.enabled;
|
node["enabled"] = settings.enabled;
|
||||||
node["port"] = settings.port;
|
node["port"] = settings.port;
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
// MQTT Status
|
// MQTT Status
|
||||||
node = output.createNestedObject("MQTT Status");
|
node = output.createNestedObject("MQTT Status");
|
||||||
|
|||||||
Reference in New Issue
Block a user