This is going to require a few components - the eWeLink app to control your Sonoff switch and also IFTTT to integrate eWeLink with Sequematic.
Turn on switch at 40ºC:
For this part of the flow, set up a scene in the eWeLink app. Use the condition if the temperature is 40ºC then turn on the switch.
Turn off switch at 45ºC:
Also use the eWeLink app for this. Create another scene which turns off the switch when the temperature is 45ºC.
After turning on the switch, wait 20 minutes then turn it off
We're going to use IFTTT to monitor when the switch comes on. It will then pass control over to Sequematic to wait 20 minutes before turning the switch off.
First, create a new Sequence as follows:
- Trigger: IFTTT webhook
- Event name: switch_on
- No parameters
- After saving this trigger, copy the URL it provides (you'll need this further down when setting up IFTTT)
- Pause step with duration set to 20 minutes
- IFTTT webhook call with event name switch_off (make sure you've added your IFTTT key in your user settings)
Now create an IFTTT applet to monitor the state of the switch:
- Trigger: eWeLink, 1 channel plug turns on
- Action: webhooks, make a web request to the URL provided when creating the Sequematic trigger above
- Trigger: webhook, receive a web request with event name switch_off
- Action: eWeLink, turn 1 channel plug on/off (select the relevant plug and set 'turn on or off' to off