Sonoff RF Bridge with ESPHOME?

Has anyone tried the new version of the Sonoff RF Bridge (Model RF BridgeR2) that comes in a white enclosure?

I have an older version of the bridge running Tasmota and all my sensors (motion/dooor/water/etc) have been working fine.

I flashed Esphome on this new BridgeR2 and setup some new motion and door sensors.

The problem I have is that the bridge running EspHome is showing different codes when the same sensor is triggered. This is happening with several sensors. Below is an example.

These are the logs shown on the Tasmota RF Bridge console:

These are the logs on the RF Bridge running EspHome:

The tasmotized bridge shows 698C20 every time the sensor is triggered. However the Esphome bridge shows sometimes 698C20 and a few times 698C2C

Is this a known problem with EspHome or the new Sonoff RF hardware?

Thanks for your help!

Hmm interesting. I have one of these, but not tasmotized or put esphome on it yet. Are you sure it’s not a different code from a different device?

Yes, I am sure. I have both RF bridges open at the same time to monitor them.

That seems to be error recieving the correct code. With my tasmotized gen 1 rfbridge that happens sometimes when receiving signal is not so good (devices far away or wall in between).

Hello,
I am also using stock firmware on RF chip, and using the code on ESPHome page (RF Bridge Component — ESPHome).
How can I create binary sensors for this?
I used to work with Tasmota/MQTT and coded like this:

mqtt:
  binary_sensor:
    - name: Alarme
      state_topic: "Tasmota-Bridge/tele/RESULT"
      value_template: '{{value_json.RfReceived.Data}}'
      payload_on: '3536F8'
      payload_off: '3536F0'
  
    - name: Alarme Porta
      state_topic: "Tasmota-Bridge/tele/RESULT"
      value_template: '{{value_json.RfReceived.Data}}'
      payload_on: '9B9A87'
      payload_off: '9B9A87off'
      device_class: door
      off_delay: 30

How do I do this on ESPHome RF Bridge?
Thanks

JS

I saw the same thing with my Sonoff RF Bridges. I used to have two black (original model ones), one of them died after a few years of use and I purchased one of the R2 (white) units to see if I could just drop it in. I flashed it with Tasmota just like I did with my black ones and put it into service. It seemed to work very well at first. Then I noticed my door/window sensors kept complaining that their batteries were dead, repeatedly!

After a lot of debug, I finally found that the new Sonoff RF Bridge R2 was reporting the wrong codes!! What’s worse is that the R2 unit was CLOSER to the triggered devices so it should have no problems decoding compared to the black unit still in use! Needless to say, I have just unplugged the garbage white R2 unit and I’m running solely from the original black unit. :angry:

For reference, here’s a snippet of logs from both my devices…

From old device (good transmission):

12:47:06.917 MQT: tele/sonoff-bridge-a/RESULT = {"Time":"2022-09-30T12:47:06","RfReceived":{"Sync":14150,"Low":500,"High":1370,"Data":"30060A","RfKey":"None"}}
12:48:07.877 MQT: tele/sonoff-bridge-a/RESULT = {"Time":"2022-09-30T12:48:07","RfReceived":{"Sync":14140,"Low":500,"High":1370,"Data":"30060E","RfKey":"None"}}
17:00:54.535 MQT: tele/sonoff-bridge-a/RESULT = {"Time":"2022-09-30T17:00:54","RfReceived":{"Sync":14090,"Low":480,"High":1400,"Data":"5F2B0A","RfKey":"None"}}
17:00:59.258 MQT: tele/sonoff-bridge-a/RESULT = {"Time":"2022-09-30T17:00:59","RfReceived":{"Sync":14120,"Low":490,"High":1390,"Data":"5F2B0E","RfKey":"None"}}
19:33:49.525 MQT: tele/sonoff-bridge-a/RESULT = {"Time":"2022-09-30T19:33:49","RfReceived":{"Sync":14200,"Low":480,"High":1380,"Data":"332D0E","RfKey":"None"}}
19:47:16.243 MQT: tele/sonoff-bridge-a/RESULT = {"Time":"2022-09-30T19:47:16","RfReceived":{"Sync":14060,"Low":510,"High":1360,"Data":"30060A","RfKey":"None"}}

From new device (bad transmission):

