CC1101 and Doorbell

Hello,
I am using an ESP32-DevKitC V4 connected with CC1101 module to listen to my doorbell switch (433 MHz). This is my config:

esphome:
  name: cc1101-esp32d
  friendly_name: CC1101 ESP-32D

esp32:
  board: esp32dev
  framework: 
    type: esp-idf

logger:
  level: DEBUG
  baud_rate: 0 # disable serial logging

api:
  encryption:
    key: !secret cc1101_api

ota:
  - platform: esphome
    password: !secret cc1101_ota

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

  ap:
    ssid: "CC1101 Fallback Hotspot"
    password: !secret fallback_password

captive_portal:

## CC1101 CONFIG
spi:
  clk_pin: GPIO18 # Standard SPI
  mosi_pin: GPIO23 # Standard SPI
  miso_pin: GPIO19 # Standard SPI

cc1101:
  cs_pin: GPIO5 # Standard SPI
  gdo0_pin: GPIO13
  frequency: 433.92MHz

remote_receiver:
  pin: GPIO14 # Connect to GDO2
  dump: all
  on_pronto:
    then:
      - if:
          condition:
            lambda: |-
              return x.data.find("0000 006D 002F 0000") == 0;
          then:
            - binary_sensor.template.publish:
                id: doorbell_sensor
                state: ON
            - delay: 1s
            - binary_sensor.template.publish:
                id: doorbell_sensor
                state: OFF

binary_sensor:
  - platform: template
    name: "Doorbell"
    id: doorbell_sensor

Looking at the logs, the third word changes between 0020 to 002F, and no two presses are the exact same.
eg:

0000 006D 0027 0000 0002 003B 0002 0006 0002 0006 0002 0006 000A 0006 0002 ... 0003 0181 

0000 006D 002B 0000 0001 003C 0001 0007 0001 0007 0001 0006 000A 0006 0002 ... 0005 000B 0005 000A 0004 0004 0004 0004 0004 0014 0002 0181

How do I make sense of this? And how do I make a sensor that is triggered consistently but is also specific to this one doorbell?

It’s pretty pointless to verify first bytes of pronto signal here. Pronto is for IR and misused like that it would match with any signal with similar length.
You can’t be even sure that your setup works correctly.
Try

dump: raw
idle: 30ms
filter: 100us

and post what you get on logs.

Honestly I don’t know where I got the idea to use pronto, but here’s the raw output of few button presses. Each press produces two bursts. It’s a TECKNET self-powered doorbell, probably the worst type to use in terms of signal consistency, right?

