-
How Tasmota Decode the RF Signal :
When you press any button on an RF remote, a signal is received by all the receiver modules in your home connected to the ESPs. (in my case GPIO14 or D5) .
If you open the Console menu of (ex: “Bedroom”) you will find a line containing the RfReceived Data in HEX.
13:52:26 RSL: RESULT = {"Time":"2019-10-04T13:52:26","RfReceived":{"Data":"0x5555C0","Bits":24,"Protocol":1,"Pulse":464}}
if you are using MQTT it will show like this.
13:31:40 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-04T13:31:40","RfReceived":{"Data":"0x5555C0","Bits":24,"Protocol":1,"Pulse":464}}
this is an example of 3 buttons pressed successively
13:31:40 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-04T13:31:40","RfReceived":{"Data":"0x5555C0","Bits":24,"Protocol":1,"Pulse":464}}
13:31:42 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-04T13:31:42","RfReceived":{"Data":"0x5555C3","Bits":24,"Protocol":1,"Pulse":464}}
13:31:44 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-04T13:31:44","RfReceived":{"Data":"0x5555CC","Bits":24,"Protocol":1,"Pulse":465}}
now you have to decide which button you will use to { Turn On, Turn Off or Toggle } Relay1 and Relay2 to write the “RULE”.
ex: for 315 Mhz Bedroom
Rule1
on RfReceived#Data=0x4050C0 do power1 2 endon
on RfReceived#Data=0x405030 do power2 2 endon
on RfReceived#Data=0x40500C do backlog power1 1; power2 1 endon
on RfReceived#Data=0x405003 do backlog power1 0; power2 0 endon
Rule1 definition :
if button 3 on RF Remote is pressed Toggle Power1 Relay
if button 4 on RF Remote is pressed Toggle Power2 Relay
if button 1 on RF Remote is pressed Turn ON Power1 and Power2 Relays
if button 2 on RF Remote is pressed Turn OFF Power1 and Power2 Relays
when you send the Rule it has to be on one Line
don’t forget to turn on the Rule by sending
Rule1 1
If you want to use “2 RF Remotes” one inside the Bedroom and another one with 12 Buttons controlling all your house
Rule1
on RfReceived#Data=0x4050C0 do power1 2 endon
on RfReceived#Data=0x405030 do power2 2 endon
on RfReceived#Data=0x40500C do backlog power1 1; power2 1 endon
on RfReceived#Data=0x405003 do backlog power1 0; power2 0 endon
on RfReceived#Data=0x55550F do power1 2 endon
on RfReceived#Data=0x555530 do power2 2 endon
on RfReceived#Data=0x55550C do backlog power1 0; power2 0 endon
on RfReceived#Data=0x555503 do backlog power1 1; power2 1 endon
by pressing the button with code 0X555530 twice Relay2 will change from ON to OFF then to ON and your Console menu will show these lines
02:25:03 RUL: RFRECEIVED#DATA=0X555530 performs "power2 2"
02:25:03 MQT: Bedroom/stat/RESULT = {"POWER2":"OFF"}
02:25:03 MQT: Bedroom/stat/POWER2 = OFF
02:25:05 MQT: Bedroom/tele/RESULT = {"Time":"2019-10-05T02:25:05","RfReceived":{"Data":"0x555530","Bits":24,"Protocol":1,"Pulse":458}}
02:25:05 RUL: RFRECEIVED#DATA=0X555530 performs "power2 2"
02:25:05 MQT: Bedroom/stat/RESULT = {"POWER2":"ON"}
02:25:05 MQT: Bedroom/stat/POWER2 = ON
Also Panel Remote Transmitter can be used
see @Blynk_Coeur Topic Panel Remote Transmitter 3 Buttons
also his Blynk sketch HERE
a video on radio remote controls