12:47:07.533 MQT: tele/sonoff-bridge-b/RESULT = {"Time":"2022-09-30T12:47:07","RfReceived":{"Sync":27930,"Low":888,"High":2688,"Data":"30060A","RfKey":"None"}}
12:48:08.629 MQT: tele/sonoff-bridge-b/RESULT = {"Time":"2022-09-30T12:48:08","RfReceived":{"Sync":27930,"Low":894,"High":2686,"Data":"30060E","RfKey":"None"}}
17:00:55.022 MQT: tele/sonoff-bridge-b/RESULT = {"Time":"2022-09-30T17:00:55","RfReceived":{"Sync":26794,"Low":982,"High":2622,"Data":"572B08","RfKey":"None"}}
17:00:59.823 MQT: tele/sonoff-bridge-b/RESULT = {"Time":"2022-09-30T17:00:59","RfReceived":{"Sync":26268,"Low":952,"High":2650,"Data":"5F2B06","RfKey":"None"}}
19:33:50.923 MQT: tele/sonoff-bridge-b/RESULT = {"Time":"2022-09-30T19:33:50","RfReceived":{"Sync":26270,"Low":914,"High":2666,"Data":"33250A","RfKey":"None"}}
19:47:17.094 MQT: tele/sonoff-bridge-b/RESULT = {"Time":"2022-09-30T19:47:17","RfReceived":{"Sync":26104,"Low":894,"High":2688,"Data":"30060A","RfKey":"None"}}

By the way, I complained to the AliExpress Sonoff store I purchased the new one from and as I expected, they were not interested in resolving anything. I’m really bummed that we can’t find the black units anymore. :frowning:

I moved off my hardware hacked Sonoff RF Bridge and onto these connected to an ESP32 after I hit up against limits in number of codes I could watch/send.

Very happy with it so far. I also hooked up and LED and an RTTL buzzer to it. I have it beep when I hit buttons on my 433mhz remotes so that I know it’s “been sent and heard”…

I tried a few ESp32’s I had and it became really solid when I used a Quinled.

I left it kind of exposed deliberately - it’s my “RF bug”…

substitutions:
  devicename: rf-transmitter-reciever-quinled
  friendly_name: rf Transmitter Reciever QuinLed
  device_description: DIY 433MHZ Transmitter Reciever
 
esphome:
  name: $devicename
  comment: ${device_description}
esp32:
  board: mhetesp32devkit
    
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true
  manual_ip:
      static_ip: xxx
      gateway: yyy
      subnet: zzz

api:
ota:

deep_sleep:
  run_duration: 24h
  sleep_duration: 1s

logger:
  # hardware_uart: UART1
  # level: VERY_VERBOSE
  # baud_rate: 0 
  
text_sensor:
# Reports the ESPHome Version with compile date
  - platform: version
    name: ${friendly_name} ESPHome Version
    #Tracks last movement direction to help with the one-touch sit/stand toggle button.
sensor:
  - platform: uptime
    name: ${friendly_name} Uptime Sensor
    update_interval: 60s
    accuracy_decimals: 1
    unit_of_measurement: hrs
    filters:
      - lambda: return x/60/60; 

######################
#Buzzer
######################    
rtttl:
  output: rtttl_out
  on_finished_playback:
    - logger.log: 'Song ended!'

output:
#Rttl buzzer
  - platform: ledc
    pin: GPIO27 #Yellow wire
    id: rtttl_out
    # frequency: 50
    
######################
#LED
######################   
  #Green
  - platform: ledc
    id: green_led
    pin: GPIO26 #Green wire
    # frequency: 50

light:
  - platform: monochromatic
    name: "Green LED"
    output: green_led
    id: rf_green_led
    internal: false
    
button:
  - platform: template
    name: rf Single Beep
    id: rf_single_beep
    on_press:
      then:
        - rtttl.play:
            rtttl: 'beep:d=4,o=7,b=100:32a' 

  - platform: template
    name: rf Single Beep
    id: rf_single_high_beep
    on_press:
      then:
        - rtttl.play:
            rtttl: 'beep:d=4,o=4,b=100:32a'
            
  - platform: template
    name: rf Double Beep
    id: rf_double_beep
    on_press:
      then:
        - rtttl.play:
            rtttl: 'beep:d=4,o=7,b=100:32a'  
        - delay: 200ms
        - rtttl.play:
            rtttl: 'beep:d=4,o=7,b=100:32a'  
  - platform: template
    name: rf Single LED Flash
    id: rf_single_led_flash
    on_press:
      then:
        - light.turn_on:
              id: rf_green_led
              brightness: 50%
        - delay: 500ms
        - light.turn_off: rf_green_led
  - platform: template
    name: rf Double LED Flash
    id: rf_double_led_flash
    on_press:
      then:
        - light.turn_on:
              id: rf_green_led
              brightness: 50%
        - delay: 500ms
        - light.turn_off: rf_green_led
        - delay: 500ms
        - light.turn_on:
              id: rf_green_led
              brightness: 50%
        - delay: 500ms
        - light.turn_off: rf_green_led
        
