I had same problem too.. When is longer not turned on, Sonoff disconnects from wifi , that ip is not in client list, in my case I only turn sonoff on throught black button on the top and than it is okay about day-two.

I have few sonoff and I just installed one with this script to replace a dead 433 device. So thank you very much for the script and the tutorial.

Reports of regular wifi connection losses are what kept me away from sonoff until now. Maybe the script could check wifi connection regularly and force a reconnect. Something like in the link below ?http://www.esp8266.com/viewtopic.php?f=32&t=8286

I have had 3 Sonoff relays running on 240v 50Hz for 2-3 months straight.

2 of them in IP67 outdoor lights with Phillips LED Lamps, switch on and off several times per day, Not a single hardware issue.

best $6 ever

Yes over one month and very reliable, but with Domoticz is not integrating very well with my old 433MHz remote controls (that I use for my remaining 433MHz module until they are replaced).
Making me think about a small plugin board to control the sonoff through serial port, so it would make a real MySensors node for 10$ and avoid all the power supply, relay etc etc soldering and not rely on wifi.

@gohan The only time you would need to connect a serial device is I guess when you are flashing the software. There is no needTheThe only time you need to connect a serial device is when you are flashing the software. There is no need to connect it to the mains grid then. Whether it would damage anything i do not know but it is unnecessary and therefore absolutely not recommended to do it. Avoid working on anything that is connected to mains, especially if there is no need to have it connected

@gohan because when using the sonoff I do not have to care about the power supply/safety, to find a case that is safe for electrical device and I only have a few things to solder.
And sonoff is cheaper than buying separately the power supply, case, relay etc

So just solder a few low voltage components on a PCB, plug in the sonoff and get a safe main powered actuator.

Not 100% sure it's worth it yet, still thinking a out it
But main advantage is to reuse it in more complex sonoff devices with multiple relays, power measurement, in wall plugs etc etc

@efflon Do you know how I can setup the sonoff gateway on the Vera Edge? I used the MySensors plugin to add the sonoff to the network but can't get the relay to toggle.. Help is much appreciated!! Thanks!!

@dbemowsk You cannot because MQTT is just a transport and not a strict data format. You can however use MySenSors MQTT + ESP Easy MQTT + a broker + node red + a controller. Node Red can do data conversions and integrate everything.

@gohan I know some controller are aware of ESP Easy via MQTT. If you controller does not support this directly, you have to integrate it manually (with node red). In my opinion scenarios, where MySensors with ESP Easy frontend would be of use, do still exist.

For the Sonoffs, you could wire an external button directly to the onboard button which is on GPIO 0, or you could wire it to GPIO 14 which is broken out on the programming header on most Sonoffs. Some older Sonoffs didn't have GPIO 14 on that header. Once you have a button or switch wired on, you can then change the code or do some firmware scripting depending which flavor of firmware you use.

@sam9s I have never played with Tasmota, so I have to say that I don't know. A Vera plugin would have to be coded or modified as I did with the HTTP Switch plugin to make it work if there is not one out there already. I am assuming that you looked at my blog post on the ESP Easy way.

@gohanHere is a plugin for MQTT using Vera. You would still need to have an MQTT Broker set up though. I am surprised that there is not an active MQTT plugin for Vera in the plugins section. Didn't find anything when I did a search for MQTT.