Sonoff RF Bridge with ESPHOME?

Yes. Any of these is fine. Just take care that they support 3.3V, as 5V will fry the ESP.

1 Like

And check that both the Vcc and rx/tx pins are at 3.3v before connecting to the Sonoff; I’ve seen a few adapters with selectable voltages that didn’t actually change all of the pins, resulting in Vcc at 3.3v and rx/tx at 5v or the other way around, which is bad.

The first couple hits with FTDI FT232RL on red PCB look a lot like the ones I’m currently using.

1 Like

Thanks, I pulled the pin on one of these.

Anyone gotten 433Mhz dimmers to work with this? I know I can send the on code and they’ll pulsate up and down until I send the on code again, and then stay at that dimmed level. However I’d like to recreate the possibility to send a random % to the dimmer from tasks, as well as having three buttons off, on (last state) and on (100%)

Hi guys,

I successfully flashed the RF bridge R2 v1 with Esphome. Now I would like to understand what the hell the log is giving me:
hundreds of records like this:

20:04:33][D][remote.raw:028]: -112, 149, -277, 68, -200, 206, -168, 193, -247, 154, -367, 291, -199, 59, -99, 69, -387, 197, -130, 160, -100, 86, -563, 132, -132, 421, -124, 126, -65, 969, -177, 298, -65, 132, -60, 218, -115, 347, -102, 192, -67, 158, -342, 151, -162, 263, -180,
[20:04:33][D][remote.raw:041]: 81, -158, 402, -280, 95, -534, 297, -60, 68, -183, 194, -71, 412, -99, 59, -53, 486, -192, 304, -57, 245, -111, 134, -115, 60, -237, 335, -117, 70, -106, 179, -111, 94
[20:04:33][D][remote.raw:028]: Received Raw: 578, -323, 1548, -83, 1829, -967, 1591, -88, 1248, -268, 358, -142, 343, -102, 502, -201, 326, -71, 144, -355, 403, -593, 54, -471, 264, -52, 69, -132, 640, -181, 231, -70, 304, -229, 54, -150, 138, -144, 615, -60, 144, -892, 153, -96, 204,
[20:04:33][D][remote.raw:041]: -930, 1881, -80, 2990, -90, 69, -121, 1629, -375, 158, -90, 89, -166, 612, -236, 473, -57, 85, -216, 354, -201, 411, -79, 1425, -65, 373, -99, 138, -73, 760, -184, 217, -80, 517, -471, 715, -60, 373, -98, 289, -62

And it goes on continuously … (dump: all) and I can’t identify any button push

If I switch dump to rc_switch - the list doesn’t show any code and when I push the buttons on remotes - one push out of 10 it gives me a random code like ‘000000011111’. The accuracy of the reading is bad at least.
I am only interested in the RF codes of the remotes (7 blinds RF motors)

Can I do something to catch all codes? Have I done the HW modification wrong maybe?

I can’t help with the issue, but I’m scoping out the same project (I think). What rf blind motors did you go with? I’m thinking some battery ones like this. AU $93.47 34%OFF | DM25LE, battery motor, DOOYA tubular motor, for Dia. 38mm tube

Oh and I remember seeing this on the Esphome site. Not sure if it helps.
Note
If the log output is flooded with “Received Raw” messages, you can also disable raw remote code reporting and rely on rc_switch to decode the values.

Note
If the log output is flooded with “Received Raw” messages, you can also disable raw remote code reporting and rely on rc_switch to decode the values.

remote_receiver:
  pin: D0
  dump:
    - rc_switch
  tolerance: 50%
  filter: 250us
  idle: 4ms
  buffer_size: 2kb
2 Likes

I sure did that, but when I press the buttons on the remote i sometimes receive in the log 2 codes but for next pushes…nothing. and sometimes stupid codes like 11111111111 and 000000000 which shows a decoding error. I am so upset i cut the circuit to the original decoding chip on the RF bridge. Maybe it would of worked with my remotes.
Regards

Oh I see now. That’s a shame. Not sounding promising for my project - my plan was to do the same. Tech rage! Make some “insider art” with the remains like Homer did. https://youtu.be/VY7PshrtKR8

