fix inital printing of IP address

This commit is contained in:
technyon
2024-07-07 14:08:24 +02:00
parent 53243fe045
commit da0390df63
6 changed files with 12 additions and 25 deletions

View File

@@ -380,7 +380,8 @@ bool NukiNetwork::update()
break;
case ReconnectStatus::Success:
memset(WiFi_fallbackDetect, 0, sizeof(WiFi_fallbackDetect));
Log->println(F("Reconnect successful"));
Log->print(F("Reconnect successful: IP: "));
Log->println(_device->localIP());
break;
case ReconnectStatus::Failure:
Log->println(F("Reconnect failed"));
@@ -388,6 +389,13 @@ bool NukiNetwork::update()
}
}
if(_logIp && device()->isConnected() && !_device->localIP().equals("0.0.0.0"))
{
_logIp = false;
Log->print(F("IP: "));
Log->println(_device->localIP());
}
if(!_device->mqttConnected() && _device->isConnected())
{
if(_networkTimeout > 0 && (ts - _lastConnectedTs > _networkTimeout * 1000) && ts > 60000)