remote_receiver:
  pin:
    number: GPIO25 #Blue wire
    inverted: true
  dump:
    - rc_switch
  tolerance: 60%
  filter: 4us
  idle: 4ms    
    # - raw
  # filter: 50us
  # tolerance: 50%
  # idle: 2ms

  # filter: 100us
  # tolerance: 50%
  # idle: 2ms  
  
remote_transmitter:
  pin: 
    number: GPIO33 #Green wire
    # inverted: True
  carrier_duty_percent: 100%

switch:
###############################################
#Control Shed Door
###############################################
  - platform: template
    name: Release Shed Door
    turn_on_action:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010000000101000101010001'
          protocol: 
            pulse_length: 320
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: Reset Shed Door
    turn_on_action:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010000000101000101010100'
          protocol: 
            pulse_length: 320
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: Stop Release Shed Door dev
    turn_on_action:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010000000101000101010101'
          protocol: 
            pulse_length: 320
          repeat:
            times: 10
            wait_time: 0s
       
binary_sensor:
# #remote 1) top left meute
  # - platform: remote_receiver
    # id: remote1topleft_togglednd
    # name: "Toggle DND"
    # rc_switch_raw:
      # code: '111111110101111101110001'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
# #remote 1) top right togglemusic
  # - platform: remote_receiver
    # id: remote1topright_togglemusic
    # name: "Toggle Music"
    # rc_switch_raw:
      # code: '101000110100101111000001'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
# #remote 1) bottom left toggle blinds
  # - platform: remote_receiver
    # id: remote1bottomleft_toggleblinds
    # name: "Toggle Blinds"
    # rc_switch_raw:
      # code: '111111110101111101110010'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
# #remote 1) bottom right toggle blinds
  # - platform: remote_receiver
    # id: remote1bottomright_toggleblinds
    # name: "Toggle Light"
    # rc_switch_raw:
      # code: '111111110101111101111000'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
      
############################################      
#bedroom thermostat remote
############################################
  - platform: remote_receiver
    id: bedremotewarmer
    name: "Bedroom Remote Warmer"
    rc_switch_raw:
      code: '000000011011000001010010'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: bedremotetoggleclimate
    name: "Bedroom Remote Toggle Climate"
    rc_switch_raw:
      code: '000000011011000001010100'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: bedremotecooler
    name: "Bedroom Remote Cooler"
    rc_switch_raw:
      code: '000000011011000001011000'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
      
      
########################################################################################
#10 button remotes
########################################################################################
############################################
#Start Desk Remote
############################################
#remote R1C1 - Temp Increase
  - platform: remote_receiver
    id: desk_r1c1_temp_increase
    name: "DeskRemote_TempIncrease"
    rc_switch_raw:
      code: '010011001011010101100100'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C2 - AC Toggle
  - platform: remote_receiver
    id: desk_r1c2_ac_toggle
    name: "DeskRemote_ac_toogle"
    rc_switch_raw:
      code: '010011001011010101100010'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C3 - Temp Decrease
  - platform: remote_receiver
    id: desk_r1c3_temp_decrease
    name: "DeskRemote_TempDecrease"
    rc_switch_raw:
      code: '010011001011010101100110'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C4 - Toggle DND
  - platform: remote_receiver
    id: desk_r1c4_dnd_toggle
    name: "DeskRemote_ToggleDND"
    rc_switch_raw:
      code: '010011001011010101100001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C5 - Toggle Vac
  - platform: remote_receiver
    id: desk_r1c5_vac_toggle
    name: "DeskRemote_ToggleVAC"
    rc_switch_raw:
      code: '010011001011010101100101'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C1 - Toggle Vac
  - platform: remote_receiver
    id: desk_r2c1_music_vol_increase
    name: "DeskRemote_Music_VolIncrease"
    rc_switch_raw:
      code: '010011001011010101101000'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C2 - Toggle Music
  - platform: remote_receiver
    id: desk_r2c2_music_toggle
    name: "DeskRemote_Music_Toggle"
    rc_switch_raw:
      code: '010011001011010101101100'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C3 - Music Vol Down
  - platform: remote_receiver
    id: desk_r2c3_music_vol_decrease
    name: "DeskRemote_Music_VolDecrease"
    rc_switch_raw:
      code: '010011001011010101101010'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C4 - Toggle Blinds
  - platform: remote_receiver
    id: desk_r2c4_blind_toggle
    name: "DeskRemote_Blinds_Toggle"
    rc_switch_raw:
      code: '010011001011010101101110'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C4 - Toggle Lights
  - platform: remote_receiver
    id: desk_r2c5_lights_toggle
    name: "DeskRemote_Lights_Toggle"
    rc_switch_raw:
      code: '010011001011010101101001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep

