I am using the firmware from the first post on my Sonoff switches. It works well. But I have an issue.
When a long duration electricity outage occurs, and then it comes back , my wifi gets up in 2-3 minutes.
However, Sonoff boots earlier and when it can’t find the predefined wifi it reverts to no connection.
Then it does not retry to connect wifi. Can we change this behaviour ?
Could it try to reaccess wifi ssied periodically ? Or at least when we switch off/on electricity ?
@Drew650 have you had any luck getting your Sonoffs to work? I’ve got the same issue with 2 of mine, even tried using 2 different computers and 2 different firmware. I get no light or click of the relay at all. The first Sonoff I flashed a few weeks ago worked fine, so thought I’d order a few more and none of the new ones I’ve flashed work after flashing, they did work before.
I really hope we can get them to work as even if they let me claim on warranty it would cost more to send them back than they cost to buy.
The device is supposed to try to connect for 30 seconds after boot, if it can’t then it broadcasts its access point for 5 minutes. If it is not configured within those 5 minutes then it reboots and attempts the process again. So, does it seem to not be working that way or is it just more desirable to try to connect for a longer time?
@sapstar I can add an option to change between uk & us voltages.
After a long duration of electricity outage. The device can not connect to the wifi when wifi is available. I am sure that the 5 minutes period is not working. Because it has been longer than that.
Can you test this to see if it is working as you described ?
If it works for you, then there is a problem in my setup. But in any case, I believe 30 seconds to 5 minutes is not a good idea. maybe it should be 2 minutes to 2 minutes. Because if one has to access it through its wifi access point, then he can wait more than 30 seconds. But I am sure that my wifi access point can not boot in 30 seconds.
and 1 more question:
could it be doing this 30 seconds , 5 minutes process once ?
Would you be interested in adding a Toggle option to the boot up state? To explain my scenario, I would like to install a Sonoff to control a lighting circuit and maintain local switch control but I am unable to change any of the wiring and the power supply comes via the switch - but I am unable to install the Sonoff at the switch.
My thinking is if the Sonoff can ‘toggle’ at power up I can change the switch to a momentary off type ON-(OFF) that will interrupt the power to the sonoff and cause a reboot when the switch is pushed. That will then toggle the light on/off.
If easier and you can release the source code for the firmware to me (publicly or via PM) I am happy to make the changes myself.
One thing to note is the toggle process would need to be pretty much the first thing the firmware does after power up before connecting to WiFi etc to minimise the lag between the switch press and the action.
Interesting idea. So it would basically need to do the opposite of its previous state right? So if it was on when it was powered off, it would need to boot in the off state and if it was off when it was powered off, then it needs to boot in the on state. Does that sound correct?
I had another electricty outage last night. And because the sonoff did not connect, my rules on motion did not fire up.
This is really making sonoff useless for me. On the other hand what you say sounds at least a good solution because it would at least make the sonoff live in 5-10 minutes after outage ends. But it does not work for me.
my wifi router boots in around 2 minutes. why can’t it connect ?
I just tried two scenarios and it worked as I expected. The first was that I turned the Sonoff on and waited about 30 seconds so that it would broadcast its SSID. After 2 additional minutes I started up the router. All of this time I was running a constant ping on the Sonoffs IP address. After 3 additional minutes (so 5 minutes and 30 seconds) after initial boot of the Sonoff, the ping started to receive a reply.
The second test was just like the first, except that I waited 7 minutes after turning on the Sonoff to turn on the router (just to make sure the loop is working). 11 minutes after turning the Sonoff on I started to receive a reply from the ping. So the Sonoff tried to connect for 30 seconds, started its access point for 5 minutes, did those two things again (because it still couldn’t connect), and then connected when the router was available.
Can you post the firmware version and date that is reported when you go to http://ip_address_of_sonoff/info