Reset wifi and socket once per day
This commit is contained in:
@ -20,6 +20,8 @@ struct WifiConfiguration {
|
||||
|
||||
// The interval to reconnect to WiFi if the connection is broken
|
||||
uint32_t reconnectInterval;
|
||||
|
||||
uint32_t periodicReconnectInterval;
|
||||
};
|
||||
|
||||
struct KeyConfiguration {
|
||||
@ -76,4 +78,6 @@ private:
|
||||
void prepareResponseBuffer(SesameEvent event, uint8_t deviceId = 0);
|
||||
void sendPreparedLocalResponse(AsyncWebServerRequest *request);
|
||||
void sendPreparedServerResponse();
|
||||
|
||||
void periodicallyReconnectWifiAndSocket(uint32_t millis);
|
||||
};
|
@ -49,6 +49,9 @@ constexpr const char* networkName = "Sesame-Device";
|
||||
// The interval to reconnect to WiFi if the connection is broken
|
||||
constexpr uint32_t wifiReconnectInterval = 10000;
|
||||
|
||||
// The interval to reconnect to WiFi if the connection is broken
|
||||
constexpr uint32_t wifiPeriodicReconnectInterval = 86400;
|
||||
|
||||
/* Local server */
|
||||
|
||||
// The port for the local server to directly receive messages over WiFi
|
||||
|
Reference in New Issue
Block a user