############################################
#End Desk Remote
############################################

# ############################################
# #Start Dining Remote
# ############################################

#remote R1C1 - Temp Increase
  - platform: remote_receiver
    id: dining_r1c1_temp_increase
    name: "diningRemote_TempIncrease"
    rc_switch_raw:
      code: '101101000111010100100100'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C2 - AC Toggle
  - platform: remote_receiver
    id: dining_r1c2_ac_toggle
    name: "diningRemote_ac_toogle"
    rc_switch_raw:
      code: '101101000111010100100010'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C3 - Temp Decrease
  - platform: remote_receiver
    id: dining_r1c3_temp_decrease
    name: "diningRemote_TempDecrease"
    rc_switch_raw:
      code: '101101000111010100100110'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C4 - Toggle DND
  - platform: remote_receiver
    id: dining_r1c4_dnd_toggle
    name: "diningRemote_ToggleDND"
    rc_switch_raw:
      code: '101101000111010100100001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C5 - Toggle Vac
  - platform: remote_receiver
    id: dining_r1c5_vac_toggle
    name: "diningRemote_ToggleVAC"
    rc_switch_raw:
      code: '101101000111010100100101'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C1 - Toggle Vac
  - platform: remote_receiver
    id: dining_r2c1_music_vol_increase
    name: "diningRemote_Music_VolIncrease"
    rc_switch_raw:
      code: '101101000111010100101000'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C2 - Toggle Music
  - platform: remote_receiver
    id: dining_r2c2_music_toggle
    name: "diningRemote_Music_Toggle"
    rc_switch_raw:
      code: '101101000111010100101100'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C3 - Music Vol Down
  - platform: remote_receiver
    id: dining_r2c3_music_vol_decrease
    name: "diningRemote_Music_VolDecrease"
    rc_switch_raw:
      code: '101101000111010100101010'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C4 - Toggle Blinds
  - platform: remote_receiver
    id: dining_r2c4_blind_toggle
    name: "diningRemote_Blinds_Toggle"
    rc_switch_raw:
      code: '101101000111010100101110'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C4 - Toggle Lights
  - platform: remote_receiver
    id: dining_r2c5_lights_toggle
    name: "diningRemote_Lights_Toggle"
    rc_switch_raw:
      code: '101101000111010100101001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep

############################################
#End Dining Remote
############################################

############################################
#Start kitchen Remote
############################################