Were you able to get any further with this? I was running into the same issue myself when trying to convert my tasmota flashed bridge over to esphome. When I have dump set to rc_switch it doesn’t show any dumps from the codes it’s receiving (although programmed codes do make the light flash red) but still the log didn’t show anything for rc_switch. Raw just outputs tons of garbage (which I’m assuming is interference)

I flashed espurna which helped me confirm that the hardware modification did work ok and using it I can capture codes.

I’d really like to get everything moved off mqtt if I can so I’d appreciate any advice anyone has?

1 Like

As a side note. Over the last day I’ve noticed that the response speeds of the RF-bridge/MQTT connection are much quicker after doing the hardware mod then they were with tasmota. I suppose that extra chip must be slowing things down some…

I can confirm you that the internal decoder is slowing down the transmissions compared to a direct wiring to an ESP. I have several bridge and the RF bridge without direct mod is always the last.

I have moved everything to esphome byt rf motion sensors. Iwish there was a good way to do it. I use openmqttgateway for months and it is extremally stable but esphome has its appeal :grin:

is it possible to template this so it appears in home assistant as an opening instead of a switch?

I know its possible inside home assistant but I was hoping it was possible within the node

I belive so. It could be used as binary sensor template and set as motion/opening

I wanted to share with everyone where I’ve gotten to now. I’ve been able to get my rf bridge consistently reading codes using the yaml below. One thing I found is the web server view of the debug log doesn’t work as well as the “show logs” from within esphome.

I’m really new to ESPhome so I’d love any advice on how to optimize how I’m controlling the covert component? Right now I’m using the binary sensor to flip the internal switch which is read by the lamda for the cover template.
It works and all, but it’s pretty lengthy…

Thanks for everyones help on this so far.

esphome:
  name: sonoff_rf_bridge01
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: 'XXXXXX'
  password: 'XXXXXX'


# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

web_server:
  port: 80
  
remote_receiver:
  pin: 
    number: 4
  dump: rc_switch
  filter: 100us
  tolerance: 50%
  idle: 2ms

status_led:
  pin:
    number: GPIO13
    inverted: yes  
## sensors ##
binary_sensor:
  - platform: status
    name: "RF Bridge Status"  
#patio door
  - platform: remote_receiver
    internal: true
    name: "UP_PD_Door on"
    rc_switch_raw:
      code: '001011110111010000001110'    
    on_press:
      then:
        - switch.template.publish:
            id: Up_Patio_Door
            state: ON
  - platform: remote_receiver
    internal: true
    name: "UP_PD_Door off"
    rc_switch_raw:
      code: '001011110111010000001010'    
    on_press:
      then:
        - switch.template.publish:
            id: Up_Patio_Door
            state: OFF    
            
cover:            
  - platform: template
    device_class: door
    name: "upstairs_patio"
    lambda: |-
          if (id(Up_Patio_Door).state) {
            return COVER_OPEN;
          } else {
            return COVER_CLOSED;
          }
    


switch:
## internal switches here for controlling the cover
  - platform: template
    internal: true
    id: Up_Patio_Door
2 Likes
  - platform: remote_receiver
    name: "Back Door (RF-On)"
    device_class: opening
    internal: true
    on_press:
      then:
        - binary_sensor.template.publish:
            id: switchbackdoor
            state: OFF
    rc_switch_raw:
      code: '110100000100010000001110'
      protocol: 1
  - platform: remote_receiver
    name: "Back Door (RF-Off)"
    internal: true
    on_press:
      then:
        - binary_sensor.template.publish:
            id: switchbackdoor
            state: ON
    rc_switch_raw:
      code: '110100000100010000001010'
      protocol: 1
  - platform: template
    name: "Back Door"
    device_class: door
    id: switchbackdoor

this works for me

2 Likes

No idea, fairly new to both esphome and homeassistant. Learning mistake by mistake^^

if you don’t get the output from dump rc_switch that likely means the rc_switch library doesn’t decode the packet. I have a few sensors and switches that were supported by another 433 arduino library used with pimatic, but the rc_switch based firmwares does not decode them.

hope to find the time to add the support i need, one day, but time and life and stuff.

Same here. Some of my switches wont work