[22:59:48.422][C][logger:316]: Logger:
[22:59:48.422][C][logger:316]:   Max Level: DEBUG
[22:59:48.422][C][logger:316]:   Initial Level: DEBUG
[22:59:48.423][C][logger:322]:   Log Baud Rate: 0
[22:59:48.423][C][logger:322]:   Hardware UART: UART0
[22:59:48.423][C][logger:332]:   Task Log Buffer Size: 768 bytes
[22:59:48.449][C][spi:066]: SPI bus:
[22:59:48.451][C][spi:152]:   CLK Pin: GPIO18
[22:59:48.452][C][spi:152]:   SDI Pin: GPIO19
[22:59:48.452][C][spi:152]:   SDO Pin: GPIO23
[22:59:48.452][C][spi:074]:   Using HW SPI: SPI2_HOST
[22:59:48.501][C][template.binary_sensor:016]: Template Binary Sensor 'Doorbell'
[22:59:48.501][C][cc1101:217]: CC1101:
[22:59:48.501][C][cc1101:217]:   Chip ID: 0x0014
[22:59:48.501][C][cc1101:217]:   Frequency: 433919840 Hz
[22:59:48.501][C][cc1101:217]:   Channel: 0
[22:59:48.501][C][cc1101:217]:   Modulation: ASK/OOK
[22:59:48.501][C][cc1101:217]:   Symbol Rate: 4996 baud
[22:59:48.501][C][cc1101:217]:   Filter Bandwidth: 203125.0 Hz
[22:59:48.501][C][cc1101:217]:   Output Power: 9.9 dBm
[22:59:48.512][C][cc1101:152]:   CS Pin: GPIO5
[22:59:48.513][C][remote_receiver.esp32:120]: Remote Receiver:
[22:59:48.513][C][remote_receiver.esp32:120]:   Clock resolution: 1000000 hz
[22:59:48.513][C][remote_receiver.esp32:120]:   RMT symbols: 192
[22:59:48.513][C][remote_receiver.esp32:120]:   Filter symbols: 0
[22:59:48.513][C][remote_receiver.esp32:120]:   Receive symbols: 192
[22:59:48.513][C][remote_receiver.esp32:120]:   Tolerance: 25%
[22:59:48.513][C][remote_receiver.esp32:120]:   Carrier frequency: 0 hz
[22:59:48.513][C][remote_receiver.esp32:120]:   Carrier duty: 100%
[22:59:48.513][C][remote_receiver.esp32:120]:   Filter out pulses shorter than: 100 us
[22:59:48.513][C][remote_receiver.esp32:120]:   Signal is done after 30000 us of no changes
[22:59:48.514][C][remote_receiver.esp32:152]:   Pin: GPIO14
[22:59:48.532][C][captive_portal:128]: Captive Portal:
[22:59:48.552][C][wifi:1304]: WiFi:
[22:59:48.554][C][wifi:1048]:   SSID: [redacted]
[22:59:48.554][C][wifi:1048]:   BSSID: [redacted]
[22:59:48.554][C][wifi:1048]:   Hostname: 'cc1101-esp32d'
[22:59:48.554][C][wifi:1048]:   Signal strength: -25 dB ▂▄▆█
[22:59:48.554][C][wifi:1048]:   Channel: 6
[22:59:48.554][C][wifi:1048]:   Subnet: 255.255.0.0
[22:59:48.554][C][wifi:1048]:   Gateway: 10.10.0.1
[22:59:48.554][C][wifi:1048]:   DNS1: 10.10.1.1
[22:59:48.554][C][wifi:1048]:   DNS2: 0.0.0.0
[22:59:48.555][C][esphome.ota:075]: Over-The-Air updates:
[22:59:48.555][C][esphome.ota:075]:   Address: cc1101-esp32d.local:3232
[22:59:48.555][C][esphome.ota:075]:   Version: 2
[22:59:48.556][C][esphome.ota:082]:   Password configured
[22:59:48.598][C][safe_mode:021]: Safe Mode:
[22:59:48.598][C][safe_mode:021]:   Successful after: 60s
[22:59:48.598][C][safe_mode:021]:   Invoke after: 10 attempts
[22:59:48.598][C][safe_mode:021]:   Duration: 300s
[22:59:48.599][C][safe_mode:038]:   Bootloader rollback: supported
[22:59:48.599][C][web_server.ota:231]: Web Server OTA
[22:59:48.600][C][api:221]: Server:
[22:59:48.600][C][api:221]:   Address: cc1101-esp32d.local:6053
[22:59:48.600][C][api:221]:   Listen backlog: 4
[22:59:48.600][C][api:221]:   Max connections: 8
[22:59:48.600][C][api:228]:   Noise encryption: YES
[22:59:48.601][C][mdns:177]: mDNS:
[22:59:48.601][C][mdns:177]:   Hostname: cc1101-esp32d
[23:00:42.986][I][safe_mode:066]: Boot seems successful; resetting boot loop counter
[23:00:44.957][D][esp32.preferences:155]: Writing 1 items: 0 cached, 1 written, 0 failed
[23:01:07.992][I][remote.raw:028]: Received Raw: -2201, 269, -328, 264, -347, 246, -164, 265, -138, 245, -157, 650, -345, 249, -2358, 250, -319, 287, -318, 256, -148, 257, -147, 254, -140, 654, -364, 249, -2332, 267, -350, 240, -347, 267, -136, 249, -153, 245, -154, 560, -471, 137, -2465, 
[23:01:07.993][I][remote.raw:041]:   100
[23:01:08.478][I][remote.raw:028]: Received Raw: -2177, 250, -350, 250, -351, 250, -150, 250, -150, 250, -151, 650, -350, 250, -2352, 250, -358, 250, -350, 250, -151, 250, -150, 250, -150, 626, -375, 225, -2377, 225, -375, 225, -376, 225, -175, 225, -175, 225, -175, 635, -356, 250, -2351, 
[23:01:08.478][I][remote.raw:041]:   151, -475, 100, -500, 100
[23:01:11.351][I][remote.raw:028]: Received Raw: -2202, 250, -344, 256, -355, 232, -167, 232, -164, 258, -161, 614, -380, 221, -2374, 252, -340, 248, -338, 289, -136, 239, -166, 247, -130, 655, -349, 261, -2342, 255, -338, 274, -337, 269, -137, 239, -165, 247, -130, 653, -349, 239, -2374, 
[23:01:11.351][I][remote.raw:041]:   133, -488, 102
[23:01:11.672][I][remote.raw:028]: Received Raw: -2202, 250, -344, 256, -331, 255, -168, 231, -164, 239, -168, 644, -348, 243, -2347, 273, -320, 270, -344, 256, -150, 256, -126, 278, -126, 676, -341, 249, -2331, 267, -338, 256, -362, 249, -135, 242, -164, 238, -169, 646, -349, 245, -2344, 
[23:01:11.672][I][remote.raw:041]:   270, -320, 271, -344, 256, -150, 256, -149, 254, -125, 590, -441, 133
[23:22:22.131][I][remote.raw:041]: Received Raw: -2202, 250, -350, 250, -351, 250, -150, 250, -149, 246, -150, 647, -349, 250, -2350, 250, -351, 250, -350, 250, -150, 251, -150, 250, -150, 650, -351, 250, -2351, 251, -350, 250, -350, 251, -150, 250, -150, 250, -150, 551, -450, 150
[23:22:22.384][I][remote.raw:028]: Received Raw: -2202, 250, -336, 239, -375, 261, -136, 230, -150, 251, -175, 641, -350, 250, -2352, 250, -325, 276, -350, 250, -150, 250, -150, 251, -150, 631, -357, 250, -2351, 250, -350, 250, -351, 250, -150, 250, -150, 250, -151, 650, -347, 250, -2352, 
[23:22:22.385][I][remote.raw:041]:   250, -347, 275, -300, 275, -151, 250, -150, 150, -275, 500
[23:24:38.143][I][remote.raw:041]: Received Raw: -2202, 275, -309, 276, -339, 256, -147, 268, -133, 263, -135, 668, -354, 249, -2329, 255, -365, 229, -362, 249, -160, 232, -165, 237, -165, 633, -359, 247, -2359, 236, -337, 256, -356, 255, -142, 258, -142, 242, -169, 559, -449, 130
[23:24:38.560][I][remote.raw:028]: Received Raw: -2202, 250, -339, 263, -340, 256, -148, 268, -134, 263, -135, 665, -351, 248, -2353, 240, -346, 254, -345, 255, -150, 229, -177, 228, -152, 648, -367, 249, -2341, 242, -381, 221, -354, 263, -151, 228, -176, 227, -151, 657, -346, 260, -2360, 
[23:24:38.561][I][remote.raw:041]:   236, -363, 208, -382, 138, -263, 142, -259, 123
[23:24:41.341][I][remote.raw:028]: Received Raw: -2176, 276, -336, 276, -330, 239, -164, 239, -169, 238, -161, 647, -356, 249, -2347, 253, -340, 247, -363, 237, -165, 239, -165, 247, -130, 653, -367, 229, -2353, 257, -350, 245, -351, 248, -153, 260, -126, 253, -151, 647, -366, 165, -2457, 
[23:24:41.341][I][remote.raw:041]:   100
[23:24:41.795][I][remote.raw:028]: Received Raw: -2202, 250, -343, 275, -344, 248, -127, 279, -126, 276, -126, 675, -341, 249, -2345, 247, -351, 249, -358, 259, -126, 250, -151, 250, -152, 669, -341, 249, -2351, 248, -350, 248, -358, 234, -153, 248, -151, 250, -151, 667, -341, 248, -2349, 
[23:24:41.796][I][remote.raw:041]:   247, -350, 248, -356, 155, -255, 125, -276, 125, -275, 515

