Open the Sonoff casing and carefully connecting AC in and out wire.
I have not changed original firmware that comes out of the box from the manufacturer.
Ref# link:Step 2:
Create or login into IFTTT.com account.
Quick Reference:Create 2 applets:
1. Create Webhook(If condition). Give small Event name. Next in "Then" action select "EWelink" service. You will have to create a account if not done yet. Just provide mobile number and sign in. You might need to register if not done already to start with. Next select
How to go about - next steps?
How to get URL for Device "on" and "off"
In the text box above in middle of URL...need to enter Event name created i.e Applet event name. In our casse witch is placed in "index.html" file is "sonoff_off" and "sonoff_on".
You can first check if we are able to switch on and off the actual device/bulb by clicking "Test it" button in above screen shot. If all well take the formed URL and place in "index.html" page on bulb image click event(java script function).