mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
show network hostname in webui
This commit is contained in:
@@ -19,9 +19,11 @@ void NetworkStatus::networkStatus(AsyncWebServerRequest * request) {
|
||||
|
||||
// see if Ethernet is connected
|
||||
if (ethernet_connected) {
|
||||
root["status"] = 10; // custom code #10 - ETHERNET_STATUS_CONNECTED
|
||||
root["status"] = 10; // custom code #10 - ETHERNET_STATUS_CONNECTED
|
||||
root["hostname"] = ETH.getHostname();
|
||||
} else {
|
||||
root["status"] = (uint8_t)wifi_status;
|
||||
root["status"] = (uint8_t)wifi_status;
|
||||
root["hostname"] = WiFi.getHostname();
|
||||
}
|
||||
|
||||
// for both connections show ethernet
|
||||
|
||||
Reference in New Issue
Block a user