I used rtl_433 to capture and analyze some key presses and I’m getting this consistently:

Guessing modulation: Pulse Width Modulation with sync/delimiter
view at https://triq.org/pdv/#AAB00D0501003B00930028060527118355+AAB0230503003B0093002806052711818181928181928181928192819281929292818192818355+AAB0130501003B0093002806052711818181928181A455
Attempting demodulation... short_width: 59, long_width: 159, reset_limit: 1543, sync_width: 39
Use a flex decoder with -X 'n=name,m=OOK_PWM,s=59,l=159,r=1543,g=0,t=0,y=39'
[pulse_slicer_pwm] Analyzer Device
codes     : {76}f6d51bedaa37db546fb, {0}0

Then I run flex decoder with those options and there were too many false positives flying across the screen.

Your signal looks quite consistent, but weird.
Anyway, try with remote receiver binary sensor.

remote_receiver:
  id: doorbell_receiver
  pin: GPIO14
  dump: raw
  filter: 100us
  idle: 5ms
  tolerance: 20%

binary_sensor:
  - platform: remote_receiver
    name: "Doorbell"
    receiver_id: doorbell_receiver
    raw:
      code: [245, -2345, 250, -350, 250, -350, 250, -150, 250, -150, 250, -150, 620, -390]
         
    filters:
      - delayed_off: 1000ms   # to prevent multiple triggers per press
