Garage Door Opener

Michael Ingraham 2019-08-02 01:39:21 -04:00
parent 44be11b98c
commit 05903d1ea8
1 changed files with 62 additions and 1 deletions

@ -33,6 +33,7 @@
- [Adjust PowerDelta according to current Power values](#adjust-powerdelta-according-to-current-power-values)
- [Solar heater control](#solar-heater-control)
- [IR Forward](#ir-forward)
- [Garage Door Opener](#Garage-Door-Opener)
------------------------------------------------------------------------------
#### Use long press action on a switch
@ -1222,4 +1223,64 @@ Using one IR receiver and one sender (or both extender) you can simply forward s
rule1 on IRreceived#Data do publish cmnd/irsideboard/irsend {Protocol:NEC,Bits:32,Data:0x%value%} endon
```
[Back To Top](#top)
[Back To Top](#top)
------------------------------------------------------------------------------
#### Garage Door Opener
([#3942](https://github.com/arendst/Sonoff-Tasmota/issues/3942#issue-365226844))
// Set the relay on time to signal the opener
`PulseTime 7`
// Send ON and OFF as the switch is ON or OFF
`Backlog SwitchMode1 1; SwitchMode2 1; SwitchMode3 1`
//No need to save changes on power cycle
`SetOption0 0`
//Dont blindly run the door on power up
`PowerOnState 0`
//One shot Detection off
`Backlog Rule1 0; Rule1 4; Rule2 0; Rule2 4; Rule2 0; Rule2 4`
//Set Counter to measure the period between on and off, check if its blinking because of an obstruction
`Backlog CounterType 1; CounterDebounce 100`
//So the door doesn't close if you send it an Open when it's already Opened, etc.
// var1=1 Only When OPEN
// var2=1 Only When CLOSED
// var3=1 Only When OPENING
// var4=1 Only When CLOSING
```
Rule1
on Switch1#Boot=1 do backlog delay 99; event Opened endon
on Switch2#Boot=1 do backlog delay 99; event Closed endon
on EVENT#OPEN do power1 %var2% endon
on EVENT#CLOSE do power1 %var1% endon
on EVENT#STOP do backlog power1 %var3%; power1 %var4%; event PState=STOP endon
on Switch1#State=1 do event Opened endon
on Switch2#State=1 do event Closed endon
on Switch1#State=0 do event Closing endon
on Switch2#State=0 do event Opening endon
Rule2
on event#Opened do backlog var 1; var2 0; var3 0; var4 0; ruletimer1 0; event PState=OPEN endon
on event#Closed do backlog var1 0; var2 1; var3 0; var4 0; ruletimer1 0; event PState=CLOSE endon
on event#Opening do backlog var1 0; var2 0; var3 1; var4 0; ruletimer1 15; event PState=OPENING endon
on event#Closing do backlog var1 0; var2 0; var3 0; var4 1; ruletimer1 15; event PState=CLOSING endon
Rule3
on counter#c1>1000 do event PObstr=0 endon
on counter#c1<1000 do event PObstr=1 endon
on event#PObstr do publish stat/GarageDoor/OBSTR %value% endon
on event#PState do publish stat/GarageDoor/STATE %value% endon
on rules#timer=1 do event PState=STOP endon
```
//Turn on Rules
`Backlog Rule1 1; Rule2 1; Rule3 1`
[Back To Top](#top)