Hopefully added auto reconnect
This commit is contained in:
parent
5d19f4ef74
commit
d9f8f56c20
@ -14,7 +14,7 @@ board = esp32dev
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
upload_protocol = espota
|
||||
upload_port = gartenwasser_vorn.local
|
||||
upload_port = gartenwasser_hinten.local
|
||||
build_flags = -D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
|
||||
-D CONFIG_ASYNC_TCP_PRIORITY=10
|
||||
-D CONFIG_ASYNC_TCP_QUEUE_SIZE=64
|
||||
|
||||
@ -229,11 +229,19 @@ void MQTT::begin(){
|
||||
wm.setHttpPort(8080);
|
||||
wm.startWebPortal();
|
||||
wifiConnected = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
wm.startWebPortal();
|
||||
Serial.println("non blocking config portal running on Port 80");
|
||||
}else{
|
||||
delay(5000);
|
||||
if(wm.autoConnect("AutoConnectAP")){
|
||||
//if you get here you have connected to the WiFi
|
||||
Serial.println("connected...yeey :)");
|
||||
strcpy(myIP,WiFi.localIP().toString().c_str());
|
||||
wm.setHttpPort(8080);
|
||||
wm.startWebPortal();
|
||||
wifiConnected = true;
|
||||
}else{
|
||||
wm.startWebPortal();
|
||||
Serial.println("non blocking config portal running on Port 80");
|
||||
}
|
||||
}
|
||||
if(wifiConnected){
|
||||
setenv("TZ", TZ_INFO, 1); // Zeitzone muss nach dem reset neu eingestellt werden
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user