IR Repeater in ESPHome - I'm CLOSE!

I’m have a project to recreate a $10 IR repeater with a WEMOS D1 Mini. I know, overkill, but its way more fun than just buying it on Amazon from China Plus the look on my wife’s face when it works and wires are everywhere will be priceless. I have the receiver working as well as the transmitter. I just need some help “wiring” up the two bits with a little bit of code, hopefully.

I stole this code from @erjchu’s post:

#The Receiver works great and prints all codes from all transmitters
remote_receiver:
  pin: 
    number: GPIO13 #D7
    inverted: yes
    mode: INPUT_PULLUP
  dump: all

remote_transmitter:
  pin: GPIO12 #D6
  carrier_duty_percent: 50%
  
api:
  services:
    - service: send_samsung_command
      variables:
        my_command: int
      then:
        - remote_transmitter.transmit_samsung:
            data: !lambda 'return my_command;'
    - service: send_lg_command
      variables:
        my_command: int
      then:
        - remote_transmitter.transmit_lg:
            data: !lambda 'return my_command;'

when i apply power to the transmitter, my receiver turns solid, so i know that part is working as well.

All I want to do is turn the received signal around and re-transmit it (for now). Home Assistant won’t be in the picture yet.

Receive raw data
store it in a variable?
transmit that raw data?

is this possible in just ESPHome by itself? Any pointers?

Jeff

I spent a LOT of time trying to implement IR RX and IR TX with EspHome. I tried many IR LEDs and configurations. The problem that I found is that it has to be very close to work. Have you tried placing your components next to each other? Also, I only made them work when using a D1 Mini.

My detector seems to work just fine, even at a distance as does the IR transmitter, so that’s not the issue.

It’s just “wiring” them together so to speak that I needed help with. If this was TTL chips, I’d be fine. I could tie the receiving signal to the transmittert with a 7401 buffer chip or a 741 op amp (I’m showing my age…).

I just wanted to do it in the ESPHome code somehow but I’m not at all sure how I’d do it. I don’t want to send anything to Home Assistant. I want to keep it all local in the D1 Mini/ESPHome module.

I never got any responses here so I ordered the damn thing from Amazon for $10, but it would still be fun to know I could do this in ESPHome.

Jeff