mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
hide MAC and IPs
This commit is contained in:
@@ -543,6 +543,7 @@ void System::send_info_mqtt(const char * event_str, bool send_ntp) {
|
|||||||
if (EMSESP::system_.ethernet_connected()) {
|
if (EMSESP::system_.ethernet_connected()) {
|
||||||
doc["network"] = "ethernet";
|
doc["network"] = "ethernet";
|
||||||
doc["hostname"] = ETH.getHostname();
|
doc["hostname"] = ETH.getHostname();
|
||||||
|
/*
|
||||||
doc["MAC"] = ETH.macAddress();
|
doc["MAC"] = ETH.macAddress();
|
||||||
doc["IPv4 address"] = uuid::printable_to_string(ETH.localIP()) + "/" + uuid::printable_to_string(ETH.subnetMask());
|
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 gateway"] = uuid::printable_to_string(ETH.gatewayIP());
|
||||||
@@ -550,6 +551,8 @@ void System::send_info_mqtt(const char * event_str, bool send_ntp) {
|
|||||||
if (ETH.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") {
|
if (ETH.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") {
|
||||||
doc["IPv6 address"] = uuid::printable_to_string(ETH.localIPv6());
|
doc["IPv6 address"] = uuid::printable_to_string(ETH.localIPv6());
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
} else if (WiFi.status() == WL_CONNECTED) {
|
} else if (WiFi.status() == WL_CONNECTED) {
|
||||||
doc["network"] = "wifi";
|
doc["network"] = "wifi";
|
||||||
doc["hostname"] = WiFi.getHostname();
|
doc["hostname"] = WiFi.getHostname();
|
||||||
|
|||||||
Reference in New Issue
Block a user