#remote R1C1 - Temp Increase
  - platform: remote_receiver
    id: kitchen_r1c1_temp_increase
    name: "kitchenRemote_TempIncrease"
    rc_switch_raw:
      code: '001110110110110010100100'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C2 - AC Toggle
  - platform: remote_receiver
    id: kitchen_r1c2_ac_toggle
    name: "kitchenRemote_ac_toogle"
    rc_switch_raw:
      code: '001110110110110010100010'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C3 - Temp Decrease
  - platform: remote_receiver
    id: kitchen_r1c3_temp_decrease
    name: "kitchenRemote_TempDecrease"
    rc_switch_raw:
      code: '001110110110110010100110'
      protocol: 6
    filters:
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C4 - Toggle DND
  - platform: remote_receiver
    id: kitchen_r1c4_dnd_toggle
    name: "kitchenRemote_ToggleDND"
    rc_switch_raw:
      code: '001110110110110010100001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C5 - Toggle Vac
  - platform: remote_receiver
    id: kitchen_r1c5_vac_toggle
    name: "kitchenRemote_ToggleVAC"
    rc_switch_raw:
      code: '001110110110110010100101'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
      
  - platform: remote_receiver
    id: kitchen_r2c1_music_vol_increase
    name: "kitchenRemote_Music_VolIncrease"
    rc_switch_raw:
      code: '001110110110110010101000'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C2 - Toggle Music
  - platform: remote_receiver
    id: kitchen_r2c2_music_toggle
    name: "kitchenRemote_Music_Toggle"
    rc_switch_raw:
      code: '001110110110110010101100'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C3 - Music Vol Down
  - platform: remote_receiver
    id: kitchen_r2c3_music_vol_decrease
    name: "kitchenRemote_Music_VolDecrease"
    rc_switch_raw:
      code: '001110110110110010101010'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C4 - Toggle Blinds
  - platform: remote_receiver
    id: kitchen_r2c4_blind_toggle
    name: "kitchenRemote_Blinds_Toggle"
    rc_switch_raw:
      code: '001110110110110010101110'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C4 - Toggle Lights
  - platform: remote_receiver
    id: kitchen_r2c5_lights_toggle
    name: "kitchenRemote_Lights_Toggle"
    rc_switch_raw:
      code: '001110110110110010101001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep

############################################
#End kitchen Remote
############################################

############################################
#Start couch Remote
############################################

#remote R1C1 - Temp Increase
  - platform: remote_receiver
    id: couch_r1c1_temp_increase
    name: "couchRemote_TempIncrease"
    rc_switch_raw:
      code: '001100001000010000100100'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C2 - AC Toggle
  - platform: remote_receiver
    id: couch_r1c2_ac_toggle
    name: "couchRemote_ac_toogle"
    rc_switch_raw:
      code: '001100001000010000100010'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C3 - Temp Decrease
  - platform: remote_receiver
    id: couch_r1c3_temp_decrease
    name: "couchRemote_TempDecrease"
    rc_switch_raw:
      code: '001100001000010000100110'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C4 - Toggle DND
  - platform: remote_receiver
    id: couch_r1c4_dnd_toggle
    name: "couchRemote_ToggleDND"
    rc_switch_raw:
      code: '001100001000010000100001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R1C5 - Toggle Vac
  - platform: remote_receiver
    id: couch_r1c5_vac_toggle
    name: "couchRemote_ToggleVAC"
    rc_switch_raw:
      code: '001100001000010000100101'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C1 - Toggle Vac
  - platform: remote_receiver
    id: couch_r2c1_music_vol_increase
    name: "couchRemote_Music_VolIncrease"
    rc_switch_raw:
      code: '001100001000010000101000'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C2 - Toggle Music
  - platform: remote_receiver
    id: couch_r2c2_music_toggle
    name: "couchRemote_Music_Toggle"
    rc_switch_raw:
      code: '001100001000010000101100'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C3 - Music Vol Down
  - platform: remote_receiver
    id: couch_r2c3_music_vol_decrease
    name: "couchRemote_Music_VolDecrease"
    rc_switch_raw:
      code: '001100001000010000101010'
      protocol: 6
    filters:
      - delayed_off: 200ms
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C4 - Toggle Blinds
  - platform: remote_receiver
    id: couch_r2c4_blind_toggle
    name: "couchRemote_Blinds_Toggle"
    rc_switch_raw:
      code: '001100001000010000101110'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#remote R2C4 - Toggle Lights
  - platform: remote_receiver
    id: couch_r2c5_lights_toggle
    name: "couchRemote_Lights_Toggle"
    rc_switch_raw:
      code: '001100001000010000101001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep

############################################
#End couch Remote
###########################################

