Skip to content

Commit df52e27

Browse files
authored
Update Rules.md
Fix syntax, add SetOption34 note.
1 parent e8d3d94 commit df52e27

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

docs/Rules.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,7 @@ The only catch is that the protocol needs to be setup in the rule. Most likely t
19661966
19671967
### RfRaw command duplicator
19681968
1969-
Sonoff RF bridge with Tasmota firmware is able to send out the radio-frequency commands very quickly. If some of your covers 'miss' the commands occassionally (you can see that from the fact that the state shown in the HA system does not correspond to reality), it may be that those cover motors do not pick up the codes immediately when they are sent.
1969+
Sonoff RF bridge with Tasmota firmware is able to send out the radio-frequency commands very quickly. If some of your RF covers 'miss' the commands occassionally (you can see that from the fact that the state shown in the HA system does not correspond to reality), it may be that those cover motors do not pick up the codes immediately when they are sent (it may happen not only with RF covers).
19701970
19711971
This can be handled by sending out the RF code immediately again. While this is possible by repeating the automation sequence in HA system, it is also possible to do the repetition in Tasmota, and send the code only once from your home automation.
19721972
@@ -1983,22 +1983,25 @@ To make it work with our RfRaw repeater rule and send it multiple times, it shou
19831983
The payload will have be `var1 first-32-chars; Event varf=rest-of-the-chars` from the code.
19841984
19851985
#### Rule
1986+
19861987
```haskell
19871988
rule1 on event#varf do backlog RfRaw %var1%%value%; RfRaw %var1%%value%; RfRaw 0 endon
19881989
```
1989-
Enable it with `rule1 1`
1990+
Enable it with `rule1 1`.
19901991
19911992
#### Result
1992-
The backlog coming through MQTT will:
1993-
- first set the first 32 characters of the code in variable `var1`;
1994-
- fire an event with variable `varf` containing the rest of the characters
19951993
1996-
The rule will detect the event (`on event`) and run a new backlog which will:
1997-
- run command RfRaw with code concatenated of `var1``varf`
1998-
- run command RfRaw with code concatenated of `var1``varf` again
1999-
- run command RfRaw 0
1994+
The backlog coming through MQTT will:<br>
1995+
- first set the first 32 characters of the code in variable `var1`;<br>
1996+
- fire an event with variable `varf` containing the rest of the characters<br>
1997+
1998+
The rule will detect the event (`on event`) and run a new backlog which will:<br>
1999+
- run command RfRaw with code concatenated of `var1``varf`;<br>
2000+
- run command RfRaw with code concatenated of `var1``varf` again;<br>
2001+
- run command RfRaw 0<br>
20002002
2001-
If you want to repeat the RfRaw 3 times, all you need to do is to simply add in the rule a new `RfRaw %var1%%value%;` before `RfRaw 0`
2003+
If you want to repeat the RfRaw 3 times, all you need to do is to simply add in the rule a new `RfRaw %var1%%value%;` before `RfRaw 0`.<br>
2004+
Backlog introduces and [inter-command delay](https://tasmota.github.io/docs/Commands/#setoption34) of 200 milliseconds by default. If you feel the reaction time between your HA system and the covers is too long, you can tweak it by reducing the delay to 60 milliseconds with `SetOption34 60`.
20022005
20032006
20042007
------------------------------------------------------------------------------

0 commit comments

Comments
 (0)