[ESPHome] WL-102 Transmitter 433mhz (Solved)

@Lainol you’re a legend!

So I ended up flashing the ESP32 with tasmota (using the web flasher) and configured the Rf Receiver on the right pin.

When I pressed the Off button on the remote it returned the following on the tasmota console:

06:26:51.928 MQT: tele/tasmota_FB1A7D/RESULT = {"Time":"2023-11-08T06:26:51","RfReceived":{"Data":"0x452203","Bits":24,"Protocol":1,"Pulse":393}}

I took "Data":"0x452203" and passed it through a hexadecimal to binary converter and the result was 010001010010001000001110 which was the same as the output from ESPHome – so I knew I was on to something. The only difference was Tasmota showed the “Pulse” value and ESPHome did not.

I was able to send the command with Tasmota (from the command line) with this command:
RfSend {"Data":"0x452203","Bits":24,"Protocol":1,"Pulse":393}

Make sure the transmitter pin is configured in Tasmota before trying to send the command.

So I followed the instructions from the post you linked [here] and added the pulse to ESPHome and flashed it to the device. To my surprise, it worked!

Here is the final YAML on an ESP8266

esphome:
  name: cat-toy-controller
  friendly_name: cat-toy-controller

esp8266:
  board: d1_mini

# Enable logging
logger:

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

ota:
  password: "123"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Cat-Toy-Controller"
    password: !secret wifi_password

captive_portal:
    
remote_receiver:
  pin: D1 ### ESP8266
  dump:
    - rc_switch
  # Settings to optimize recognition of RF devices
  tolerance: 50%
  filter: 250us
  idle: 4ms
  buffer_size: 2kb

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

button:
#### RC Switch Raw
  - platform: template
    name: Power On Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000000001'
          protocol: 
            pulse_length: 393
          repeat:
            times: 25
            wait_time: 0s
  - platform: template
    name: Power Off Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000000011'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: Slow Speed Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000000111'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: Random Speed Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000000101'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: Middle Speed Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000001000'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: Fast Speed Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000001001'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: 20 Minute Timer Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000010000'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: 30 Minute Timer Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000010001'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: 40 Minute Timer Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000010010'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: 60 Minute Timer Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000001111'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s
  - platform: template
    name: Timer Off Button
    on_press:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '010001010010001000001110'
          protocol: 
            pulse_length: 393
          repeat:
            times: 10
            wait_time: 0s

Thanks again @Lainol, @matthew73210, @Derek3Rosen !

3 Likes