Updated WiFifix
This commit is contained in:
parent
f7a9223b9d
commit
43859b5b96
|
@ -106,7 +106,12 @@ void fixWiFi() {
|
||||||
Homie.getLogger() << "Connectivity in problematic state --> " << problemCause << "/n This remained for 2 minutes. Disconnecting WiFi to start over." << endl;
|
Homie.getLogger() << "Connectivity in problematic state --> " << problemCause << "/n This remained for 2 minutes. Disconnecting WiFi to start over." << endl;
|
||||||
problemDetected = 0;
|
problemDetected = 0;
|
||||||
problemCause = "";
|
problemCause = "";
|
||||||
WiFi.disconnect();
|
if (WiFi.status() != 0) {
|
||||||
|
WiFi.disconnect();
|
||||||
|
}
|
||||||
|
else if (WiFi.status() == 0) {
|
||||||
|
WiFi.begin();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (problemCount != 0 && Homie.getMqttClient().connected() || WiFi.status() == 3) {
|
else if (problemCount != 0 && Homie.getMqttClient().connected() || WiFi.status() == 3) {
|
||||||
|
@ -145,4 +150,4 @@ void loop() {
|
||||||
door.tick();
|
door.tick();
|
||||||
lock.tick();
|
lock.tick();
|
||||||
fixWiFi();
|
fixWiFi();
|
||||||
}
|
}
|
Loading…
Reference in New Issue