From 4c186606bd28e4659692de3fdd5aacfa0c3bd68e Mon Sep 17 00:00:00 2001 From: Proddy Date: Sun, 26 Feb 2023 19:16:53 +0100 Subject: [PATCH] hide MAC and IPs --- src/system.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/system.cpp b/src/system.cpp index 2ec6cbc1e..bfec6712f 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -541,15 +541,18 @@ void System::send_info_mqtt(const char * event_str, bool send_ntp) { #ifndef EMSESP_STANDALONE if (EMSESP::system_.ethernet_connected()) { - doc["network"] = "ethernet"; - doc["hostname"] = ETH.getHostname(); + doc["network"] = "ethernet"; + doc["hostname"] = ETH.getHostname(); + /* doc["MAC"] = ETH.macAddress(); doc["IPv4 address"] = uuid::printable_to_string(ETH.localIP()) + "/" + uuid::printable_to_string(ETH.subnetMask()); doc["IPv4 gateway"] = uuid::printable_to_string(ETH.gatewayIP()); doc["IPv4 nameserver"] = uuid::printable_to_string(ETH.dnsIP()); if (ETH.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") { doc["IPv6 address"] = uuid::printable_to_string(ETH.localIPv6()); - } + } + */ + } else if (WiFi.status() == WL_CONNECTED) { doc["network"] = "wifi"; doc["hostname"] = WiFi.getHostname();