What's currently the best solution for sending and receiving 433?

I’ve looked through countless topics but haven’t gotten a good understanding of what the best solution for sending and receiving various 433 devices in HA.

I want to add a Dooya remote that goes to a awning motor. Don’t know the specific brand of the motor but that shouldn’t be an issue as the remote is a Dooya i suppose.

From what I’ve read so far the Sonoff Bridge hack and the LILYGO rtl_433 is the best solution but not totally certain.

What’s the best way to go forward in your opinion?

Thanks!

is receive only

i do have a sonoff 433 hub and that one was not able to do anything with my Louvolite window blinds.

Then i got a RFXcom hub (yeah, quiet expensive…) and got it running in no time.

So my math was done :wink:

Oh damn, missed that…

I’m going with the Sonoff RF bridge for now. I’m planning on using ESPhome but not sure how to flash it. All the tutorials and examples I’ve seen are with bridges that already have been flashed with Tasmota before. So do I need to flash to Tasmota and then ESPhome or what’s the deal?

They have to be flashed serially, so you can skip the Tasmota part and immediately flash ESPHome.

Thank you!

OK so I’ve managed to get the RF bridge in to ESPHome after trying a lot of different ways, more on that later.

I have a Dooya DC90 remote control that’s paired to a awning motor. The idea is that I can control it in Home assistant using the Sonoff RF Bridge that’s been hardware hacked and flashed with ESPHome. After writing some yaml code and getting the receiver and transmitter set up in the ESPHome config, I can see codes that’s being sent to the motor, so far so good.

The problem now is that nothing happens when I send the codes back to the motor in HA. This is how my transmitter and switches are currently set up,

remote_transmitter:
  pin: 5
  carrier_duty_percent: 100%

switch:
  - platform: template
    name: Awning Out Remote
    turn_on_action:
      remote_transmitter.transmit_rc_switch_raw:
        code: '1011010100010001000001001100000100010001'
        protocol: 6
        repeat:
          times: 3

  - platform: template
    name: Awning In Remote
    turn_on_action:
      remote_transmitter.transmit_rc_switch_raw:
        code: '1011010100010001000001001100000100110011'
        protocol: 6
        repeat:
          times: 3


  - platform: template
    name: Awning Stop Remote
    turn_on_action:
      remote_transmitter.transmit_rc_switch_raw:
        code: '1011010100010001000001001100000101010101'
        protocol: 6
        repeat:
          times: 3

The code length is 40 numbers, but at first, using protocol 1, it only sent out 39 numbers, the last one was missing. After trying different custom settings and all the protocols it managed to send the whole code when used with protocol 6.

I’ve made switches in Home assistant that I can use to set off the code.

The problem now is that nothing happens with the motor when I press the switch in HA. I can see that the entire code has been sent using the ESPHome log but nothing happens to the motor.

So, after all this, does someone have any idea of what could be going on? Do I need to try different settings in the protocol or something else in the code. Or maybe hardware related?

yes, the rc_switch protocol 6 is similar enough to dooya that it picks it up, but to transmit is a tiny bit different. i copied the remote_base component and added a protocol definition for dooya, also I dont know how important it is, but in my blinds i need to send two codes for moving up and two for moving down, an a single code to stop

I just bought an RF bridge from Aliexpress. And it works fine with the Dooya remote for Dooya curtain motors I have, so presumably it will work with other Dooya motors. The remote model is DC2760AC 433MHz. The RF bridge is from the Aliexpress store Go Relax Life Store. Cost was $NZ32 including shipping. Admittedly I’m just using it with Google Assistant and Google Home via the ewelink app. Not yet with HA. I’ve attached a photo of the device so you can find it on Ali in case the link below no longer works.

RF Bridge Roller Shutter Remote
https://a.aliexpress.com/_mL1bkxi

Hello, did you make an esphome custom_component that is able to send Dooya Code with Quad bits encoding ?

