mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Bump application to v2.4.4
This commit is contained in:
parent
5f15a7cc93
commit
2dc49a64e9
5 changed files with 6 additions and 40 deletions
38
Network.cpp
38
Network.cpp
|
|
@ -97,46 +97,13 @@ void Network::loop() {
|
||||||
mqtt.loop();
|
mqtt.loop();
|
||||||
}
|
}
|
||||||
bool Network::changeAP(const uint8_t *bssid, const int32_t channel) {
|
bool Network::changeAP(const uint8_t *bssid, const int32_t channel) {
|
||||||
|
esp_task_wdt_reset(); // Make sure we do not reboot here.
|
||||||
if(SSDP.isStarted) SSDP.end();
|
if(SSDP.isStarted) SSDP.end();
|
||||||
mqtt.disconnect();
|
mqtt.disconnect();
|
||||||
sockEmit.end();
|
sockEmit.end();
|
||||||
WiFi.disconnect(false, true);
|
WiFi.disconnect(false, true);
|
||||||
WiFi.begin(settings.WIFI.ssid, settings.WIFI.passphrase, channel, bssid);
|
WiFi.begin(settings.WIFI.ssid, settings.WIFI.passphrase, channel, bssid);
|
||||||
uint8_t retries = 0;
|
this->connectStart = millis();
|
||||||
while(retries < 100) {
|
|
||||||
esp_task_wdt_reset(); // Make sure we do not reboot here.
|
|
||||||
wl_status_t stat = WiFi.status();
|
|
||||||
if(stat == WL_CONNECTED) {
|
|
||||||
Serial.println("WiFi module connected");
|
|
||||||
this->ssid = WiFi.SSID();
|
|
||||||
this->mac = WiFi.BSSIDstr();
|
|
||||||
this->strength = WiFi.RSSI();
|
|
||||||
this->channel = WiFi.channel();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if(stat == WL_CONNECT_FAILED) {
|
|
||||||
Serial.println("WiFi Module connection failed");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if(stat == WL_NO_SSID_AVAIL) {
|
|
||||||
Serial.println(" Connection failed the SSID ");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if(stat == WL_NO_SHIELD) {
|
|
||||||
Serial.println("Connection failed - WiFi module not found");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if(stat == WL_IDLE_STATUS) {
|
|
||||||
Serial.print("*");
|
|
||||||
}
|
|
||||||
else if(stat == WL_DISCONNECTED) {
|
|
||||||
Serial.print("-");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Serial.printf("Unknown status %d\n", stat);
|
|
||||||
}
|
|
||||||
delay(300);
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void Network::emitSockets() {
|
void Network::emitSockets() {
|
||||||
|
|
@ -467,7 +434,6 @@ bool Network::connectWiFi() {
|
||||||
//WiFi.mode(WIFI_STA);
|
//WiFi.mode(WIFI_STA);
|
||||||
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
|
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
|
||||||
WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL);
|
WiFi.setSortMethod(WIFI_CONNECT_AP_BY_SIGNAL);
|
||||||
this->connectAttempts++;
|
|
||||||
uint8_t bssid[6];
|
uint8_t bssid[6];
|
||||||
int32_t channel = 0;
|
int32_t channel = 0;
|
||||||
if(this->getStrongestAP(settings.WIFI.ssid, bssid, &channel)) {
|
if(this->getStrongestAP(settings.WIFI.ssid, bssid, &channel)) {
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -8,9 +8,9 @@
|
||||||
<meta name="apple-mobile-web-app-title" content="ESPSomfy RTS App">
|
<meta name="apple-mobile-web-app-title" content="ESPSomfy RTS App">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
<link rel="stylesheet" href="main.css?v=2.4.3c" type="text/css" />
|
<link rel="stylesheet" href="main.css?v=2.4.4c" type="text/css" />
|
||||||
<link rel="stylesheet" href="widgets.css?v=2.4.3c" type="text/css" />
|
<link rel="stylesheet" href="widgets.css?v=2.4.4c" type="text/css" />
|
||||||
<link rel="stylesheet" href="icons.css?v=2.4.3c" type="text/css" />
|
<link rel="stylesheet" href="icons.css?v=2.4.4c" type="text/css" />
|
||||||
<link rel="icon" type="image/png" href="favicon.png" />
|
<link rel="icon" type="image/png" href="favicon.png" />
|
||||||
|
|
||||||
<!-- iPad retina icon -->
|
<!-- iPad retina icon -->
|
||||||
|
|
@ -114,7 +114,7 @@
|
||||||
rel="apple-touch-startup-image">
|
rel="apple-touch-startup-image">
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="index.js?v=2.4.3c"></script>
|
<script type="text/javascript" src="index.js?v=2.4.4c"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="divContainer" class="container main" data-auth="false">
|
<div id="divContainer" class="container main" data-auth="false">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue