RF 433 debugging to get the correct code

Hello,

I’m trying to get RF remote transmitter to work with my ceiling fan and I need some help. I have a LucciAir ceiling fan which receives 433.92Mhz RF signals to control fan speed and light. Fan remote model FT0317A

I’m using OpenSmart 433 transceiver kit and the following config to read the transmitted codes.

esphome:
  name: mc-rf
  friendly_name: mcRF
  platform: ESP32
  board: ttgo-t1

# Enable logging
logger:

ota:
  - platform: esphome
    password: "X" 

wifi:
  networks:
   - ssid: "XX"
     password: "XX"
  fast_connect: true

api:

web_server:
  port: 80

remote_receiver:
  pin:
    number: GPIO04
    inverted: true
  dump: 
    - rc_switch
    - rc5
    - rc6
  tolerance: 50%
  filter: 80us
  idle: 2ms
  buffer_size: 10kb

and I catch the following output when pressing the light button from the remote

[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0111100010011110000101110000110100001101'
[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0111100010011110000101110000110100001101'
[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0111100010011110000101110000110100001101'
[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='011110001001111000010111000011010000110'
[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0111100010011110000101110100110101001101'
[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0111100010011110000101110100110101001101'
[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0111100010011110000101110100110101001101'
[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='0111100010011110000101110100110101001101'
[12:20:32][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=6 data='011110001001111000010111010011010100110'

Also captured the output using a RTL SDR receiver and the rtl_433 project, here’s the spectogram. Interestingly it seems that the bits are inverted here from what I capture using esphome.

I tried sending the same with


button:
  - platform: template
    name: Release Shed Door
    on_press:
       - remote_transmitter.transmit_rc_switch_raw:
          code: '0111100010011110000101110100110101001101'
          protocol: 6
          repeat: 
            times: 3 

without luck. Any ideas on how to move forward with this?

Does you receiver gets what’s expected when you transmit?

Yes but the last bit is missing. So instead of 011110001001111000010111010011010100110 i receive 01111000100111100001011101001101010011. I tried padding with an additional 0 but that didn’t work either

You might have noticed that the codes are not quite the same, so it might be more tricky than a simple replay

image

1 Like

Try with dump: raw

Then paste the raw timings to spectrogram so we can compare the dump to your RTL capture.

True. I’ve noticed that and I have tried to replicate the exact same behavior with 4 different transmit commands, which one submitting exactly what I receive when using the remote.

Here’s the dump. I hit the button on the remote once.

[17:26:18][C][wifi:449]:   Gateway: 192.168.1.1
[17:26:18][C][wifi:450]:   DNS1: 192.168.1.1
[17:26:18][C][wifi:451]:   DNS2: 0.0.0.0
[17:26:18][I][remote.raw:041]: Received Raw: 373, -275
[17:26:18][C][logger:185]: Logger:
[17:26:18][C][logger:186]:   Level: DEBUG
[17:26:18][C][logger:188]:   Log Baud Rate: 115200
[17:26:18][C][logger:189]:   Hardware UART: UART0
[17:26:18][I][remote.raw:041]: Received Raw: 8, -471
[17:26:18][I][remote.raw:041]: Received Raw: 88
[17:26:18][C][remote_transmitter:015]: Remote Transmitter...
[17:26:18][C][remote_transmitter:016]:   Channel: 3
[17:26:18][C][remote_transmitter:017]:   RMT memory blocks: 1
[17:26:18][C][remote_transmitter:018]:   Clock divider: 80
[17:26:18][C][remote_transmitter:019]:   Pin: GPIO5
[17:26:18][I][remote.raw:041]: Received Raw: 390, -1617
[17:26:18][C][remote_receiver.esp32:064]: Remote Receiver:
[17:26:18][C][remote_receiver.esp32:065]:   Pin: GPIO4
[17:26:18][C][remote_receiver.esp32:070]:   Channel: 0
[17:26:18][C][remote_receiver.esp32:071]:   RMT memory blocks: 3
[17:26:18][C][remote_receiver.esp32:072]:   Clock divider: 80
[17:26:18][C][remote_receiver.esp32:074]:   Tolerance: 50%
[17:26:18][C][remote_receiver.esp32:075]:   Filter out pulses shorter than: 80 us
[17:26:18][C][remote_receiver.esp32:076]:   Signal is done after 2000 us of no changes
[17:26:18][I][remote.raw:041]: Received Raw: 269, -131, 641, -2030
[17:26:18][I][remote.raw:041]: Received Raw: 581, -1723
[17:26:18][C][captive_portal:089]: Captive Portal:
[17:26:18][I][remote.raw:041]: Received Raw: 93, -374
[17:26:18][C][web_server:153]: Web Server:
[17:26:18][C][web_server:154]:   Address: mc-rf.local:80
[17:26:18][I][remote.raw:041]: Received Raw: 50
[17:26:18][C][mdns:116]: mDNS:
[17:26:18][C][mdns:117]:   Hostname: mc-rf
[17:26:18][I][remote.raw:041]: Received Raw: 68, -1130, 81
[17:26:18][C][esphome.ota:073]: Over-The-Air updates:
[17:26:18][C][esphome.ota:074]:   Address: mc-rf.local:3232
[17:26:18][C][esphome.ota:075]:   Version: 2
[17:26:18][C][esphome.ota:078]:   Password configured
[17:26:18][I][remote.raw:041]: Received Raw: 123, -1174
[17:26:18][C][safe_mode:018]: Safe Mode:
[17:26:18][C][safe_mode:020]:   Boot considered successful after 60 seconds
[17:26:18][C][safe_mode:021]:   Invoke after 10 boot attempts
[17:26:18][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[17:26:18][I][remote.raw:041]: Received Raw: 127, -195, 236, -175, 240, -1022, 190, -236, 80, -807
[17:26:18][C][api:140]: API Server:
[17:26:18][C][api:141]:   Address: mc-rf.local:6053
[17:26:18][C][api:145]:   Using noise encryption: NO
[17:26:18][I][remote.raw:041]: Received Raw: 62, -490
[17:26:18][I][remote.raw:041]: Received Raw: 6, -181, 94, -321
[17:26:18][I][remote.raw:041]: Received Raw: 159, -392, 159
[17:26:18][I][remote.raw:041]: Received Raw: 57
[17:26:18][I][remote.raw:041]: Received Raw: 27, -1619
[17:26:18][I][remote.raw:041]: Received Raw: 35
[17:26:18][I][remote.raw:041]: Received Raw: 17
[17:26:18][I][remote.raw:041]: Received Raw: 291
[17:26:18][I][remote.raw:041]: Received Raw: 226
[17:26:18][I][remote.raw:041]: Received Raw: 166, -151, 159, -271
[17:26:18][I][remote.raw:041]: Received Raw: 20, -380, 186, -233, 84, -296
[17:26:18][I][remote.raw:041]: Received Raw: 587, -2073
[17:26:18][I][remote.raw:041]: Received Raw: 27, -499
[17:26:18][I][remote.raw:041]: Received Raw: 165, -459
[17:26:18][I][remote.raw:041]: Received Raw: 182, -2401, 167, -191, 96
[17:26:18][I][remote.raw:041]: Received Raw: 73, -1026
[17:26:18][I][remote.raw:041]: Received Raw: 161
[17:26:18][I][remote.raw:041]: Received Raw: 105
[17:26:18][I][remote.raw:041]: Received Raw: 113
[17:26:18][I][remote.raw:041]: Received Raw: 62
[17:26:18][I][remote.raw:041]: Received Raw: 15, -843
[17:26:18][I][remote.raw:041]: Received Raw: 513, -204
[17:26:18][I][remote.raw:041]: Received Raw: 25
[17:26:18][I][remote.raw:041]: Received Raw: 25, -919
[17:26:18][I][remote.raw:041]: Received Raw: 46
[17:26:18][I][remote.raw:041]: Received Raw: 72, -2099
[17:26:18][I][remote.raw:041]: Received Raw: 274, -1264
[17:26:18][I][remote.raw:041]: Received Raw: 38
[17:26:18][I][remote.raw:041]: Received Raw: 72
[17:26:18][I][remote.raw:041]: Received Raw: 11
[17:26:18][I][remote.raw:041]: Received Raw: 62, -2466
[17:26:18][I][remote.raw:041]: Received Raw: 368, -1997, 102
[17:26:18][I][remote.raw:041]: Received Raw: 198, -410, 180, -82, 220, -392, 236, -319
[17:26:18][I][remote.raw:041]: Received Raw: 13
[17:26:18][I][remote.raw:041]: Received Raw: 20
[17:26:18][I][remote.raw:041]: Received Raw: 32, -847, 173, -1924
[17:26:18][I][remote.raw:041]: Received Raw: 32, -173
[17:26:18][I][remote.raw:041]: Received Raw: 43, -1705, 132, -2620
[17:26:18][I][remote.raw:041]: Received Raw: 19
[17:26:18][I][remote.raw:041]: Received Raw: 196, -145, 172, -2583
[17:26:18][I][remote.raw:041]: Received Raw: 24, -1912, 222, -135, 131, -519, 222
[17:26:18][I][remote.raw:041]: Received Raw: 48
[17:26:18][I][remote.raw:041]: Received Raw: 31
[17:26:18][I][remote.raw:041]: Received Raw: 98, -1030
[17:26:18][I][remote.raw:041]: Received Raw: 46, -240
[17:26:18][I][remote.raw:041]: Received Raw: 107, -456, 103
[17:26:18][I][remote.raw:041]: Received Raw: 61
[17:26:18][I][remote.raw:041]: Received Raw: 163
[17:26:18][I][remote.raw:041]: Received Raw: 275, -152
[17:26:18][I][remote.raw:041]: Received Raw: 51
[17:26:18][I][remote.raw:041]: Received Raw: 95
[17:26:18][I][remote.raw:041]: Received Raw: 20
[17:26:18][I][remote.raw:041]: Received Raw: 57
[17:26:18][I][remote.raw:041]: Received Raw: 148, -359, 226, -657, 91
[17:26:18][I][remote.raw:041]: Received Raw: 16
[17:26:18][I][remote.raw:041]: Received Raw: 40
[17:26:18][I][remote.raw:041]: Received Raw: 25, -1070
[17:26:19][I][remote.raw:041]: Received Raw: 57
[17:26:19][I][remote.raw:041]: Received Raw: 15, -761, 96, -882
[17:26:19][I][remote.raw:041]: Received Raw: 404, -251, 119, -193, 109, -980
[17:26:19][I][remote.raw:041]: Received Raw: 70, -1858
[17:26:19][I][remote.raw:041]: Received Raw: 66, -1498, 238, -1022, 86
[17:26:19][I][remote.raw:041]: Received Raw: 41
[17:26:19][I][remote.raw:041]: Received Raw: 8
[17:26:19][I][remote.raw:041]: Received Raw: 41
[17:26:19][I][remote.raw:041]: Received Raw: 32, -1569, 149, -504
[17:26:19][I][remote.raw:041]: Received Raw: 99, -258, 101, -1135, 181, -443, 108, -519
[17:26:19][I][remote.raw:041]: Received Raw: 71, -3487, 184, -284, 93, -2414, 294
[17:26:19][I][remote.raw:041]: Received Raw: 75
[17:26:19][I][remote.raw:041]: Received Raw: 71, -731
[17:26:19][I][remote.raw:041]: Received Raw: 62, -149, 223, -385
[17:26:19][I][remote.raw:041]: Received Raw: 221, -1505
[17:26:19][I][remote.raw:041]: Received Raw: 169, -607, 98, -385, 257, -317
[17:26:19][I][remote.raw:041]: Received Raw: 55
[17:26:19][I][remote.raw:041]: Received Raw: 10, -1501
[17:26:19][I][remote.raw:041]: Received Raw: 137, -481, 108, -1058
[17:26:19][I][remote.raw:041]: Received Raw: 339, -1804, 162, -1454
[17:26:19][I][remote.raw:041]: Received Raw: 257, -421
[17:26:19][I][remote.raw:041]: Received Raw: 13
[17:26:19][I][remote.raw:041]: Received Raw: 152
[17:26:19][I][remote.raw:041]: Received Raw: 8, -3462
[17:26:19][I][remote.raw:041]: Received Raw: 89, -422, 106, -128
[17:26:19][I][remote.raw:041]: Received Raw: 25, -193, 148, -730, 91
[17:26:19][I][remote.raw:041]: Received Raw: 183
[17:26:19][I][remote.raw:041]: Received Raw: 20
[17:26:19][I][remote.raw:041]: Received Raw: 209, -1534, 201, -1441
[17:26:19][I][remote.raw:041]: Received Raw: 82, -350
[17:26:19][I][remote.raw:041]: Received Raw: 264, -131, 82, -314, 115, -2264
[17:26:19][I][remote.raw:041]: Received Raw: 202, -753
[17:26:19][I][remote.raw:041]: Received Raw: 232
[17:26:19][I][remote.raw:041]: Received Raw: 319, -1673, 276, -1360
[17:26:19][I][remote.raw:041]: Received Raw: 20, -3444, 99
[17:26:19][I][remote.raw:041]: Received Raw: 24, -345
[17:26:19][I][remote.raw:041]: Received Raw: 68, -534
[17:26:19][I][remote.raw:041]: Received Raw: 40, -84, 133, -103, 368
[17:26:19][I][remote.raw:041]: Received Raw: 520, -682
[17:26:19][I][remote.raw:041]: Received Raw: 71, -194, 139, -679
[17:26:19][I][remote.raw:041]: Received Raw: 59, -285, 134, -800, 108, -422
[17:26:19][I][remote.raw:041]: Received Raw: 49, -933
[17:26:19][I][remote.raw:041]: Received Raw: 94, -1685
[17:26:19][I][remote.raw:041]: Received Raw: 90, -153, 84, -674, 112, -1079
[17:26:19][I][remote.raw:041]: Received Raw: 11
[17:26:19][I][remote.raw:041]: Received Raw: 68
[17:26:19][I][remote.raw:041]: Received Raw: 28
[17:26:19][I][remote.raw:041]: Received Raw: 142, -1491
[17:26:19][I][remote.raw:041]: Received Raw: 34, -1349
[17:26:19][I][remote.raw:041]: Received Raw: 9
[17:26:19][I][remote.raw:041]: Received Raw: 14
[17:26:19][I][remote.raw:041]: Received Raw: 53, -2697
[17:26:19][I][remote.raw:041]: Received Raw: 318, -499, 84, -946
[17:26:19][I][remote.raw:041]: Received Raw: 59, -1791
[17:26:19][I][remote.raw:041]: Received Raw: 63
[17:26:19][I][remote.raw:041]: Received Raw: 21
[17:26:19][I][remote.raw:041]: Received Raw: 244, -984
[17:26:19][I][remote.raw:041]: Received Raw: 70, -1657
[17:26:19][I][remote.raw:041]: Received Raw: 325, -3287
[17:26:19][I][remote.raw:041]: Received Raw: 178, -1488
[17:26:19][I][remote.raw:041]: Received Raw: 113, -3194, 122, -105, 138, -1596
[17:26:19][I][remote.raw:041]: Received Raw: 35
[17:26:19][I][remote.raw:041]: Received Raw: 125
[17:26:19][I][remote.raw:041]: Received Raw: 27
[17:26:19][I][remote.raw:041]: Received Raw: 86, -278, 217, -1623, 296, -236, 263, -1792
[17:26:19][I][remote.raw:041]: Received Raw: 79, -1161
[17:26:19][I][remote.raw:041]: Received Raw: 68
[17:26:19][I][remote.raw:041]: Received Raw: 212, -1953
[17:26:19][I][remote.raw:041]: Received Raw: 59
[17:26:19][I][remote.raw:041]: Received Raw: 77, -453, 87
[17:26:19][I][remote.raw:041]: Received Raw: 227, -2644
[17:26:19][I][remote.raw:041]: Received Raw: 51
[17:26:19][I][remote.raw:041]: Received Raw: 28
[17:26:19][I][remote.raw:041]: Received Raw: 405
[17:26:19][I][remote.raw:041]: Received Raw: 40
[17:26:19][I][remote.raw:041]: Received Raw: 57
[17:26:19][I][remote.raw:041]: Received Raw: 8, -488
[17:26:19][I][remote.raw:041]: Received Raw: 42, -678
[17:26:19][I][remote.raw:041]: Received Raw: 134, -1178, 119
[17:26:19][I][remote.raw:041]: Received Raw: 106, -230
[17:26:19][I][remote.raw:041]: Received Raw: 163, -438, 101, -103, 117
[17:26:19][I][remote.raw:041]: Received Raw: 65, -103, 375, -1307
[17:26:19][I][remote.raw:041]: Received Raw: 91, -220, 294, -277, 85, -2182
[17:26:19][I][remote.raw:041]: Received Raw: 1127, -220
[17:26:19][I][remote.raw:041]: Received Raw: 713, -169
[17:26:19][I][remote.raw:041]: Received Raw: 180, -209
[17:26:19][I][remote.raw:041]: Received Raw: 440
[17:26:19][I][remote.raw:041]: Received Raw: 71, -247, 158
[17:26:19][I][remote.raw:041]: Received Raw: 197
[17:26:19][I][remote.raw:041]: Received Raw: 193, -337, 197, -709
[17:26:19][I][remote.raw:041]: Received Raw: 205, -246
[17:26:19][I][remote.raw:041]: Received Raw: 175, -498, 322
[17:26:19][I][remote.raw:041]: Received Raw: 25
[17:26:19][I][remote.raw:028]: Received Raw: 681, -1006, 179, -983, 198, -971, 208, -963, 213, -378, 798, -377, 800, -376, 800, -956, 222, -370, 807, -359, 817, -944, 234, -928, 256, -901, 287, -873, 320, -264, 907, -276, 900, -276, 901, -267, 909, -860, 321, -262, 902, -867, 314, 
[17:26:19][I][remote.raw:041]:   -862, 314, -862, 314, -269, 903, -273, 903, -274, 900, -275, 901, -868, 313, -862, 314, -270, 902, -866, 315, -269, 902, -274, 902, -275, 901, -275, 900, -859, 324, -852, 322, -270, 903, -857, 322, -270
[17:26:19][I][remote.raw:028]: Received Raw: -300, 881, -869, 321, -855, 322, -854, 322, -854, 322, -270, 901, -275, 902, -265, 911, -859, 322, -260, 911, -265, 902, -866, 315, -862, 323, -853, 314, -862, 314, -269, 910, -266, 910, -266, 902, -274, 901, -868, 313, -270, 902, -866, 
[17:26:19][I][remote.raw:041]:   315, -861, 315, -861, 315, -270, 901, -275, 902, -273, 901, -275, 901, -867, 314, -862, 315, -269, 901, -867, 314, -270, 902, -274, 902, -274, 902, -274, 902, -858, 323, -853, 321, -271, 903, -857, 322, -270
[17:26:19][I][remote.raw:028]: Received Raw: -300, 880, -869, 322, -854, 323, -854, 321, -855, 322, -269, 902, -275, 901, -275, 901, -859, 322, -270, 902, -274, 902, -858, 323, -852, 322, -854, 322, -855, 321, -270, 902, -274, 902, -265, 911, -266, 902, -867, 313, -270, 904, -864, 
[17:26:19][I][remote.raw:041]:   314, -862, 314, -862, 315, -269, 902, -275, 901, -275, 900, -275, 903, -857, 321, -855, 322, -270, 903, -857, 322, -270, 902, -274, 902, -274, 902, -274, 902, -858, 321, -855, 321, -270, 904, -857, 321, -270
[17:26:19][I][remote.raw:028]: Received Raw: -294, 880, -877, 314, -861, 315, -861, 315, -862, 314, -270, 902, -274, 902, -273, 903, -857, 322, -270, 903, -273, 901, -860, 321, -854, 322, -855, 322, -854, 322, -270, 901, -275, 901, -274, 903, -273, 901, -859, 322, -262, 911, -857, 
[17:26:20][I][remote.raw:041]:   322, -854, 322, -855, 321, -270, 902, -274, 902, -265, 911, -274, 902, -858, 323, -853, 322, -269, 904, -857, 322, -261, 912, -264, 903, -273, 903, -274, 900, -868, 313, -863, 313, -270, 904, -864, 322, -262
[17:26:20][I][remote.raw:028]: Received Raw: -299, 882, -868, 322, -855, 321, -855, 322, -854, 322, -270, 901, -275, 901, -266, 911, -857, 324, -260, 911, -265, 909, -859, 322, -854, 322, -855, 321, -855, 321, -261, 911, -266, 910, -265, 911, -266, 901, -867, 314, -270, 902, -866, 
[17:26:20][I][remote.raw:041]:   314, -862, 315, -853, 323, -269, 902, -275, 901, -273, 902, -274, 902, -859, 322, -854, 322, -270, 901, -859, 322, -270, 902, -274, 902, -274, 902, -273, 902, -859, 321, -854, 322, -270, 904, -857
[17:26:20][I][remote.raw:028]: Received Raw: -373, 806, -950, 226, -940, 241, -918, 268, -882, 313, -277, 899, -277, 902, -274, 902, -859, 320, -270, 903, -266, 910, -858, 321, -855, 321, -855, 321, -855, 322, -261, 910, -266, 901, -275, 901, -275, 901, -860, 321, -270, 902, -859, 
[17:26:20][I][remote.raw:041]:   322, -854, 322, -854, 322, -270, 901, -858, 323, -269, 903, -273, 902, -858, 322, -854, 322, -270, 904, -857, 321, -270, 902, -858, 323, -269, 902, -274, 902, -858, 321, -855, 322, -269, 904, -857, 322, -270
[17:26:20][I][remote.raw:028]: Received Raw: -292, 889, -868, 322, -855, 321, -855, 321, -855, 322, -261, 911, -265, 910, -266, 910, -859, 322, -261, 911, -265, 911, -858, 321, -854, 322, -854, 322, -855, 321, -262, 912, -264, 910, -266, 901, -275, 902, -867, 313, -270, 904, -865, 
[17:26:20][I][remote.raw:041]:   313, -862, 315, -854, 322, -269, 902, -858, 323, -270, 902, -274, 902, -857, 324, -852, 322, -270, 901, -859, 322, -270, 902, -859, 321, -270, 902, -274, 902, -866, 313, -863, 313, -270, 904, -857, 321, -270
[17:26:20][I][remote.raw:028]: Received Raw: -299, 881, -870, 321, -854, 322, -855, 321, -854, 323, -269, 904, -265, 909, -266, 910, -859, 322, -261, 903, -273, 901, -867, 314, -862, 314, -862, 315, -861, 315, -270, 901, -274, 902, -274, 903, -273, 903, -857, 322, -270, 903, -857, 
[17:26:20][I][remote.raw:041]:   322, -854, 322, -855, 321, -270, 902, -859, 322, -269, 902, -275, 901, -858, 321, -855, 322, -269, 904, -857, 322, -270, 901, -859, 322, -270, 902, -274, 902, -859, 320, -855, 321, -262, 911, -857, 324, -261
[17:26:20][I][remote.raw:028]: Received Raw: -293, 881, -877, 313, -863, 313, -862, 315, -861, 315, -270, 901, -275, 901, -275, 900, -859, 324, -268, 903, -273, 901, -859, 322, -854, 322, -855, 321, -855, 322, -269, 902, -274, 902, -275, 900, -275, 900, -860, 323, -269, 903, -857, 
[17:26:20][I][remote.raw:041]:   322, -854, 322, -854, 322, -270, 902, -859, 321, -270, 902, -274, 901, -859, 321, -855, 323, -268, 904, -857, 322, -262, 911, -857, 322, -261, 910, -266, 910, -859, 322, -854, 321, -262, 911, -858, 321, -262
[17:26:20][I][remote.raw:028]: Received Raw: -299, 881, -869, 322, -854, 322, -863, 313, -855, 321, -270, 902, -274, 902, -275, 901, -859, 321, -270, 903, -273, 902, -858, 322, -854, 322, -854, 322, -854, 322, -270, 902, -274, 902, -274, 902, -274, 902, -858, 321, -270, 904, -857, 
[17:26:20][I][remote.raw:041]:   321, -855, 322, -854, 322, -269, 904, -857, 322, -261, 911, -266, 910, -858, 315, -860, 324, -260, 902, -867, 314, -269, 902, -867, 314, -270, 902, -274, 902, -866, 315, -861, 313, -270, 903, -866
[17:26:20][I][remote.raw:041]: Received Raw: 677
[17:26:20][I][remote.raw:041]: Received Raw: 240, -122, 282, -132
[17:26:20][I][remote.raw:041]: Received Raw: 573, -98, 107, -605, 108, -319, 176, -468, 228, -112, 127, -209, 174, -644
[17:26:20][I][remote.raw:041]: Received Raw: 112
[17:26:20][I][remote.raw:041]: Received Raw: 288
[17:26:20][I][remote.raw:041]: Received Raw: 55
[17:26:20][I][remote.raw:041]: Received Raw: 124
[17:26:20][I][remote.raw:041]: Received Raw: 11
[17:26:20][I][remote.raw:041]: Received Raw: 10
[17:26:20][I][remote.raw:041]: Received Raw: 396, -1537, 120, -746
[17:26:20][I][remote.raw:041]: Received Raw: 8
[17:26:20][I][remote.raw:041]: Received Raw: 211, -83, 484, -85, 315, -699
[17:26:20][I][remote.raw:041]: Received Raw: 20, -906
[17:26:20][I][remote.raw:041]: Received Raw: 25, -227
[17:26:20][I][remote.raw:041]: Received Raw: 123, -325, 118, -695
[17:26:20][I][remote.raw:041]: Received Raw: 96
[17:26:20][I][remote.raw:041]: Received Raw: 142, -2636
[17:26:20][I][remote.raw:041]: Received Raw: 27
[17:26:20][I][remote.raw:041]: Received Raw: 108, -96, 81
[17:26:20][I][remote.raw:041]: Received Raw: 146, -471
[17:26:20][I][remote.raw:041]: Received Raw: 235, -194, 109
[17:26:20][I][remote.raw:041]: Received Raw: 89
[17:26:20][I][remote.raw:041]: Received Raw: 69, -1671
[17:26:20][I][remote.raw:041]: Received Raw: 36, -408
[17:26:20][I][remote.raw:041]: Received Raw: 8, -1401
[17:26:20][I][remote.raw:041]: Received Raw: 138, -258
[17:26:20][I][remote.raw:041]: Received Raw: 241
[17:26:20][I][remote.raw:041]: Received Raw: 124, -2080
[17:26:20][I][remote.raw:041]: Received Raw: 96, -955, 107, -291, 249
[17:26:20][I][remote.raw:041]: Received Raw: 92
[17:26:20][I][remote.raw:041]: Received Raw: 109
[17:26:20][I][remote.raw:041]: Received Raw: 11, -165
[17:26:20][I][remote.raw:041]: Received Raw: 365, -730, 105
[17:26:20][I][remote.raw:041]: Received Raw: 72
[17:26:20][I][remote.raw:041]: Received Raw: 98, -1165, 158
[17:26:20][I][remote.raw:041]: Received Raw: 49, -310
[17:26:20][I][remote.raw:041]: Received Raw: 28, -190, 234, -693
[17:26:20][I][remote.raw:041]: Received Raw: 150, -573
[17:26:20][I][remote.raw:041]: Received Raw: 57
[17:26:20][I][remote.raw:041]: Received Raw: 74, -530
[17:26:20][I][remote.raw:041]: Received Raw: 295
[17:26:20][I][remote.raw:041]: Received Raw: 138, -137, 200
[17:26:20][I][remote.raw:041]: Received Raw: 50, -1076, 113
[17:26:20][I][remote.raw:041]: Received Raw: 67
[17:26:20][I][remote.raw:041]: Received Raw: 87, -221, 181, -912, 127, -179
[17:26:20][I][remote.raw:041]: Received Raw: 14, -2044
[17:26:20][I][remote.raw:041]: Received Raw: 32
^C[17:26:20][I][remote.raw:041]: Received Raw: 209
[17:26:20][D][api.connection:199]: ESPHome Logs 2024.12.2 (192.168.1.10) requested disconnected
INFO Processing expected disconnect from ESPHome API for mc-rf @ 192.168.1.216
WARNING Disconnected from API

It’s kind of weird. First because the pulses are inverted (start with negative) and second because there are two different codes.

It receives 4 times this:
292, 889, 868, 322, 855, 321, 855, 321, 855, 322, 261, 911, 265, 910, 266, 910, 859, 322, 261, 911, 265, 911, 858, 321, 854, 322, 854, 322, 855, 321, 262, 912, 264, 910, 266, 901, 275, 902, 867, 313, 270, 904, 865, 313, 862, 315, 854, 322, 269, 902, 858, 323, 270, 902, 274, 902, 857, 324, 852, 322, 270, 901, 859, 322, 270, 902, 859, 321, 270, 902, 274, 902, 866, 313, 863, 313, 270, 904, 857, 321, 270
and one time this:
299, 882, 868, 322, 855, 321, 855, 322, 854, 322, 270, 901, 275, 901, 266, 911, 857, 324, 260, 911, 265, 909, 859, 322, 854, 322, 855, 321, 855, 321, 261, 911, 266, 910, 265, 911, 266, 901, 867, 314, 270, 902, 866, 314, 862, 315, 853, 323, 269, 902, 275, 901, 273, 902, 274, 902, 859, 322, 854, 322, 270, 901, 859, 322, 270, 902, 274, 902, 274, 902, 273, 902, 859, 321, 854, 322, 270, 904, 857
repeated twice (4+1+4+1)

The 4 times repeated one is like your RTL capture

but the fifth one is different:

Also it’s missing the last high (probably because your receiver has inverted signal).

Was it different button than the one on your RTL capture?

Was it different button than the one on your RTL capture?

no, same button

It’s kind of weird. First because the pulses are inverted (start with negative) and second because there are two different codes.

i also noticed that RTL and esphome captured are inverted, i guess it’s a configuration setting?

Hmmm…
Air conditioner remotes send all settings on every button press. I don’t expect this doing it but something there is different.
Since you have RTL-SDR, play with it, try to get an idea why the 5th signal changes.
Also, your receiver is quite uncommon one, I was not able to find documentation about it. I see it’s used to do TX/RX with the transmitter, but no info how it behaves with random OOK remote controllers.

Actually I run RTL again and i noticed that it captures two things when pressing one button. Full log bellow but also links to spectograms, one, two

@karosm can you please help me convert this to esphome raw signal to experiment with sending the same thing?

Detected OOK package	2025-01-06 19:20:56
Analyzing pulses...
Total count:  204,  width: 256.11 ms		(64028 S)
Pulse width distribution:
 [ 0] count:  109,  width:  308 us [300;328]	(  77 S)
 [ 1] count:   95,  width:  896 us [892;904]	( 224 S)
Gap width distribution:
 [ 0] count:  105,  width:  864 us [860;876]	( 216 S)
 [ 1] count:   94,  width:  276 us [272;284]	(  69 S)
 [ 2] count:    4,  width: 4980 us [4976;4988]	(1245 S)
Pulse period distribution:
 [ 0] count:  199,  width: 1176 us [1168;1188]	( 294 S)
 [ 1] count:    4,  width: 5288 us [5288;5292]	(1322 S)
Pulse timing distribution:
 [ 0] count:  203,  width:  292 us [272;328]	(  73 S)
 [ 1] count:  200,  width:  880 us [860;904]	( 220 S)
 [ 2] count:    4,  width: 4980 us [4976;4988]	(1245 S)
 [ 3] count:    1,  width: 10004 us [10004;10004]	(2501 S)
Level estimates [high, low]:  15904,     10
RSSI: -0.1 dB SNR: 32.0 dB Noise: -32.1 dB
Frequency offsets [F1, F2]:    4336,      0	(+16.5 kHz, +0.0 kHz)
Guessing modulation: Pulse Width Modulation with multiple packets
view at https://triq.org/pdv/#AAB03304040124037013742714819090909081818190818190909090818181819081909090818181819090819081818181909081908255+AAB032040101240370137427148190909090818181908181909090908181818190819090908181818190908190818181819090819355
Attempting demodulation... short_width: 308, long_width: 896, reset_limit: 4992, sync_width: 0
Use a flex decoder with -X 'n=name,m=OOK_PWM,s=308,l=896,r=4992,g=880,t=235,y=0'
[pulse_slicer_pwm] Analyzer Device
codes     : {41}8761e8f2f28, {41}8761e8f2f28, {41}8761e8f2f28, {41}8761e8f2f28, {40}8761e8f2f2

Detected OOK package	2025-01-06 19:20:56
Analyzing pulses...
Total count:  204,  width: 256.14 ms		(64034 S)
Pulse width distribution:
 [ 0] count:   99,  width:  304 us [300;328]	(  76 S)
 [ 1] count:  105,  width:  892 us [892;904]	( 223 S)
Gap width distribution:
 [ 0] count:   95,  width:  868 us [860;876]	( 217 S)
 [ 1] count:  104,  width:  280 us [272;284]	(  70 S)
 [ 2] count:    4,  width: 4984 us [4976;4988]	(1246 S)
Pulse period distribution:
 [ 0] count:  199,  width: 1176 us [1168;1188]	( 294 S)
 [ 1] count:    4,  width: 5288 us [5288;5288]	(1322 S)
Pulse timing distribution:
 [ 0] count:  203,  width:  292 us [272;328]	(  73 S)
 [ 1] count:  200,  width:  880 us [860;904]	( 220 S)
 [ 2] count:    4,  width: 4984 us [4976;4988]	(1246 S)
 [ 3] count:    1,  width: 10004 us [10004;10004]	(2501 S)
Level estimates [high, low]:  15944,     10
RSSI: -0.1 dB SNR: 32.0 dB Noise: -32.1 dB
Frequency offsets [F1, F2]:    3859,      0	(+14.7 kHz, +0.0 kHz)
Guessing modulation: Pulse Width Modulation with multiple packets
view at https://triq.org/pdv/#AAB03304040124037013782714819090909081818190818190909090818181819081909090819081819090819081908181909081908255+AAB032040101240370137827148190909090818181908181909090908181818190819090908190818190908190819081819090819355
Attempting demodulation... short_width: 304, long_width: 892, reset_limit: 4992, sync_width: 0
Use a flex decoder with -X 'n=name,m=OOK_PWM,s=304,l=892,r=4992,g=880,t=235,y=0'
[pulse_slicer_pwm] Analyzer Device
codes     : {41}8761e8b2b28, {41}8761e8b2b28, {41}8761e8b2b28, {41}8761e8b2b28, {40}8761e8b2b2

Also capture from another button and direct links to spectograms, one, two

Detected OOK package	2025-01-06 19:23:31
Analyzing pulses...
Total count:  204,  width: 256.12 ms		(64030 S)
Pulse width distribution:
 [ 0] count:  119,  width:  304 us [296;328]	(  76 S)
 [ 1] count:   85,  width:  892 us [888;904]	( 223 S)
Gap width distribution:
 [ 0] count:  115,  width:  868 us [860;880]	( 217 S)
 [ 1] count:   84,  width:  280 us [276;288]	(  70 S)
 [ 2] count:    4,  width: 4984 us [4980;4992]	(1246 S)
Pulse period distribution:
 [ 0] count:  199,  width: 1176 us [1168;1188]	( 294 S)
 [ 1] count:    4,  width: 5284 us [5280;5292]	(1321 S)
Pulse timing distribution:
 [ 0] count:  203,  width:  292 us [276;328]	(  73 S)
 [ 1] count:  200,  width:  880 us [860;904]	( 220 S)
 [ 2] count:    4,  width: 4984 us [4980;4992]	(1246 S)
 [ 3] count:    1,  width: 10004 us [10004;10004]	(2501 S)
Level estimates [high, low]:  15916,      8
RSSI: -0.1 dB SNR: 33.0 dB Noise: -33.1 dB
Frequency offsets [F1, F2]:    4404,      0	(+16.8 kHz, +0.0 kHz)
Guessing modulation: Pulse Width Modulation with multiple packets
view at https://triq.org/pdv/#AAB03304040124037013782714819090909081818190818190909090818181819081909090818181818190819081818181819081908255+AAB032040101240370137827148190909090818181908181909090908181818190819090908181818181908190818181818190819355
Attempting demodulation... short_width: 304, long_width: 892, reset_limit: 4996, sync_width: 0
Use a flex decoder with -X 'n=name,m=OOK_PWM,s=304,l=892,r=4996,g=884,t=235,y=0'
[pulse_slicer_pwm] Analyzer Device
codes     : {41}8761e8fafa8, {41}8761e8fafa8, {41}8761e8fafa8, {41}8761e8fafa8, {40}8761e8fafa

Detected OOK package	2025-01-06 19:23:31
Analyzing pulses...
Total count:  204,  width: 256.11 ms		(64027 S)
Pulse width distribution:
 [ 0] count:  109,  width:  304 us [296;328]	(  76 S)
 [ 1] count:   95,  width:  892 us [888;904]	( 223 S)
Gap width distribution:
 [ 0] count:  105,  width:  868 us [860;880]	( 217 S)
 [ 1] count:   94,  width:  280 us [276;288]	(  70 S)
 [ 2] count:    4,  width: 4980 us [4980;4988]	(1245 S)
Pulse period distribution:
 [ 0] count:  199,  width: 1176 us [1172;1188]	( 294 S)
 [ 1] count:    4,  width: 5284 us [5280;5288]	(1321 S)
Pulse timing distribution:
 [ 0] count:  203,  width:  292 us [276;328]	(  73 S)
 [ 1] count:  200,  width:  880 us [860;904]	( 220 S)
 [ 2] count:    4,  width: 4980 us [4980;4988]	(1245 S)
 [ 3] count:    1,  width: 10004 us [10004;10004]	(2501 S)
Level estimates [high, low]:  15955,     13
RSSI: -0.1 dB SNR: 30.9 dB Noise: -31.0 dB
Frequency offsets [F1, F2]:    3920,      0	(+15.0 kHz, +0.0 kHz)
Guessing modulation: Pulse Width Modulation with multiple packets
view at https://triq.org/pdv/#AAB03304040124037013742714819090909081818190818190909090818181819081909090819081818190819081908181819081908255+AAB032040101240370137427148190909090818181908181909090908181818190819090908190818181908190819081818190819355
Attempting demodulation... short_width: 304, long_width: 892, reset_limit: 4992, sync_width: 0
Use a flex decoder with -X 'n=name,m=OOK_PWM,s=304,l=892,r=4992,g=884,t=235,y=0'
[pulse_slicer_pwm] Analyzer Device
codes     : {41}8761e8baba8, {41}8761e8baba8, {41}8761e8baba8, {41}8761e8baba8, {40}8761e8baba

I have the same transceiver which generally works well for me.

I landed on these settings at some point. Might be worth tinkering with them a bit.

  tolerance: 60%
  filter: 4us
  idle: 4ms

It might be worth trying dump: all too.

I also had a weird thing where I had to vary the inverted: flag depending on the protocol I was learning, which I don’t understand.

remote_receiver:
  pin:
    number: GPIO25 # Blue wire
    inverted: true # To Learn Dooya Codes You had to comment this out.   # Dooya: https://github.com/esphome/issues/issues/5709#issuecomment-2240416849

I’ve also found that having a good quality esp32, power supply, and soldered connections can help with this kind of work.

They look like the two I posted above. How you get them in a timeline? Exactly.
Esphome captured 4+1 twice , but your capture shows 5+5…

As posted above, this is a direct copy paste from my terminal.

Thank you for your comment. I’ve tried a combination of esp8266 and esp32 in this spirit.

Do you run your transceiver on 3.3V or 5V?

Maybe this is relevant:

5V.

It doesn’t show the time between those two pulse trains.

Anyway, you need to play more with the receiver to understand what’s the correct transmission. Your RTL captures show 5 equal pulses followed by another 5 pulses.
Your receiver capture shows 4+1 repeated twice.
Why so?

Even if there is a warning in the log, there is no need to set the reverse
inverted: true This reversal is not necessary

Regarding the transmission signal,
esphome’s firmware does miss the last digit of the transmission.
Padding with one digit does work
But I can’t remember if I pad it at the front or at the back
I’m pretty sure because I studied it for a while, but I forgot some of the details.

I tested it.
It fills a digit at the end

[17:04:44][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='100111000100011000010010'
[17:04:44][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='100111000100011000010010'
[17:04:44][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='100111000100011000010010'
button:
  - platform: template
    name: Release Shed Door
    on_press:
       - remote_transmitter.transmit_rc_switch_raw:
          code: '1001110001000110000100100'
          protocol: 1
          repeat: 
            times: 6

This is the code received
100111000100011000010010
This is the code that should be filled in by the transmitter
1001110001000110000100100