Skip to content

RF 433MHz Protocol

This feature is included only in tasmota-sensors.bin

Otherwise you must compile your build. Add the following to user_config_override.h:

#ifndef USE_RCSWITCH
#define USE_RC_SWITCH         // Add support for RF transceiver using library RcSwitch (+2k7 code, 460 iram)
#endif

This guide does not apply to Sonoff RF Bridge specific commands

Tasmota uses the rc-switch library to decode RF codes. Supported hardware depends on rc-switch library support only.

Sending RF Codes~

Send an RF control code as a decimal or hexadecimal string in a JSON payload. An inexpensive RF receiver such as a STX882 can be connected to a device running Tasmota. In order to send RF data you need to configure the connected GPIO as RFSend (105)

RF Transciever~

Command Parameters
RFsend <value> = code decimal or JSON. Data value is required and can be decimal or hexadecimal (using the 0x prefix), other values are optional.

JSON
{"Data":"<value>","Bits":<value>,"Protocol":<value>,"Pulse":<value>}
"Data":"<value>" = hexadecimal code
"Bits":<value> = required number of data bits (default = 24)
"Protocol":<value> = protocol number (default = 1)
"Repeat":<value> = repeat value (default = 10)
"Pulse":<value> = pulse value (350 = default for protocol 1)
 e.g., RFsend {"Data":"0x7028DC","Bits":24,"Protocol":1,"Pulse":238}

Decimal
data, bits, protocol, repeat, pulse
 e.g., RFsend 7350492, 24, 1, 10, 238 or RFsend 0x7028DC, 24, 1, 10, 238

If you send only the "Data" value in decimal or hexadecimal other values will be sent as default.

Example

RfSend 123456

will be sent as {"Data":"0x1E240","Bits":24,"Protocol":1,"Pulse":351}

When sending decimal formatted command you need to follow the pattern otherwise a part of the command will be ignored.

Example

RfSend 123456, 24, 1, 238 is missing the repeat value so the last number intended as pulse value won't be sent

Receiving RF Codes~

An inexpensive RF receiver such as a SRX882 can be connected to a device running Tasmota. Configure the GPIO connected to Data pin on the RF receiver as 'RFrecv (106)'.

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.

When Tasmota receives an RF message, the data portion of the payload has the same format as the RFSend JSON parameters.

"RfReceived":{"Data":"<hex-value>","Bits":<value>,"Protocol":<value>,"Pulse":<value>}

This JSON payload data can be used in a rule such as:

ON RfReceived#Data=<hex-value> DO <command> ENDON

Examples:
Sonoff RM433 Remote
MQT: tele/tasmota/RESULT = {"Time":"2020-05-27T18:59:06","RfReceived":{"Data":"0x7028D2","Bits":24,"Protocol":1,"Pulse":238}}