@cocotugo could you share the code that made it work?

dooya RF code is not in rc_switch library.
so the RF signal recived and decode by rc_switch is wrong.
but there is a another way to simulate the RF signal no matter decode and encode.
use the following dump to recive the raw data but not the decode data:

remote_receiver:
  dump: raw
  pin:
    number: D1
  tolerance: 50%
  filter: 200us
  idle: 6ms
  buffer_size: 3kb

and there is the log:

[11:09:47][I][remote.raw:028]: Received Raw: 4890, -1618, 363, -774, 361, -774, 729, -409, 356, -774, 729, -408, 725, -410, 724, -418, 356, -786, 366, -760, 362, -775, 729, -409, 725, -409, 724, -408, 358, -774, 728, -408, 357, -787, 363, -771, 363, -772, 361, -773, 362, -769, 364, 
[11:09:47][I][remote.raw:041]:   -775, 730, -405, 359, -770, 367, -786, 360, -773, 361, -774, 733, -406, 723, -407, 358, -774, 360, -771, 362, -776, 727, -421, 357, -778, 726, -407, 360, -771, 730, -412, 353, -776, 727, -409, 357, -774, 728
[11:09:47][I][remote.raw:028]: Received Raw: 4938, -1581, 363, -773, 362, -774, 727, -407, 359, -776, 725, -407, 727, -419, 725, -412, 354, -776, 362, -772, 370, -766, 727, -407, 726, -410, 724, -409, 356, -778, 725, -408, 356, -787, 363, -772, 363, -772, 361, -784, 360, -765, 360, 
[11:09:47][I][remote.raw:041]:   -772, 729, -407, 359, -772, 352, -795, 331, -818, 360, -762, 717, -429, 719, -410, 365, -768, 366, -762, 361, -772, 730, -423, 358, -772, 728, -410, 357, -776, 725, -409, 358, -775, 727, -409, 358, -773, 729

sometimes raw data is not accurately ,try to find the right one.
and use the following code to send RF signal:

remote_transmitter:
  pin: D2
  # RF uses a 100% carrier signal
  carrier_duty_percent: 100%

button:
  - platform: template
    name: collapse
    icon: "mdi:arrow-expand-right"
    on_press:
      - remote_transmitter.transmit_raw:
          code: [4942, -1579, 366, -770, 365, -772, 731, -405, 360, -774, 729, -407, 726, -409, 729, -405, 359, -782, 366, -770, 360, -779, 728, -406, 728, -409, 725, -408, 358, -773, 730, -406, 359, -785, 364, -769, 366, -770, 358, -780, 367, -766, 365, -770, 731, -407, 360, -769, 366, -784, 366, -770, 361, -777, 729, -411, 724, -407, 357, -771, 367, -770, 362, -778, 726, -420, 361, -772, 363, -772, 368, -766, 731, -407, 725, -411, 728, -409, 722, -408, 356]
          repeat:
            times: 2
            wait_time: 15ms

more detail in this page https://bbs.hassbian.com/thread-14331-1-1.html
[/quote]

Hi @zhaoxinchen007 !

Thank you for the detailed explanation and website full of useful info! I’m happy to report that it works!

So just for future people trying to do this, here’s what I did to make it work.

  1. Hardware hack the Sonoff RF Bridge. There are a few different types of the hack depending on what version of the RF Bridge you have. I have the latest one.

  2. Flash the RF Bridge with ESPHome. For some reason it didn’t work using the ESP online flasher tool so had to do it using esptool on my windows machine. I got the .bin file from the esphome addon in HA using the manual method.

  3. Now to where I got stuck. I tried all the different libraries with not luck, rc_switch and raw mainly. When I used raw I got several [remote.raw:028]: code snippets, probably 3-5. And then one [remote.raw:041]: code snippet. For some reason I tried either just the [remote.raw:041]: code or with just 1 the 028 code when trying to send a code. But after looking at the code snippet from @zhaoxinchen007 and counted all the numbers in the send code I realized that I need ALL the codes. So lo and behold, after putting in all the [remote.raw:028]: codes and the one [remote.raw:041]: code in to the send code, it worked!

