Install an extra restore (5-10KOhm) between GPIO14 and 3.3V headersAditionally to step one (pull-up restore) install a capacitor between GPIO14 and GND
This looks like an interesting setup.
Is your Sonoff installed by the light switch or the light itself? If by the lights, did you run a new wire from the Sonoff to the switch, or use existing wiring?
I need the same setup, but i want to know whether you have used MQtt for this project, Can you please guide me on this?
Silly question, but you have got the mains going in the right side, or it'll power itself off when the relay operates and then try to restore this when the power comes back on again etc etc