remote_receiver:
  pin:
    number: GPIO14
  dump:
    - rc_switch
  tolerance: 60%

You can try this; it works well in my environment.

Still shows raw captures, but no match, and doorbell sensor remains off.

[18:03:50.527][I][remote.raw:028]: Received Raw: -2202, 250, -336, 255, -354, 236, -165, 242, -169, 239, -161, 643, -353, 248, -2351, 254, -339, 246, -363, 241, -164, 238, -166, 247, -130, 653, -349, 265, -2337, 248, -372, 238, -358, 248, -151, 244, -152, 256, -126, 650, -352, 163, -2462, 
[18:03:50.531][I][remote.raw:041]:   127, -479, 100
[18:03:50.748][I][remote.raw:028]: Received Raw: -2177, 275, -334, 256, -339, 257, -147, 269, -133, 263, -136, 666, -354, 249, -2342, 228, -364, 248, -362, 236, -164, 239, -165, 247, -131, 653, -365, 230, -2355, 258, -350, 246, -349, 249, -152, 259, -151, 227, -151, 648, -367, 248, -2359, 
[18:03:50.757][I][remote.raw:041]:   241, -359, 249, -330, 268, -127, 278, -126, 250, -151, 631, -394, 156
[18:03:57.564][I][remote.raw:028]: Received Raw: -2201, 251, -338, 260, -339, 256, -148, 268, -134, 263, -135, 668, -328, 276, -2339, 254, -339, 248, -360, 239, -142, 262, -161, 262, -137, 639, -346, 249, -2338, 259, -358, 257, -334, 253, -139, 284, -120, 293, -108, 641, -379, 166, -2436, 
[18:03:57.565][I][remote.raw:041]:   122
[18:03:57.805][I][remote.raw:028]: Received Raw: -2201, 275, -334, 254, -357, 240, -143, 261, -161, 233, -165, 634, -374, 221, -2370, 233, -346, 266, -356, 233, -152, 248, -151, 250, -152, 658, -344, 252, -2334, 261, -338, 257, -356, 254, -142, 257, -142, 261, -160, 617, -381, 221, -2368, 
[18:03:57.811][I][remote.raw:041]:   252, -345, 254, -344, 255, -150, 256, -151, 228, -151, 560, -465, 129
[18:04:34.634][I][remote.raw:028]: Received Raw: -2202, 275, -339, 249, -335, 244, -165, 240, -169, 239, -161, 646, -355, 249, -2343, 254, -338, 272, -337, 267, -137, 265, -138, 247, -132, 681, -337, 256, -2336, 258, -351, 247, -350, 249, -152, 257, -126, 277, -126, 647, -366, 166, -2442, 
[18:04:34.638][I][remote.raw:041]:   125
[18:04:35.052][I][remote.raw:028]: Received Raw: -2202, 250, -340, 256, -355, 255, -144, 232, -164, 240, -169, 644, -348, 243, -2350, 270, -321, 271, -344, 255, -150, 256, -151, 228, -151, 649, -367, 248, -2348, 246, -352, 248, -358, 258, -126, 275, -126, 252, -151, 671, -341, 249, -2346, 
[18:04:35.072][I][remote.raw:041]:   246, -352, 248, -350, 257, -150, 255, -151, 227, -176, 542, -469, 135
[18:04:36.970][I][remote.raw:028]: Received Raw: -2202, 250, -364, 230, -362, 249, -136, 258, -164, 239, -166, 635, -356, 246, -2358, 248, -333, 243, -359, 260, -147, 240, -161, 262, -136, 663, -353, 221, -2348, 261, -338, 256, -356, 254, -142, 257, -143, 261, -160, 611, -384, 165, -2442, 
[18:04:36.972][I][remote.raw:041]:   105
[18:04:37.396][I][remote.raw:028]: Received Raw: -2201, 251, -341, 256, -356, 254, -142, 257, -142, 262, -160, 645, -354, 249, -2347, 236, -361, 232, -357, 255, -142, 258, -142, 242, -169, 644, -346, 268, -2329, 243, -349, 271, -345, 254, -150, 230, -176, 228, -176, 623, -367, 248, -2339, 
[18:04:37.401][I][remote.raw:041]:   264, -358, 248, -329, 268, -127, 278, -126, 250, -150, 594, -443, 135

