Configure Tasmota smart plug for your pool pump

First of all let’s create buttons to control the pool pump and the timer. The „pool pump“ button is the renamed „On / Off“ button. The timer button is assigned to a „virtual“ second relay (No 2) that is assigned to unused GPIO 16

Webbutton1 Pool Pump
Webbutton2 Timer

Now let’s create some rules that the pool pump will run for 3 minuten (180sec) . After that it will sleep for 5 minutes so that the water in the heating mat can heat up.

rule1
 on Rules#Timer=1 do backlog power1 on; RuleTimer2 180 endon
 on Rules#Timer=2 do backlog power1 off; RuleTimer1 300 endon
 
rule2 
 on power2#state=0 do backlog Rule1 0; power1 off endon 
 on power2#state=1 do backlog Rule1 1; RuleTimer1 5 endon 

You can trigger the pump activating the timer manually or manually using the on/off button. To start to timer on a regular basis you can enable timers in the gui switching on and off the virtual relay.

Feel free to comment if there are easier or more elegant solutions.

Be aware that your smart plug only disconnects one wire. This should be the live wire and not the neutral wire.