Hi everyone,
I wanted to share the correct configuration for a common “Generic ESP32 IR Shield” (often sold as ESP32E-N4 Infrared Transmitter Receiver NEC or similar on AliExpress).
Most online documentations and even some silk-screen prints on the PCB are incorrect regarding the IR Receiver pin.
After some troubleshooting and multimeter testing, here is the working pinout for this specific board revision (WROOM-32E):
- IR Receiver: GPIO14 (Inverted) – Note: Many guides say GPIO5, which is wrong for this board
- IR Transmitter: GPIO4
- Hardware Power: GPIO21 (Crucial: This pin must be HIGH to provide power to the IR components)
Working ESPHome Configuration:
# Hardware Power Management (Necessary for this board to power IR LEDs/Receiver)
switch:
- platform: gpio
pin: GPIO21
id: ir_power_21
name: "IR System Power"
restore_mode: ALWAYS_ON
remote_transmitter:
pin: GPIO4
carrier_duty_percent: 50%
remote_receiver:
pin:
number: GPIO14
inverted: true
dump: all
# Optional: Setup as a Proxy for Home Assistant
infrared:
- platform: ir_rf_proxy
name: "IR Proxy Transmitter"
remote_transmitter_id: ir_tx
- platform: ir_rf_proxy
name: "IR Proxy Receiver"
remote_receiver_id: ir_rx
