Revision history for TasmotaBathroomFanRules


Revision [7668]

Last edited on 2021-11-18 00:45:28 by ZorrUno

No Differences

Revision [7667]

Edited on 2021-11-18 00:45:28 by ZorrUno
Additions:
%%ruletimer%%
Deletions:
**ruletimer**


Revision [7666]

Edited on 2021-11-18 00:45:10 by ZorrUno

No Differences

Revision [7665]

Edited on 2021-11-18 00:45:10 by ZorrUno
Additions:
=====Other useful info=====
**Button States**
**Check how long the rule timers have to go**
**ruletimer**
Deletions:
=====List of Button States=====


Revision [7664]

Edited on 2021-11-18 00:43:51 by ZorrUno

No Differences

Revision [7663]

Edited on 2021-11-18 00:43:51 by ZorrUno
Additions:
%%rule2 on button2#state=10 do backlog power2 toggle; ruletimer2 3600 endon%%
Deletions:
%%rule2 on button2#state=10 do backlog power2 toggle endon; ruletimer2 3600 endon%%


Revision [7662]

Edited on 2021-11-18 00:40:34 by ZorrUno

No Differences

Revision [7661]

Edited on 2021-11-18 00:40:34 by ZorrUno

No Differences

Revision [7660]

Edited on 2021-11-17 08:54:50 by ZorrUno

No Differences

Revision [7659]

Edited on 2021-11-17 08:54:50 by ZorrUno
Additions:
-- All carried out inside the device with rules (no MQTT or external control needed)


Revision [7658]

Edited on 2021-11-17 08:53:17 by ZorrUno

No Differences

Revision [7657]

Edited on 2021-11-17 08:53:17 by ZorrUno
Additions:
-- Prevents mirror lights from remaining on
-- Does run on timer function for extract fan


Revision [7656]

Edited on 2021-11-17 08:52:11 by ZorrUno

No Differences

Revision [7655]

Edited on 2021-11-17 08:52:11 by ZorrUno
Additions:
{{lastedit show="3"}}
----
CategoryHomeAutomation
CategoryMQTT
CategoryTasmota
CategoryTasmotaRules


Revision [7654]

Edited on 2021-11-17 08:50:23 by ZorrUno

No Differences

Revision [7653]