So anyways, thanks again!

Now to just add a weather station to make some automations!

Hi @artpax, could you share example of your config, please? I have Dooya DC90 remote too and searching for help. Thanks.

1 Like

Same here. Would be amazing to get this to work so some examples would be great

Hi!

Do you think that it will work without taking care of rolling codes or similar signal configurations?

Thanks!

Here’s my esphome yaml:

esphome:
  name: sonoff-rf-bridge
  friendly_name: Sonoff RF Bridge

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "insert key"

ota:
  password: "insert password"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Sonoff-Rf-Bridge-2"
    password: "insert password"

captive_portal:

sensor:
  - platform: wifi_signal
    name: Sonoff RF Bridge Wifi Signal
    update_interval: 10s
  - platform: uptime
    name: Sonoff RF Bridge Uptime


remote_receiver:
  pin:
    number: 4
  dump: raw
  tolerance: 50%
  filter: 200us
  idle: 6ms
  buffer_size: 3kb
  

remote_transmitter:
  pin:
    number: 5
  carrier_duty_percent: 100%

status_led:
  pin:
    number: GPIO13
    inverted: yes

cover:
  - platform: template
    name: "Awning Cover"
    id: awning_cover
    open_action:
      - switch.turn_on: awning_relay_out
    close_action:
      - switch.turn_on: awning_relay_in
    stop_action:
      - switch.turn_on: awning_relay_stop
    optimistic: false

