So, as promised, I’ll just report back how my project went.
Since I did my research first and I knew I want to attach multiple IR transmitters, I mentioned that there is no way to create and use multiple IR receiver instances with the ESP8266 microcontroller because of its lack on dedicated RMT hardware peripheral. Based on that, things got clear I will have to use an ESP32 device instead for my project, which I have already installed anyway on my HAOS instance, in my case it is the much beloved LILYGO T-Internet-POE dev board.
Now that the project’s general conditions have been established, I first started off by ordering the IR transmitter and IR receiver parts recommended by OP on AliExpress, which took around two weeks to arrive.
As soon as they got delivered I first attached the IR receiver to the ESP32 with the code part which I just copy-pasted from OP’s initial tutorial and worked perfectly.
Since my Logitech Harmony Elite remote got all my needed different remote IR commands from all different vendors already bundled, I did not have to dig out all the dusty physical original remotes from all of my HiFi devices, instead I just physically placed the ESP32 dev board with the IR receiver in front of the Logitech Harmony’s IR blaster and was ready to go.
When it came into learning the Flirc IR commands, which I use to control a LibreELEC media center running a Raspberry Pi 5, I mentioned that ESPHome was not recognizing the IR commands as a pre-defined category. So I had to learn them as raw commands. Since OP suggested in his tutorial to not use raw commands if not explicitly necessary, I was worried about on how reliable it would work - but it really works surprinsigly great in the end!
As OP did not leave an example on how to learn raw commands, I’ll paste a working example out of my personal ESPHome config, where you can also see on how to configure multiple IR transmitter instances (Remember: This does not work on ESP8266, but only on ESP32!) in case you need a code example:
# Infrared receiver:
remote_receiver:
pin:
number: GPIO39
inverted: true
dump: all
# Infrared transmitter:
remote_transmitter:
- id: IRT001
pin: GPIO16
carrier_duty_percent: 50%
- id: IRT002
pin: GPIO32
carrier_duty_percent: 50%
- id: IRT003
pin: GPIO33
carrier_duty_percent: 50%
# Infrared buttons:
button:
# Roku:
- platform: template
name: "Roku Play"
on_press:
- remote_transmitter.transmit_nec:
transmitter_id: IRT001
address: 0xC2EA
command: 0xFC03
command_repeats: 1
# Flirc:
- platform: template
name: "Flic Left"
on_press:
- remote_transmitter.transmit_raw:
transmitter_id: IRT002
carrier_frequency: 38kHz
code: [3196, -3143, 563, -1063, 554, -1063, 554, -1063, 554, -527, 554, -1063, 554, -1063, 554, -1063, 554, -2809, 563, -527, 554, -527, 554, -527, 554, -527, 554, -527, 554, -527, 554, -1063, 1089, -1063, 1089, -1063, 554, -6384]
So after I got Home Assistant to learn all the required IR commands and tested them successfully on all of the end devices (e.g. AVR, TV, LibreELEC media center, etc.), I was finally ready to set up my own custom virtual remote control via the universal-remote-card on my Home Assistant dashboard. The universal-remote-card is highly customizable in any way, so I was able to replace the Logitech Harmony Elite device completely in mostly no time, with every virtual remote button mapped to a specific IR command HA entity button, triggered by my ESP32 dev board. To give you a nice example, the virtual remote looks like this:
As you may or may not mention on the picture, I wanted to create a virtual layout which looks as similar as possible to the original Logitech Harmony Elite device’s physical layout, but by getting rid of the buttons I don’t need instead, so that it does not get as overloaded by buttons as physical remotes most always do.
So, that was basically it! Success in any way I guess and I’m really happy with the outcome of this project. Everything went pretty well and it was a lot of fun to me and mostly straight forward, thanks to @Jpsy and its initial work. This is the amazing power of community driven projects guys!
Just wanted to add my two cents to this, so maybe this helps someone.
In addition, here are some impressions on how I managed to 3D print case mounting options for the IR transmitters and the ESP32 itself which I wired with Wago clamps which work very reliable and which in many cases I like more than soldering just because of the additional flexibility they provide:
Feel free to ask questions if you have any.
@Jpsy One cosmetic little thing I mentioned in your initial tutorial is where you describe on how to wire the IR transmitter and the IR receiver to VCC, you wrote 5V as the ESP voltage output. But ESP devices are providing a maximum voltage of 3.3V. Maybe you want to adjust this as it may confuse people. Thanks for considering.