###########################################
#H Remote
###########################################
  - platform: remote_receiver
    id: hdooropen
    name: "H Door Open"
    rc_switch_raw:
      code: '000000000010110000100010'
      protocol: 6
    filters:
      - delayed_off: 5s
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: hdoorclose
    name: "H Door Close"
    rc_switch_raw:
      code: '000000000010110000101000'
      protocol: 6
    filters:
      - delayed_off: 5s
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: hspecialheat
    name: "H likes it hot"
    rc_switch_raw:
      code: '000000000010110000100100'
      protocol: 6
    filters:
      - delayed_off: 5s
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: bigbattle44
    name: "Big Battle"
    rc_switch_raw:
      code: '010001001010100101100001'
      protocol: 6
    filters:
      - delayed_off: 5s
    on_press:
      then:
        - button.press: rf_single_high_beep
  # - platform: remote_receiver
    # id: flossboss
    # name: "Floss Boss"
    # rc_switch_raw:
      # code: '101010000001110010101000'
      # protocol: 6
    # filters:
      # - delayed_off: 5s
  # - platform: remote_receiver
    # id: brushboss
    # name: "Brush Boss"
    # rc_switch_raw:
      # code: '101010000001110010100010'
      # protocol: 6
    # filters:
      # - delayed_off: 5s

  - platform: remote_receiver
    id: closesheddoor
    name: "Close Shed Door Button"
    rc_switch_raw:
      code: '111111001010110100101000'
      protocol: 6
    filters:
      - delayed_off: 2s
    on_press:
      then:
        - button.press: rf_single_high_beep
  # - platform: remote_receiver
    # id: resetsheddoor
    # name: "Reset Shed Door Button"
    # rc_switch_raw:
      # code: '111111001010110100100010'
      # protocol: 6
    # filters:
      # - delayed_off: 2s

  - platform: remote_receiver
    id: couchpir1 
    device_class: motion
    name: "Couch PIR 1"
    rc_switch_raw:
      code: '110101000010001001100110'
      protocol: 6
    filters:
      # - delayed_on: 500ms
      - delayed_off: 10s
      # - delayed_on_off: 500ms
  # - platform: remote_receiver
    # id: dunnypir
    # device_class: motion
    # name: "Dunny PIR"
    # rc_switch_raw:
      # code: '100011000101011001100110'
      # protocol: 6
    # filters:
      # - delayed_off: 5s
  # - platform: remote_receiver
    # id: pir3
    # device_class: motion
    # name: "PIR3"
    # rc_switch_raw:
      # code: '110010001110010001100110'
      # protocol: 6
    # filters:
      # - delayed_off: 600s
      
# ################################################################
# #Sonoff Remote - Balcony
# ################################################################
#Row 1
  - platform: remote_receiver
    id: sonoffrmc1r3_togglediscolight
    name: "Sonoff Remote Toggle Disco Light"
    # id: sonoffrmc1r3_togglefrontdoorlock
    # name: "Sonoff Remote Toggle Front Door Lock"
    rc_switch_raw:
      code: '001001110111001001101000'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: sonoffrmc1r2_toggleblinds
    name: "Sonoff Remote Toggle Blinds"
    rc_switch_raw:
      code: '001001110111001001101100'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#Row 2
  - platform: remote_receiver
    id: sonoffrmc1r1_lighttoggle
    name: "Sonoff Remote Toggle Light"
    rc_switch_raw: 
      code: '001001110111001001100100'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: sonoffrmc2r2_togglevacuum
    name: "Sonoff Remote Toggle Vacuum"
    rc_switch_raw:
      code: '001001110111001001101001'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#Row 3
  - platform: remote_receiver
    id: sonoffrmc2r3_togglethermostat
    name: "Sonoff Remote Toggle Thermostat"
    rc_switch_raw:
      code: '001001110111001001100010'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: sonoffrmc2r1_togglemusic
    name: "Sonoff Remote Toggle Music"
    rc_switch_raw:
      code: '001001110111001001100101'
      protocol: 6
    filters:
      - delayed_off: 1s
    on_press:
      then:
        - button.press: rf_single_high_beep
