Skip to content

Commit deeece4

Browse files
authored
Merge pull request tasmota#560 from BBBits/development
Add RfProtocol Command
2 parents 23322ae + 9da73f8 commit deeece4

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

docs/RF-Protocol.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ Otherwise you must [compile your build](Compile-your-build.md). Add the followin
1313
Tasmota uses the [rc-switch library](https://github.com/sui77/rc-switch/) to decode RF codes. Supported hardware depends on rc-switch library support only.
1414

1515
## Sending RF Codes
16-
Send an RF control code as a decimal or hexadecimal string in a JSON payload. An inexpensive RF receiver such as a [STX882](https://www.nicerf.com/product_132_82.html) can be connected to a device running Tasmota. In order to send RF data you need to _**configure the connected GPIO as `RFSend (105)`**_
16+
Send an RF control code as a decimal or hexadecimal string in a JSON payload. An inexpensive RF receiver such as a [STX882](https://www.nicerf.com/productslist_119_stx882.html) can be connected to a device running Tasmota. In order to send RF data you need to _**configure the connected GPIO as `RFSend (105)`**_
1717

18-
### RF Transciever
1918
Command|Parameters
2019
:---|:---
2120
RFsend<a id="rfsend"></a>|`<value>` = code decimal or JSON. Data value is required and can be decimal or hexadecimal (using the 0x prefix), other values are optional.<BR><BR>_JSON_<BR>`{"Data":"<value>","Bits":<value>,"Protocol":<value>,"Pulse":<value>}`<BR>`"Data":"<value>"` = hexadecimal code<BR>`"Bits":<value>` = required number of data bits _(default = `24`)_<BR>`"Protocol":<value>` = protocol number _(default = `1`)_<BR>`"Repeat":<value>` = repeat value _(default = `10`)_<BR>`"Pulse":<value>` = pulse value _(`350` = default for protocol 1)_<BR>&emsp;e.g., `RFsend {"Data":"0x7028DC","Bits":24,"Protocol":1,"Pulse":238}`<BR><BR>_Decimal_<BR>`data, bits, protocol, repeat, pulse` <BR>&emsp;e.g., `RFsend 7350492, 24, 1, 10, 238` or `RFsend 0x7028DC, 24, 1, 10, 238`
@@ -34,6 +33,24 @@ When sending decimal formatted command you need to follow the pattern otherwise
3433

3534
## Receiving RF Codes
3635
An inexpensive RF receiver such as a [SRX882](https://www.nicerf.com/product_132_82.html) can be connected to a device running Tasmota. Configure the GPIO connected to Data pin on the RF receiver as 'RFrecv (106)'.
36+
<br>Once you have identified the protocols that you want to receive data on , you can enable only those protocols .
37+
<br>The RfProtocol command will only work if you have set a pin function to rfrecv
38+
39+
Command|Parameters
40+
:---|:---
41+
RfProtocol<a id="RfProtocol"></a> `<value>`|`<value>` 0 .. 0x7FFFFFFFF or 'A' for All :: This Sets the Enabled Protocol Mask Value
42+
RfProtocol`<idx> <value>`|`<idx>` 1 .. 35 `<value>` 0 or 1 :: This Disables or Enables a Specific Protocol
43+
44+
!!! example
45+
`RfProtocol 5`
46+
<br> &nbsp; &nbsp; &nbsp; will enable only protocols 1 & 3 &nbsp; &nbsp; &nbsp; `stat/tasmota_D728A8/RESULT {"RfProtocol":"1,3"}`<br>
47+
`RfProtocol27 1`
48+
<br> &nbsp; &nbsp; &nbsp; will enable protocol 27 &nbsp; &nbsp; &nbsp; `stat/tasmota_D728A8/RESULT {"RfProtocol":"1,3,27"}`<br>
49+
`RfProtocol 0`
50+
<br> &nbsp; &nbsp; &nbsp;`stat/tasmota_D728A8/RESULT {"RfProtocol":"None Enabled"}`<br>
51+
`RfProtocol a`
52+
<br> &nbsp; &nbsp; &nbsp;`stat/tasmota_D728A8/RESULT {"RfProtocol":"1,2,3,4,5,6,7,8,9,10,11,12,`
53+
<br> &nbsp; &nbsp; &nbsp;`13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35"}`<br>
3754

3855
If you have an RF receiver configured, a message will be logged each time an RF code is seen. RF driver will try to decode it against all protocols supported by rc-switch library.
3956

mkdocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ nav:
8989
- PIR-Motion-Sensors.md
9090
- Power-Monitoring-Calibration.md
9191
- PWM-dimmer-switch.md
92-
- RF 433MHz Protocol: RF-Protocol.md
92+
- RF Communication: RF-Protocol.md
9393
- Rules.md
9494
- Scripting: Scripting-Language.md
9595
- Serial-to-TCP-Bridge.md

0 commit comments

Comments
 (0)