Reputation: 11
I'm trying to make a watering timer that turns on for 20 minutes and off for 30 and repeat the cycle during daytime. Also, change the cycle to 20 minutes ON at night-time and 1hour OFF.
I'm using these timers as a base, but I'm missing some rules to complete it.
Timer1
{"Enable":1,"Mode":1,"Time":"00:00","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":1}
Timer2
{"Enable":1,"Mode":1,"Time":"00:20","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":0}
Timer3
{"Enable":1,"Mode":2,"Time":"00:00","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":1}
Timer4
{"Enable":1,"Mode":2,"Time":"00:20","Window":0,"Days":"1111111","Repeat":1,"Output":1,"Action":0}
Working on a Sonoff Basic with Tasmota 12.0.x
Any thoughts?
Upvotes: 1
Views: 126
Reputation: 51
With a single rule you can
From console:
Rule1
ON System#Boot DO Backlog mem1 1200; mem2 1800; RuleTimer1 %mem1%; Power1 on ENDON
ON Time#Minute=481 DO Backlog mem1 1200; mem2 1800 ENDON
ON Time#Minute=1201 DO Backlog mem1 1200; mem2 6000 ENDON
ON Rules#Timer=1 DO Backlog Power1 off; RuleTimer2 %mem2% ENDON
ON Rules#Timer=2 DO Backlog Power1 on; RuleTimer1 %mem1% ENDON
Rule will remain saved also after restart
Remember also to enable the rule.
From console:
Rule1 1
With conditional rules (feature not included in standard ESP8266 binaries so could needs custom firmware) you could also set mem2 value depending on the moment of the day in which the System#Boot event occurs
Upvotes: 0