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
#2
can you test with KCS firmware? learn the signal, THEN send out by IFTTT.
Reply
#3
(04-20-2025, 12:35 AM)admin Wrote: can you test with KCS firmware? learn the signal, THEN send out by IFTTT.

Do you have a guide on flashing KCS firmware?
Reply
#4
https://www.kincony.com/esp32-kcsv2-firmware.html
Reply
#5
KCS firmware works with some RF devices. I then install Tasmota, it can receive the signals in Tasmota but I have no idea how to receive or send signals from Home Assistant to control the devices.

For example, this RF fan has speed 1 (0x15C3D5), speed 2 (0x15C3D9), speed 3 (0x15C3D4) and off (0x15C3D2).
Code:
08:32:51.815 MQT: tele/kc868-ag/RESULT = {"Time":"2025-08-10T08:32:51","RfReceived":{"Data":"0x15C3D5","Bits":24,"Protocol":1,"Pulse":251}}
08:32:54.265 MQT: tele/kc868-ag/RESULT = {"Time":"2025-08-10T08:32:54","RfReceived":{"Data":"0x15C3D9","Bits":24,"Protocol":1,"Pulse":251}}
08:32:55.616 MQT: tele/kc868-ag/RESULT = {"Time":"2025-08-10T08:32:55","RfReceived":{"Data":"0x15C3D4","Bits":24,"Protocol":1,"Pulse":250}}
08:32:58.115 MQT: tele/kc868-ag/RESULT = {"Time":"2025-08-10T08:32:58","RfReceived":{"Data":"0x15C3D2","Bits":24,"Protocol":1,"Pulse":252}}
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)