Using eWeLink, I was able to pair with my SonOff Basic. I want it to turn on a lamp at a certain time, and then turn it off at a certain time. I added two schedules: one to switch on and another one to switch off. That works as expected, but, if there is a power failure after the scheduled switch on time, and the power is restored, the lamp stays switched off. Or, if there is a power failure before the switch on time, and the power is restored just after the switch on time, the lamp also stays switched off.
My question thus is if it is possible to specify a switch on period, with a start/end time, and if there is a power failure and later when the power is restored, the SonOff will check if the current time is still within the switch on period, and then switch on the load?
It seems as if I have no other option but to flash custom firmware to the Sonoff :-/
Use the "Keep" setting under settings for the Power on State. The device will come back on and resume the state it was in when the power failed. That will cure the first scenario. Nothing I know of short of a repeating web link cron job on IFTTT will solve the second scenario.