#Row 4
  - platform: remote_receiver
    id: sonoffrmc1r4_musicvoldown
    name: "Sonoff Remote Music Vol Down"
    rc_switch_raw:
      code: '001001110111001001100001'
      protocol: 6
    filters:
      - delayed_off: 300ms
    on_press:
      then:
        - button.press: rf_single_high_beep
  - platform: remote_receiver
    id: sonoffrmc2r4_musicvolup
    name: "Sonoff Remote Music Vol Up"
    rc_switch_raw:
      code: '001001110111001001100011'
      protocol: 6
    filters:
      - delayed_off: 300ms
    on_press:
      then:
        - button.press: rf_single_high_beep

  # - platform: remote_receiver
    # id: sonoffrmc1r1_lighttoggle
    # name: "Sonoff Remote Toggle Light"
    # rc_switch_raw:
      # code: '001001110111001001101000'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
  # - platform: remote_receiver
    # id: sonoffrmc2r1_togglemusic
    # name: "Sonoff Remote Toggle Music"
    # rc_switch_raw:
      # code: '001001110111001001101100'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
  # - platform: remote_receiver
    # id: sonoffrmc1r2_toggleblinds
    # name: "Sonoff Remote Toggle Blinds"
    # rc_switch_raw: 
      # code: '001001110111001001100100'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
  # - platform: remote_receiver
    # id: sonoffrmc2r2_togglevacuum
    # name: "Sonoff Remote Toggle Vacuum"
    # rc_switch_raw:
      # code: '001001110111001001101001'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
  # - platform: remote_receiver
    # id: sonoffrmc1r3_togglefrontdoorlock
    # name: "Sonoff Remote Toggle Front Door Lock"
    # rc_switch_raw:
      # code: '001001110111001001100010'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
  # - platform: remote_receiver
    # id: sonoffrmc2r3_togglethermostat
    # name: "Sonoff Remote Toggle Thermostat"
    # rc_switch_raw:
      # code: '001001110111001001100101'
      # protocol: 6
    # filters:
      # - delayed_off: 1s
  # - platform: remote_receiver
    # id: sonoffrmc1r4_musicvoldown
    # name: "Sonoff Remote Music Vol Down"
    # rc_switch_raw:
      # code: '001001110111001001100001'
      # protocol: 6
  # - platform: remote_receiver
    # id: sonoffrmc2r4_musicvolup
    # name: "Sonoff Remote Music Vol Up"
    # rc_switch_raw:
      # code: '001001110111001001100011'
      # protocol: 6    
5 Likes

Can you supply the config you’re using for these?

Added to post above.

Bit late to the show… can you also share the yaml for the end devices - the ones that are receiving this RF codes/instructions.

There’s only one recieving device and it’s not ESPHome based.

It’s a relay like this…

AU $6.17 | wireless remote control switch 433mhz rf transmitter receiver 3.7v 4.5v 9v 12v motor Forward Reverse steering Controller module
https://a.aliexpress.com/_mrbpjx4

Most of the codes are listening for cheap remotes.

1 Like

Hello,

i have problem with the received code, they changed but its the same button on the remote :

first press to light_on the light of the ceiling fan :

Received RCSwitch Raw: protocol=6 data='10010110000100110000010001000111'

second press to light_off :

Received RCSwitch Raw: protocol=6 data='10010110000100110000010001010110'

third to light_on:

Received RCSwitch Raw: protocol=6 data='10010110000100110000010001100101'

fourth to light_off:

Received RCSwitch Raw: protocol=6 data='10010110000100110000010001110100'

5th:

Received RCSwitch Raw: protocol=6 data='10010110000100110000010000000011'

my settings :

remote_receiver:

  pin:
    number: GPIO04
    inverted: true
  dump: rc_switch
  filter: 4us
  tolerance: 50%
  idle: 4ms

if i put “inverted: false” the protocol is 1 and no more 6.

The only thing i notice is the last bit is 0 for light_off and 1 for light_on, so i masked the last 6 bits that continuisly changed by x like this :

binary_sensor:
  - platform: remote_receiver
    name: "light brasseur bureau on"
    internal: yes
    rc_switch_raw:
      code: '1001011000010011000001000xxxxxx1'
      protocol: 6
    on_press:
      - binary_sensor.template.publish:
          id: light_brasseur_bureau
          state: ON
  - platform: remote_receiver
    name: "light brasseur bureau off"
    internal: yes
    rc_switch_raw:
      code: '1001011000010011000001000xxxxxx0'
      protocol: 6
    on_press:
      - binary_sensor.template.publish:
          id: light_brasseur_bureau
          state: OFF
  - platform: template
    name: "Light Brasseur Bureau State"
    device_class: light
    id: light_brasseur_bureau

Any idea please why the code changes on the last 6 bits? and why the code are received 4 times for each press like this:

