The original idea and tutorial for this project can be found in this video by Eric Peronnin on how to hack the Sonoff relay modules.
The tutorial explains how to upload a new program to the Sonoff. The program creates a simple webserver you can then access on your phone's browser to control the relay switch.
You'll find the original program here.
I used the original program for a while but wanted to be able to control the module from anywhere, so I decided to switch to using a Telegram Bot. For this I used Brian Lough's library and one of its example files.
- Added a programmable timer command