Hi,
First about the power monitoring: I think it has nothing to do with the shutters, but if you want to be sure, just switch it off.
Then the stops at the top and bottom: I don't know what type of switch you were using before, but maybe you can post the make and model and we can have a look at that. I myself used some simple
X10 switches before I switched to Tuya with Tasmota.
Below I'll give you an example of what I'm using now but first some explanation.
Basically my shutters have 5 standard positions:
- fully open - event 'HOOG' - 0% closed
- anti-theft - event 'DIEF' - 25% closed
- half open - event 'HALF' - 50% closed
- night state - event 'KIER' - 75% closed
- fully closed - event 'LAAG' - 100% closed
To use these settings in my system I defined several rules. These rules can be used by the built-in timers and with MQTT.
Now for the rules.
I live in the Netherlands so my rules contain some words you might not recognise, but don't worry those are only names I use for the events I created. You can replace them with your own names.
Rule1
on EVENT#DIEF do backlog var1 %mem1%; event HOOG; event WAIT=DNTI endon
on EVENT#HALF do backlog var1 %mem3%; event HOOG; event WAIT=DNTI endon
on EVENT#KIER do backlog var1 %mem2%; event LAAG; event WAIT=UPTI endon
on EVENT#GAAT do backlog var1 %mem4%; event LAAG; event WAIT=UPTI endon
on EVENT#HOOG do backlog Power2 1; delay 3; Power1 1 endon
on EVENT#LAAG do backlog Power2 1; delay 3; Power3 1 endon
on EVENT#STOP do backlog Power2 1; delay 3 endon
Rule2
on CLOCK#Timer=1 do event DIEF endon
on CLOCK#Timer=2 do event KIER endon
on CLOCK#Timer=3 do event LAAG endon
on CLOCK#Timer=4 do event HOOG endon
on CLOCK#Timer=5 do event DIEF endon
on CLOCK#Timer=6 do event KIER endon
on CLOCK#Timer=7 do event LAAG endon
on CLOCK#Timer=8 do event HOOG endon
on CLOCK#Timer=9 do event GAAT endon
on CLOCK#Timer=10 do event HALF endon
Rule3
on EVENT#DNTI do backlog Power3 1; delay %var1%; Power3 0 endon
on EVENT#UPTI do backlog Power1 1; delay %var1%; Power1 0 endon
on EVENT#WAIT do backlog delay %mem5%; event %value% endon
These are the values I use for the counters in Mem:
Backlog MEM1 30; MEM2 60; MEM3 60; MEM4 33; MEM5 222
And finally the timer setting (one of them):
Timer1 {"Arm":1,"Mode":0,"Time":"07:45","Window":00,"Days":"1111111","Output":2,"Repeat":1,"Action":3}
Now, the above timer fires at 7.45, every day, and fires the event named 'DIEF' (see Rule2). In event 'DIEF' the value of 'Mem1' (30) is loaded into 'Var1', event 'HOOG' is fired (w/o a value) and event 'WAIT' is fired with the value 'DNTI' (see Rule1).
In event 'HOOG' the Power2 relay is switched to 1 and by doing this the Up and Down relays will be switched Off (due to setting InterLock 1,2,3; InterLock on); then there is a small delay and Power1 is set to 1 (so the shutter goes up, in my case, as the <> button is setting Power1).
Event 'WAIT' is fired with value 'DNTI' and first there is a delay with the value in 'Mem5' (222 which means 22.2 seconds). These 22.2 seconds is the time my shutter needs to travel from completely closed to completely open + 1 extra second for safety. After the delay, the event 'DNTI' is fired ('DNTI' is the value we supplied to 'WAIT', see Rule1).
Event 'DNTI' first switches on Power3 (shutter goes down) and then waits for the delay in 'Var1' to finish; At last it switches off Power3 and the shutter stops in the required position.
These rules work very well for me because due to the excellent workings of the timers in Tasmota my shutters stop within only a few (1 or 2) millimeters every time.
i hope this gives you an idea and feel free to ask if something isn't clear. It's possible there are other (better) ways to do this, but this was designed about 2 years ago and since then it's working great, so no need for me to change it.
BR//Willem.