-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random or configurable wait time for WIFI_[RETRY|WAIT] to avoid connection problems #2089
Comments
I’m in the same situation. Need clarification on solve this issue |
This is a good idea, maybe even MQTT configurable so you can differentiate retry time. |
Easiest to base the delay on the unique device id |
Where is the delay function at? |
5.12.0e * Add additional time offset to Wifi Retry based on device mac address (#2089)
Hello, How was this issue solved? I´m very interested, because I have the exact same problem. PLease don´t tell me I have to reflash all my sonoffs (20+)... Sorry for the edit, I just don´t want to pollute. I just found:
Is this where I can just set the wifi to wait any number of minutes before attempting connection? |
In the file support.ino there is the key |
5.12.0e * Add additional time offset to Wifi Retry based on device mac address (arendst#2089)
Sorry for this other message, but I don't understand the solution. I have the same problem with more than 20 devices. Can you confirm that the solution is to re-flash all devices with |
Hi @khriss75 This issue is too old. A lot of things has changed since then. Please, if you have a similar problem, update first to latest and try again. Thanks. |
I have about 15 Sonoff Basics at home (Tasmota up to date) and I've experienced connection problems with power outages (I've caused lots of them this days manipulating my electrical installation). When the power comes back, every sonoff tries to connect to my wifi at exactly the same time... and routers usually don't behave very well with this and many of them fail to connect (in fact, if they have the "wifi manager" mode configured with WifiConfig 2, they fall in AP mode until they restart themselves). So, I configured WIFI_WAIT (WifiConfig 5) in order to retry the same AP later. I've seen in code that the wait time is a fixed value:
#define WIFI_RETRY_SEC 30
So, what happens? After wait time, all sonoffs which failed are trying to reconnect to wifi... exactly at the same time again, so many of them fail again... and so, until everyone is configured a bunch of minutes later.
I thought perhaps it would be a good idea to change the wait time with a random value between 15 and 45 secs, or making it a configurable variable instead of a fixed hardcoded constant so I could configure my sonoffs with different values avoiding this problem.
Or maybe I should spend money in a better Access Point :) (currently TP-LINK Archer C9)
The text was updated successfully, but these errors were encountered: