The following rules work well when booted within the time slot and rightly stop at its end, BUT:
point 1: when booted before the time slot, it doesn't work, why? where is the mistake?
point2: when it runs properly, in case of current failure, it doesn't restart. Is it normal?
Code: Select all
on System#Boot do
gpio,13,1 //to be sure it is OFF
timerSet,3,1
endon
on Rules#Timer=3 do
if %systime%>19:02:00 and %systime%<19:56:00
gpio,13,0 // switch ON
timerSet,7,10 // ON during 10 sec
endon
on Rules#Timer=7 do
gpio,13,1 // switch OFF
timerSet,3,5 // OFF during 5 sec
endon
else
gpio,13,1 //out of time-range, switch OFF
endif
endon