- activate switch button as pushbutton
switchmode1 2; <-
rule1
on switch1#state do backlog power1 1; RuleTimer1 30 endon
on Rules#Timer=1 do power1 off endon
on
Assuming that your switch is on GPIO00
and configured as Switch1
:
SwitchMode1 1
Rule1
on Switch1#state=1 do Timers 0 endon
on Switch1#state=0 do Timers 1 endon
Rule1 1