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?