Examples can be found here : https://github.com/i4things/NodeAPI/tree/master/examples/ESP8266-01
Detailed description how to upgraded your Sonoff device to a rock solid secure switch using i4things now available at : https://github.com/i4things/NodeAPI/tree/master/examples/ESP8266-01/1CH_RELAY/thing