@lijiazhiren Nothing captured in logs with rc_switch.

It should.

Try to remove the first timing from preamble, so your code starts like your received log starts:
code: [-2200, 250, -350, 250, -350, 250, -150, 250, -150, 250, -150, 620, -390, 245]

or even without preamble at all:

code: [250, -350, 250, -350, 250, -150, 250, -150, 250, -150, 620, -390, 245]

Your code is probably consistent enough to be detected even completely, (in that case raise tolerance to 30%) :
code: [-2202, 275, -339, 249, -335, 244, -165, 240, -169, 239, -161, 646, -355, 249, -2343, 254, -338, 272, -337, 267, -137, 265, -138, 247, -132, 681, -337, 256, -2336, 258, -351, 247, -350, 249, -152, 257, -126, 277, -126, 647, -366, 166, -2442, 125]

My remote control uses the EV1527 chip.

Yours might need to be disassembled to check what kind of chip it uses.

It might be one of those franchised chips.

Your approach would work on any signal that is pulse-width. But OP’s signal is pulse-distance. It will never fit any of the standard rc-switch protocols.
But it’s clean and solid signal, so there’s no problem to handle it raw.

Only thing I can’t understand is why OP has negative start. I have positive start and it doesn’t depend on signal.
So it has to be some difference on the module itself or esphome version (I’m using latest 2025.12).
How are yours if you dump them raw?