diff --git a/examples/mqttRSSI/mqttRSSI.ino b/examples/mqttRSSI/mqttRSSI.ino index 668617f..3052261 100644 --- a/examples/mqttRSSI/mqttRSSI.ino +++ b/examples/mqttRSSI/mqttRSSI.ino @@ -114,7 +114,7 @@ static const char AUX_mqtt_setting[] PROGMEM = R"raw( "type": "ACInput", "value": "", "label": "ESP host name", - "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-])*[a-zA-Z0-9]){1,32}$" + "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9-])*[a-zA-Z0-9]){1,24}$" }, { "name": "save", @@ -184,7 +184,7 @@ bool mqttConnect() { "abcdefghijklmnopqrstuvwxyz"; // For random generation of client ID. char clientId[9]; - uint8_t retry = 10; + uint8_t retry = 3; while (!mqttClient.connected()) { if (serverName.length() <= 0) break; @@ -205,8 +205,8 @@ bool mqttConnect() { Serial.println("Connection failed:" + String(mqttClient.state())); if (!--retry) break; + delay(3000); } - delay(3000); } return false; } diff --git a/examples/mqttRSSI_FS/mqttRSSI_FS.ino b/examples/mqttRSSI_FS/mqttRSSI_FS.ino index e61ff17..9a3ac21 100644 --- a/examples/mqttRSSI_FS/mqttRSSI_FS.ino +++ b/examples/mqttRSSI_FS/mqttRSSI_FS.ino @@ -66,7 +66,7 @@ bool mqttConnect() { "abcdefghijklmnopqrstuvwxyz"; // For random generation of client ID. char clientId[9]; - uint8_t retry = 10; + uint8_t retry = 3; while (!mqttClient.connected()) { if (serverName.length() <= 0) break; @@ -86,8 +86,8 @@ bool mqttConnect() { Serial.println("Connection failed:" + String(mqttClient.state())); if (!--retry) break; + delay(3000); } - delay(3000); } return false; } diff --git a/examples/mqttRSSI_NA/mqttRSSI_NA.ino b/examples/mqttRSSI_NA/mqttRSSI_NA.ino index e07ec57..26a9549 100644 --- a/examples/mqttRSSI_NA/mqttRSSI_NA.ino +++ b/examples/mqttRSSI_NA/mqttRSSI_NA.ino @@ -102,7 +102,7 @@ bool mqttConnect() { "abcdefghijklmnopqrstuvwxyz"; // For random generation of client ID. char clientId[9]; - uint8_t retry = 10; + uint8_t retry = 3; while (!mqttClient.connected()) { if (mqttserver.value.length() <= 0) break; @@ -123,8 +123,8 @@ bool mqttConnect() { Serial.println("Connection failed:" + String(mqttClient.state())); if (!--retry) break; + delay(3000); } - delay(3000); } return false; }