I do something similar, I have an ESP8266 microcontroller hooked up to an IR sender/receiver that I can use to send and receive codes from Home Assistant to control some stuff. The module I use takes care of encoding and decoding the IR and simply dumps it to serial, which the micro reads and forwards to Home Assistant via MQTT (and vice versa). It's this one
but it's not hard to do it with a bare IR emitter and receiver. Unfortunately I haven't had have much time lately to document many of my projects for other people, but you can learn a lot from Youtube and Google these days.
https://learn.adafruit.com/using-an-infrared-library/hardwar...
I do something similar, I have an ESP8266 microcontroller hooked up to an IR sender/receiver that I can use to send and receive codes from Home Assistant to control some stuff. The module I use takes care of encoding and decoding the IR and simply dumps it to serial, which the micro reads and forwards to Home Assistant via MQTT (and vice versa). It's this one
https://www.aliexpress.com/item/5V-IR-Infrared-Remote-Decode...
but it's not hard to do it with a bare IR emitter and receiver. Unfortunately I haven't had have much time lately to document many of my projects for other people, but you can learn a lot from Youtube and Google these days.