mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
disable bluetooth, show IPv6 in web, mqtt and console
This commit is contained in:
@@ -640,8 +640,14 @@ void Mqtt::on_connect() {
|
||||
#ifndef EMSESP_STANDALONE
|
||||
if (EMSESP::system_.ethernet_connected()) {
|
||||
doc["ip"] = ETH.localIP().toString();
|
||||
if (ETH.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") {
|
||||
doc["ipv6"] = ETH.localIPv6().toString();
|
||||
}
|
||||
} else {
|
||||
doc["ip"] = WiFi.localIP().toString();
|
||||
if (WiFi.localIPv6().toString() != "0000:0000:0000:0000:0000:0000:0000:0000") {
|
||||
doc["ipv6"] = WiFi.localIPv6().toString();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
publish(F_(info), doc.as<JsonObject>()); // topic called "info"
|
||||
|
||||
Reference in New Issue
Block a user