Edited on 2021-11-17 08:50:23 by ZorrUno
Additions:
======Tasmota Rules to control a triple Bathroom light button======
=====Button Type=====
-- A three pushbutton device with Tasmota installed (KS-811 Triple)
-- Controls Main Lights (1), Mirror Lights (2), Extract Fan (3)
=====First Rule=====
-- Combines 3 actions in rule1
-- If Timer 2 finishes, set Power2 OFF (I like to match the timer numbers etc with the output number. This isn't necessary)
-- If Timer 3 finishes, set Power3 Off
-- If Button 1 is pressed once, toggle Power1 output (just turn the main lights on/off on press)
%%rule1
on Rules#Timer=2 do power2 off endon
on Rules#Timer=3 do power3 off endon
on button1#state=10 do power1 toggle endon%%
=====Second Rule=====
-- Combines 1 actions in rule2
-- If button2 is pressed once, toggle the output2 and start the timer running down from 3600 (i.e mirror lights go on for one hour max)
%%rule2 on button2#state=10 do backlog power2 toggle endon; ruletimer2 3600 endon%%
=====Third Rule=====
-- Combines 3 actions in rule3
-- If Button 3 pressed once, toggle output 3 (the bathroom fan). Also, set ruletimer3 to start counting down from 600 seconds (10 minutes)
-- If Button 3 pressed twice, toggle output 3 and set ruletimer3 to start counting down from 3600 seconds (1 hour)
-- If Button 3 is triple pressed, toggle output 3 and set ruletimer3 to start counting down from 4 hours.
%%rule3 on button3#state=10 do backlog power3 toggle; ruletimer3 600 endon
on button3#state=12 do backlog power3 toggle; ruletimer3 14400 endon%%
=====Setup Actions=====
Turn the rules on
%%backlog rule1 1;rule2 1; rule3 1; %%
Restrict button actions to 1-5 presses or HOLD (no special functions)
%%setoption1 1%%
Allow immediate single button press detection (this is the default)
%%setoption13 0%%
Number of 0.1 second increments for HOLD detection (it is 40 by default, we aren't using this yet)
%%setoption32 60%%
Detach all buttons from activating relays. It will just send MQTT messages and we will use rule to activate relays.
%%setoption73 1%%
=====Full rules and actions set=====
rule2 on button2#state=10 do backlog power2 toggle endon; ruletimer2 3600 endon
rule3 on button3#state=10 do backlog power3 toggle; ruletimer3 600 endon on button3#state=11 do backlog power3 toggle; ruletimer3 3600 endon on button3#state=12 do backlog power3 toggle; ruletimer3 14400 endon
backlog rule1 1; rule2 1; rule3 1; setoption1 1; setoption13 0; setoption32 60; setoption73 1%%
=====List of Button States=====
Deletions:
rule2 on button2#state=10 do backlog power2 toggle endon; ruletimer2 3600 endon
rule3 on button3#state=10 do backlog power3 toggle; ruletimer3 600 endon
on button3#state=12 do backlog power3 toggle; ruletimer3 14400 endon
backlog rule1 1;rule2 1; rule3 1; setoption1 1; setoption13 0; setoption32 60; setoption73 1%%
%%rule1 on Rules#Timer=1 do power3 off endon
rule2 on button1#state=10 do power3 toggle endon on button2#state=10 do power3 toggle endon
rule3 on button3#state=10 do backlog power3 toggle; ruletimer1 600 endon on button3#state=11 do backlog power3 toggle; ruletimer1 3600 endon on button3#state=12 do backlog power3 toggle; ruletimer1 14400 endon
backlog rule1 1;rule2 1; rule3 1; setoption1 1; setoption13 0; setoption32 60; setoption73 1%%
**List of button states**


Revision [7652]

Edited on 2021-11-17 07:47:27 by ZorrUno

No Differences

Revision [7651]

Edited on 2021-11-17 07:47:27 by ZorrUno
Additions:
%%rule1 on Rules#Timer=2 do power2 off endon on Rules#Timer=3 do power3 off endon on button1#state=10 do power1 toggle endon
rule2 on button2#state=10 do backlog power2 toggle endon; ruletimer2 3600 endon
rule3 on button3#state=10 do backlog power3 toggle; ruletimer3 600 endon
on button3#state=11 do backlog power3 toggle; ruletimer3 3600 endon
on button3#state=12 do backlog power3 toggle; ruletimer3 14400 endon
Deletions:
rule2 on button1#state=10 do power3 toggle endon on button2#state=10 do power3 toggle endon
rule3 on button3#state=10 do backlog power3 toggle; ruletimer1 600 endon
on button3#state=11 do backlog power3 toggle; ruletimer1 3600 endon
on button3#state=12 do backlog power3 toggle; ruletimer1 14400 endon


Revision [7650]

Edited on 2021-11-17 07:18:08 by ZorrUno

No Differences

Revision [7649]

Edited on 2021-11-17 07:18:08 by ZorrUno
Additions:
%%rule1 on Rules#Timer=1 do power3 off endon
rule2 on button1#state=10 do power3 toggle endon on button2#state=10 do power3 toggle endon
rule3 on button3#state=10 do backlog power3 toggle; ruletimer1 600 endon
on button3#state=11 do backlog power3 toggle; ruletimer1 3600 endon
on button3#state=12 do backlog power3 toggle; ruletimer1 14400 endon
%%rule1 on Rules#Timer=1 do power3 off endon
rule2 on button1#state=10 do power3 toggle endon on button2#state=10 do power3 toggle endon
rule3 on button3#state=10 do backlog power3 toggle; ruletimer1 600 endon on button3#state=11 do backlog power3 toggle; ruletimer1 3600 endon on button3#state=12 do backlog power3 toggle; ruletimer1 14400 endon
**List of button states**
Deletions:
%%rule1 on button3#state=10 do backlog power3 toggle; ruletimer1 600 endon on button3#state=11 do backlog power3 toggle; ruletimer1 3600 endon
rule2 on Rules#Timer=1 do power3 off endon
rule3 on button1#state=10 do power3 toggle
rule1 on button1#state=2 do backlog power1 toggle; ruletimer1 600 endon on button1#state=3 do backlog power1 1; ruletimer1 0 endon on power2#state=1 do backlog power1 1; power2 0; ruletimer1 3600 endon
rule2 on Rules#Timer=1 do power1 off endon
List of button states


Revision [7648]

Edited on 2021-11-17 06:13:01 by ZorrUno

No Differences

Revision [7647]

Edited on 2021-11-17 06:13:01 by ZorrUno
Additions:
rule3 on button1#state=10 do power3 toggle
backlog rule1 1;rule2 1; rule3 1; setoption1 1; setoption13 0; setoption32 60; setoption73 1%%
Deletions:
backlog rule1 1;rule2 1; rule3 0; setoption1 1; setoption13 0; setoption32 60; setoption73 1%%


Revision [7646]

Edited on 2021-11-17 06:09:27 by ZorrUno

No Differences

Revision [7645]

Edited on 2021-11-17 06:09:27 by ZorrUno
Additions:
backlog rule1 1;rule2 1; rule3 0; setoption1 1; setoption13 0; setoption32 60; setoption73 1%%
Deletions:
backlog rule1 1;rule2 1; rule3 0; setoption1 1; setoption13 0; setoption32 60%%


Revision [7644]

Edited on 2021-11-17 05:39:57 by ZorrUno

No Differences

Revision [7643]

Edited on 2021-11-17 05:39:57 by ZorrUno
Additions:
%%rule1 on button3#state=10 do backlog power3 toggle; ruletimer1 600 endon on button3#state=11 do backlog power3 toggle; ruletimer1 3600 endon
Deletions:
%%rule1 on button3#state=11 do backlog power3 toggle; ruletimer1 60 endon


Revision [7642]

Edited on 2021-11-17 05:35:07 by ZorrUno

No Differences

Revision [7641]

Edited on 2021-11-17 05:35:07 by ZorrUno
Additions:
%%rule1 on button3#state=11 do backlog power3 toggle; ruletimer1 60 endon
Deletions:
%%rule1 on button3#state=2 do backlog power3 toggle; ruletimer1 60 endon


Revision [7640]

Edited on 2021-11-17 05:34:56 by ZorrUno

No Differences

Revision [7639]

Edited on 2021-11-17 05:34:56 by ZorrUno
Additions:
%%rule1 on button3#state=2 do backlog power3 toggle; ruletimer1 60 endon
rule1 on button1#state=2 do backlog power1 toggle; ruletimer1 600 endon on button1#state=3 do backlog power1 1; ruletimer1 0 endon on power2#state=1 do backlog power1 1; power2 0; ruletimer1 3600 endon
rule2 on Rules#Timer=1 do power1 off endon
List of button states
10=1 short press
11=2 short press
12=3 short press
13=4 short press
14=5 short press
3=LONG press
Deletions:
%%rule1 on button3#state=2 do backlog power3 toggle; ruletimer1 60 endon on


Revision [7638]

Edited on 2021-11-17 05:07:40 by ZorrUno

No Differences


Full history for this page cannot be displayed within a single page, click here to view more.

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki