I want to control my water heater with Sonoff Pow r2 in 2 ways as follows-
1. I want to Schedule the Pow r2 so that the water heater will start every day on 5:00 AM and stop automatically on 5:40.
2. I want to auto off my water heater after 40 minutes when someone starts the heater manually using the Pow r2 built in push button switch.
To implement item 1, I tried a Schedule.
To implement item 2, I set up the Loop timer (Cycle 40 minutes and Start action set to OFF and disabling 'After' option) . But the water heater ON time was random like some times 20 minutes some times 10 minutes, etc.
I would appreciate if one tells me how to accomplish item 1 and 2 explained above. Thanks.