Skip to content

Commit 8134e6a

Browse files
authored
Merge pull request tasmota#677 from nagyrobi/revert-671-patch-2
Revert "Update Rules.md"
2 parents 42ccc00 + 6c9ac57 commit 8134e6a

File tree

1 file changed

+2
-45
lines changed

1 file changed

+2
-45
lines changed

docs/Rules.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,6 +1941,8 @@ Result
19411941
19421942
-----------------------------------------------------------------------------
19431943
1944+
------------------------------------------------------------------------------
1945+
19441946
### RF Repeater / IR Repeater
19451947
19461948
In some applications, an RF-Repeater may come in handy to increase the range of RF based devices. We need to use RF reciever and RF transmitter modules with tasmota powered controllers. The following rule looks for data received by the RF receiver and re transmits the same over the transmitter.
@@ -1964,48 +1966,3 @@ The only catch is that the protocol needs to be setup in the rule. Most likely t
19641966
19651967
------------------------------------------------------------------------------
19661968
1967-
### RfRaw command duplicator
1968-
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).
1970-
1971-
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.
1972-
1973-
Unfortunately Tasmota can't handle more than 100 characters in an event variable, and since some RF codes can be longer than this, a workaround is needed. You need to split the code in two parts: first 32 characters will be assigned to a variable, and the rest of the characters will be sent through the event variable. Our rule will then take these two, combine them back, and issue the RfRaw command with the same, twice.
1974-
1975-
So originally in your HA system you had this payload, sent to the topic `cmnd/rf-bridge-1/backlog` in order to trigger an RF cover movement with Sonoff RF bridge. This sent your RF codes with RfRaw only once:
1976-
1977-
`rfraw AAB035050412FC061802BC019022F6A481A3B2B2A3B2A3A3B2B2B2A3A3B2B2A3B2A3B2A3A3B2A3A3B2A3B2A3A3B2B2A3A3B2A3B2A3B2A3B255;rfraw 0`
1978-
1979-
To make it work with our RfRaw repeater rule and send it multiple times, it should be modified like this:
1980-
1981-
`var1 AAB035050412FC061802BC019022F6A4; Event varf=81A3B2B2A3B2A3A3B2B2B2A3A3B2B2A3B2A3B2A3A3B2A3A3B2A3B2A3A3B2B2A3A3B2A3B2A3B2A3B255`
1982-
1983-
The payload will have be `var1 first-32-chars; Event varf=rest-of-the-chars` from the code.
1984-
1985-
#### Rule
1986-
1987-
```haskell
1988-
rule1 on event#varf do backlog RfRaw %var1%%value%; RfRaw %var1%%value%; RfRaw 0 endon
1989-
```
1990-
Enable it with `rule1 1`.
1991-
1992-
#### Result
1993-
1994-
The backlog coming through MQTT will:
1995-
1996-
- first set the first 32 characters of the code in variable `var1`;
1997-
- fire an event with variable `varf` containing the rest of the characters
1998-
1999-
The rule will detect the event (`on event`) and run a new backlog which will:
2000-
2001-
- run command RfRaw with code concatenated of `var1varf`;
2002-
- run command RfRaw with code concatenated of `var1varf` again;
2003-
- run command RfRaw 0
2004-
2005-
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`.
2006-
2007-
Backlog introduces an [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, for example 60 milliseconds with `SetOption34 60`.
2008-
2009-
2010-
2011-
------------------------------------------------------------------------------

0 commit comments

Comments
 (0)