disable bluetooth, show IPv6 in web, mqtt and console

This commit is contained in:
MichaelDvP
2021-07-08 18:56:24 +02:00
parent 2d7449aeba
commit 59913cdc4b
5 changed files with 35 additions and 7 deletions

View File

@@ -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"