Hopefully added auto reconnect
This commit is contained in:
parent
5d19f4ef74
commit
d9f8f56c20
@ -14,7 +14,7 @@ board = esp32dev
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
upload_protocol = espota
|
upload_protocol = espota
|
||||||
upload_port = gartenwasser_vorn.local
|
upload_port = gartenwasser_hinten.local
|
||||||
build_flags = -D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
|
build_flags = -D CONFIG_ASYNC_TCP_MAX_ACK_TIME=5000
|
||||||
-D CONFIG_ASYNC_TCP_PRIORITY=10
|
-D CONFIG_ASYNC_TCP_PRIORITY=10
|
||||||
-D CONFIG_ASYNC_TCP_QUEUE_SIZE=64
|
-D CONFIG_ASYNC_TCP_QUEUE_SIZE=64
|
||||||
|
|||||||
@ -229,12 +229,20 @@ void MQTT::begin(){
|
|||||||
wm.setHttpPort(8080);
|
wm.setHttpPort(8080);
|
||||||
wm.startWebPortal();
|
wm.startWebPortal();
|
||||||
wifiConnected = true;
|
wifiConnected = true;
|
||||||
}
|
}else{
|
||||||
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();
|
wm.startWebPortal();
|
||||||
Serial.println("non blocking config portal running on Port 80");
|
Serial.println("non blocking config portal running on Port 80");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(wifiConnected){
|
if(wifiConnected){
|
||||||
setenv("TZ", TZ_INFO, 1); // Zeitzone muss nach dem reset neu eingestellt werden
|
setenv("TZ", TZ_INFO, 1); // Zeitzone muss nach dem reset neu eingestellt werden
|
||||||
tzset();
|
tzset();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user