[08:28:48][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010001100101'
[08:28:48][D][binary_sensor:036]: 'light brasseur bureau on': Sending state ON
[08:28:48][D][binary_sensor:036]: 'light brasseur bureau on': Sending state OFF
[08:28:48][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010001100101'
[08:28:48][D][binary_sensor:036]: 'light brasseur bureau on': Sending state ON
[08:28:48][D][binary_sensor:036]: 'light brasseur bureau on': Sending state OFF
[08:28:48][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010001100101'
[08:28:49][D][binary_sensor:036]: 'light brasseur bureau off': Sending state ON
[08:28:49][D][binary_sensor:036]: 'Light Brasseur Bureau State': Sending state OFF
[08:28:49][D][binary_sensor:036]: 'light brasseur bureau off': Sending state OFF
[08:28:49][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010001110100'
[08:28:49][D][binary_sensor:036]: 'light brasseur bureau off': Sending state ON
[08:28:49][D][binary_sensor:036]: 'light brasseur bureau off': Sending state OFF
[08:28:49][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010001110100'
[08:28:49][D][binary_sensor:036]: 'light brasseur bureau off': Sending state ON
[08:28:49][D][binary_sensor:036]: 'light brasseur bureau off': Sending state OFF
[08:28:49][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010001110100'
[08:28:49][D][binary_sensor:036]: 'light brasseur bureau off': Sending state ON
[08:28:49][D][binary_sensor:036]: 'light brasseur bureau off': Sending state OFF
[08:28:49][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010001110100'
[08:28:50][D][binary_sensor:036]: 'light brasseur bureau on': Sending state ON
[08:28:50][D][binary_sensor:036]: 'Light Brasseur Bureau State': Sending state ON
[08:28:50][D][binary_sensor:036]: 'light brasseur bureau on': Sending state OFF
[08:28:50][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010000000011'
[08:28:50][D][binary_sensor:036]: 'light brasseur bureau on': Sending state ON
[08:28:50][D][binary_sensor:036]: 'light brasseur bureau on': Sending state OFF
[08:28:50][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010000000011'
[08:28:50][D][binary_sensor:036]: 'light brasseur bureau on': Sending state ON
[08:28:50][D][binary_sensor:036]: 'light brasseur bureau on': Sending state OFF
[08:28:50][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010000000011'
[08:28:50][D][binary_sensor:036]: 'light brasseur bureau on': Sending state ON
[08:28:50][D][binary_sensor:036]: 'light brasseur bureau on': Sending state OFF
[08:28:50][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='10010110000100110000010000000011'

i have a new Sonoff RF Bridge (white) V2R2, hacked. I have order a new one and i will test with Sonofflocal from Alexxit.
Before hack the RF Bridge i have try and i succeed to integrate it in ha with HACS addOn from Alexxit with the credentials of the “eWeLink” APP Android. It appear in Devices like my BroadLink RF Receiver. But i dont go further and then Hack it and flash it with Esphome. I regret a bit…

Try this and see if it works

remote_receiver:
  pin: 4
  dump: rc_switch
  tolerance: 35
  filter: 4us
  idle: 4ms

That’s my settings for over a year now, and it’s been great

thanks for your help, but no difference…code always change his 6 last bit.

and if i put 4us instead of 250, i received 6 time the same code.

i have 6 ceiling fan, each has differents codes, seems the first 25 bits are fixed, but the 6 last always change at each press.

very anoying…complicated to do something with this changing codes…

1 is more common than 6 in my experience. Are the 1 codes otherwise the same as the 6 codes or are they different?

Did you try dump: all ?

1 Like

If it’s any help I noticed that the last two bytes seems to count up and down. The second last counts up and the last counts down. And with the samples I could see only the last 3 bits of each byte is included in the count, the most significant bit is always zero
So the sequence from your first example to the last is
47
56
65
74
03

And I guess that if you would have continued:
12
21
30
47
56
Etc…

Yes I know that your sequence was turn on and off, so it would be valuable to also see it in sequential turn on sequences and/or sequential turn off sequences

2 Likes

yes…its a total mess, i have plenty of codes received…no usuable at all.

Thanks for your help,

i stop with this method and i use the Sonoff RF Bridge with his stock firmware, who work as expected and recognize the learned codes.

interesting! thanks

i stop with this method, i use an another SonOff RF Bridge with stock firmware, without any hardware modification and it works, i mean recognize the learned codes, a lot much easier to deal with into HA…

@Olivier974 - did you ever try to use the Tasmota FW for your RF Bridge?

1 Like

no.

With Tasmota FW, does it need some hardware modification or it use the genuine microcontroleur + ESP32 like the Sonoff does?