switch:
  - platform: template
    name: Awning Out Switch
    id: awning_relay_out
    turn_on_action:
      remote_transmitter.transmit_raw:
        code: [4775, -1527, 691, -383, 329, -736, 691, -385, 688, -381, 330, -738, 689, -386, 327, -738, 691, -389, 328, -736, 332, -746, 332, -739, 691, -382, 329, -739, 332, -739, 331, -737, 692, -386, 331, -736, 334, -736, 334, -738, 329, -741, 331, -738, 694, -381, 328, -737, 332, -745, 698, -382, 689, -382, 326, -740, 334, -736, 332, -737, 333, -738, 331, -742, 692, -385, 328, -741, 331, -738, 332, -740, 689, -383, 329, -742, 328, -737, 333, -737, 693, -407, 4756, -1529, 693, -381, 329, -740, 689, -384, 690, -381, 330, -735, 693, -382, 332, -736, 692, -384, 330, -738, 332, -744, 334, -738, 689, -384, 330, -736, 332, -737, 333, -742, 690, -390, 325, -738, 333, -736, 333, -738, 333, -736, 333, -740, 690, -381, 330, -737, 331, -744, 700, -381, 692, -380, 329, -736, 335, -735, 335, -738, 331, -739, 332, -736, 691, -388, 329, -740, 332, -737, 333, -737, 694, -379, 330, -736, 335, -736, 334, -736, 691]
        repeat:
          times: 2
          wait_time: 15ms

  - platform: template
    name: Awning Stop Switch
    id: awning_relay_stop
    turn_on_action:
      remote_transmitter.transmit_raw:
        code: [690, -384, 328, -738, 694, -380, 688, -383, 328, -738, 694, -380, 328, -741, 691, -384, 337, -729, 334, -738, 332, -738, 691, -381, 331, -739, 329, -739, 333, -738, 691, -387, 330, -739, 331, -738, 332, -739, 330, -740, 333, -736, 689, -384, 330, -739, 330, -748, 689, -381, 690, -384, 328, -740, 331, -735, 335, -734, 333, -738, 332, -737, 692, -388, 329, -740, 595, -478, 329, -740, 689, -384, 329, -738, 698, -375, 328, -739, 691, -402, 4754, -1531, 691, -386, 326, -739, 691, -381, 691, -381, 328, -737, 693, -384, 327, -740, 691, -385, 330, -738, 331, -739, 333, -739, 691, -381, 330, -736, 332, -741, 329, -740, 690, -386, 333, -736, 334, -736, 331, -738, 334, -736, 334, -737, 690, -381, 333, -736, 332, -744, 690, -384, 689, -381, 330, -739, 333, -735, 333, -739, 334, -735, 333, -738, 693, -384, 332, -737, 690, -384, 329, -739, 690, -383, 330, -741, 687, -383, 328, -739, 690, -401, 4755, -1533, 690, -384, 330, -736, 691, -384, 688, -384, 326, -739, 691, -382, 328, -739, 691, -388, 330, -738, 330, -738, 334, -737, 692, -381, 329, -739, 331, -737, 335, -735, 688, -391, 330, -740, 332, -734, 333, -738, 332, -738, 334, -736, 694, -381, 328, -738, 333, -743, 690, -385, 690, -380, 332, -741, 328, -737, 331, -736, 336, -734, 333, -739, 691, -389, 330, -736, 691, -384, 329, -736, 693, -385, 327, -740, 690, -381, 331, -737, 692]
        repeat:
          times: 2
          wait_time: 15ms
  
  - platform: template
    name: Awning In Switch
    id: awning_relay_in
    turn_on_action:
      remote_transmitter.transmit_raw:
        code: [4755, -1531, 691, -383, 327, -741, 698, -381, 688, -386, 341, -729, 686, -381, 329, -738, 691, -387, 328, -741, 330, -740, 331, -741, 688, -382, 328, -742, 328, -742, 328, -740, 690, -387, 333, -736, 331, -747, 327, -741, 330, -740, 330, -741, 691, -384, 324, -741, 330, -750, 687, -383, 689, -387, 323, -741, 331, -736, 332, -738, 332, -740, 331, -738, 690, -388, 328, -740, 337, -742, 688, -384, 688, -381, 328, -740, 332, -739, 688, -385, 687, -403, 4755, -1533, 695, -378, 328, -738, 696, -383, 689, -383, 329, -741, 687, -385, 329, -741, 687, -387, 329, -739, 329, -745, 325, -742, 689, -382, 328, -739, 333, -738, 331, -740, 689, -389, 326, -741, 330, -746, 332, -739, 331, -739, 328, -743, 689, -382, 328, -739, 332, -746, 689, -381, 692, -380, 329, -740, 330, -741, 328, -744, 329, -738, 331, -739, 689, -390, 326, -741, 338, -741, 689, -386, 686, -381, 328, -739, 332, -738, 691, -382, 688]
        repeat:
          times: 2
          wait_time: 15ms

