Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RF Transmitter not working in ESPHome
#1
Hello,
I installed ESPHome on the KC868-AG. RF receiver works, I can receive RF signals from the smart plug's remote:

[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:17:05][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='1001001000101010011011011001001'

But transmitter doesn't work, I cannot control the smart plug with RF using the transmitter.

The log after using transmitter:
[23:29:02][D][button:010]: 'Smart Plug On' Pressed.
[23:29:02][W][component:239]: Component api took a long time for an operation (287 ms).
[23:29:02][W][component:240]: Components should block for at most 30 ms.
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='10010010001010100110110110010011'
[23:29:02][I][remote.rc_switch:261]: Received RCSwitch Raw: protocol=2 data='1001001000101010011011011001001'

Here is my ESPHome code:

Code:
remote_transmitter:
  - id: transmitter_ir
    pin: GPIO2
    carrier_duty_percent: 50%
  - id: transmitter_rf
    pin: GPIO22
    carrier_duty_percent: 50%
remote_receiver:
  # see https://esphome.io/components/remote_transmitter.html#setting-up-infrared-devices
  # for details on discovering the correct codes for your devices
  - id: receiver_ir
    pin:
      number: GPIO23
      inverted: True
    dump: rc_switch
  # see https://esphome.io/components/remote_transmitter.html#setting-up-rf-devices
  # for details on discovering the correct codes for your devices
  - id: receiver_rf
    pin:
      number: GPIO13
    dump: rc_switch
    # Settings to optimize recognition of RF devices
    tolerance: 50%
    filter: 250us
    idle: 4ms
    buffer_size: 2kb   
button:
  - platform: template
    name: "Door Chime"
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          transmitter_id: transmitter_rf
          protocol: 5
          code: "001010100010100000"
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: "Smart Plug On"
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          transmitter_id: transmitter_rf
          protocol: 2
          code: "10010010001010100110110110010011"
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: "Smart Plug Off"
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          transmitter_id: transmitter_rf
          protocol: 2
          code: "01000100101011010110100011010011"
          repeat:
            times: 10
            wait_time: 0s
Reply


Messages In This Thread
RF Transmitter not working in ESPHome - by johnsmith8439 - 04-19-2025, 04:20 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)