button:
  - platform: template
    name: Collapse
    icon: "mdi:arrow-expand-left"
    on_press:
      - remote_transmitter.transmit_raw:
          code: [4755, -1531, 691, -383, 327, -741, 698, -381, 688, -386, 341, -729, 686, -381, 329, -738, 691, -387, 328, -741, 330, -740, 331, -741, 688, -382, 328, -742, 328, -742, 328, -740, 690, -387, 333, -736, 331, -747, 327, -741, 330, -740, 330, -741, 691, -384, 324, -741, 330, -750, 687, -383, 689, -387, 323, -741, 331, -736, 332, -738, 332, -740, 331, -738, 690, -388, 328, -740, 337, -742, 688, -384, 688, -381, 328, -740, 332, -739, 688, -385, 687, -403, 4755, -1533, 695, -378, 328, -738, 696, -383, 689, -383, 329, -741, 687, -385, 329, -741, 687, -387, 329, -739, 329, -745, 325, -742, 689, -382, 328, -739, 333, -738, 331, -740, 689, -389, 326, -741, 330, -746, 332, -739, 331, -739, 328, -743, 689, -382, 328, -739, 332, -746, 689, -381, 692, -380, 329, -740, 330, -741, 328, -744, 329, -738, 331, -739, 689, -390, 326, -741, 338, -741, 689, -386, 686, -381, 328, -739, 332, -738, 691, -382, 688]
          repeat:
            times: 2
            wait_time: 15ms

  - platform: template
    name: Stop
    icon: "mdi:stop"
    on_press:
      - remote_transmitter.transmit_raw:
          code: [690, -384, 328, -738, 694, -380, 688, -383, 328, -738, 694, -380, 328, -741, 691, -384, 337, -729, 334, -738, 332, -738, 691, -381, 331, -739, 329, -739, 333, -738, 691, -387, 330, -739, 331, -738, 332, -739, 330, -740, 333, -736, 689, -384, 330, -739, 330, -748, 689, -381, 690, -384, 328, -740, 331, -735, 335, -734, 333, -738, 332, -737, 692, -388, 329, -740, 595, -478, 329, -740, 689, -384, 329, -738, 698, -375, 328, -739, 691, -402, 4754, -1531, 691, -386, 326, -739, 691, -381, 691, -381, 328, -737, 693, -384, 327, -740, 691, -385, 330, -738, 331, -739, 333, -739, 691, -381, 330, -736, 332, -741, 329, -740, 690, -386, 333, -736, 334, -736, 331, -738, 334, -736, 334, -737, 690, -381, 333, -736, 332, -744, 690, -384, 689, -381, 330, -739, 333, -735, 333, -739, 334, -735, 333, -738, 693, -384, 332, -737, 690, -384, 329, -739, 690, -383, 330, -741, 687, -383, 328, -739, 690, -401, 4755, -1533, 690, -384, 330, -736, 691, -384, 688, -384, 326, -739, 691, -382, 328, -739, 691, -388, 330, -738, 330, -738, 334, -737, 692, -381, 329, -739, 331, -737, 335, -735, 688, -391, 330, -740, 332, -734, 333, -738, 332, -738, 334, -736, 694, -381, 328, -738, 333, -743, 690, -385, 690, -380, 332, -741, 328, -737, 331, -736, 336, -734, 333, -739, 691, -389, 330, -736, 691, -384, 329, -736, 693, -385, 327, -740, 690, -381, 331, -737, 692]
          repeat:
            times: 2
            wait_time: 15ms

  - platform: template
    name: Extend
    icon: "mdi:arrow-expand-right"
    on_press:
      - remote_transmitter.transmit_raw:
          code: [4775, -1527, 691, -383, 329, -736, 691, -385, 688, -381, 330, -738, 689, -386, 327, -738, 691, -389, 328, -736, 332, -746, 332, -739, 691, -382, 329, -739, 332, -739, 331, -737, 692, -386, 331, -736, 334, -736, 334, -738, 329, -741, 331, -738, 694, -381, 328, -737, 332, -745, 698, -382, 689, -382, 326, -740, 334, -736, 332, -737, 333, -738, 331, -742, 692, -385, 328, -741, 331, -738, 332, -740, 689, -383, 329, -742, 328, -737, 333, -737, 693, -407, 4756, -1529, 693, -381, 329, -740, 689, -384, 690, -381, 330, -735, 693, -382, 332, -736, 692, -384, 330, -738, 332, -744, 334, -738, 689, -384, 330, -736, 332, -737, 333, -742, 690, -390, 325, -738, 333, -736, 333, -738, 333, -736, 333, -740, 690, -381, 330, -737, 331, -744, 700, -381, 692, -380, 329, -736, 335, -735, 335, -738, 331, -739, 332, -736, 691, -388, 329, -740, 332, -737, 333, -737, 694, -379, 330, -736, 335, -736, 334, -736, 691]
          repeat:
            times: 2
            wait_time: 15ms

I haven’t updated Esphome to the latest version so some formatting may be off.

Hope this helps!