<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ESP32 infrared receiver for Home Assistant to run 21 commands]]></title><description><![CDATA[<p dir="auto">I published this Home Assistant blueprint to trigger 21 different commands, one for each button on this 21 button infrared remote control.<br />
<a href="https://github.com/rvmey/TRIGGERcmd-Agent/blob/master/ha_blueprints/ir_remote.yaml" rel="nofollow ugc">https://github.com/rvmey/TRIGGERcmd-Agent/blob/master/ha_blueprints/ir_remote.yaml</a></p>
<p dir="auto"><img src="/forum/assets/uploads/files/1736293459078-iresp32.jpg" alt="iresp32.jpg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Install the "Mosquitto broker" Home Assistant add-on if you don't already have it.</p>
<p dir="auto">Create a Home Assistant user for Tasmota to log into MQTT using this web page:<br />
<a href="http://homeassistant.local:8123/config/users" rel="nofollow ugc">http://homeassistant.local:8123/config/users</a></p>
<p dir="auto">Connect your ESP32 device to your PC via USB and install Tasmota firmware using this web page:<br />
<a href="https://tasmota.github.io/install" rel="nofollow ugc">https://tasmota.github.io/install</a></p>
<p dir="auto">Connect it to your wifi, open the Tasmota web interface, and enable MQTT.  Point it to your Home Assistant IP address, and input the username and password for the user you just created for it.</p>
<p dir="auto">In the Tasmota Module configuration, enable IRrecv on GPIO 15:<br />
<img src="/forum/assets/uploads/files/1736293684881-138e7976-e53f-48a9-9d8e-def514e3f04c-image.png" alt="138e7976-e53f-48a9-9d8e-def514e3f04c-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Add this to your Home Assistant configuration.yaml.  This will make the IR receiver(s) available as entities you can select on your automation.</p>
<pre><code>mqtt: 
  sensor:
  - name: "IR Receiver Blue"
    state_topic: "tele/tasmota_778254/RESULT"
    value_template: "{{ value_json.IrReceived.Data }}"
  - name: "IR Receiver White"
    state_topic: "tele/tasmota_47F4CC/RESULT"
    value_template: "{{ value_json.IrReceived.Data }}"
</code></pre>
<p dir="auto">Modify it for your specific tasmota name(s) instead of tasmota_778254 or tasmota_47F4CC.  You'll find yours on the MQTT configuration page.</p>
<p dir="auto">Go to this page and install the blueprint with the IMPORT BLUEPRINT button.<br />
<a href="http://homeassistant.local:8123/config/blueprint/dashboard" rel="nofollow ugc">http://homeassistant.local:8123/config/blueprint/dashboard</a><br />
<img src="/forum/assets/uploads/files/1736292275829-4717fc04-65af-44a3-8d86-3154900b16a4-image.png" alt="4717fc04-65af-44a3-8d86-3154900b16a4-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Click the blueprint and configure your automation with an action for each of the 21 buttons on the IR remote.  Notice the automation can use multiple IR receivers if you want.</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1736292197395-b0a8fb92-b0e5-4e44-81bb-921af67b0bab-image.png" alt="b0a8fb92-b0e5-4e44-81bb-921af67b0bab-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The IR remotes are cheap enough you can buy a bunch and have them all over:<br />
<img src="/forum/assets/uploads/files/1736293744180-46c1ebbb-cf03-432f-8b4f-1a3694c415fe-image.png" alt="46c1ebbb-cf03-432f-8b4f-1a3694c415fe-image.png" class=" img-fluid img-markdown" /><br />
<a href="https://www.amazon.com/HiLetgo-HX1838-Infrared-Wireless-Control/dp/B01HTC5JX4" rel="nofollow ugc">https://www.amazon.com/HiLetgo-HX1838-Infrared-Wireless-Control/dp/B01HTC5JX4</a></p>
<p dir="auto"><img src="/forum/assets/uploads/files/1736295148208-23cd24c9-2fd9-4341-b66a-f47807c73178-image.png" alt="23cd24c9-2fd9-4341-b66a-f47807c73178-image.png" class=" img-fluid img-markdown" /><br />
<a href="https://www.amazon.com/Teyleten-Robot-ESP-WROOM-32-Development-Microcontroller/dp/B08246MCL5" rel="nofollow ugc">https://www.amazon.com/Teyleten-Robot-ESP-WROOM-32-Development-Microcontroller/dp/B08246MCL5</a></p>
<p dir="auto">Optionally, you might also want to run this command in the console to prevent it from losing its config when the power going out and back on too many times:</p>
<pre><code>SetOption65 1
</code></pre>
<p dir="auto">If you prefer a Raspberry Pi solution that uses the same IR remote, check out <a href="https://www.triggercmd.com/forum/topic/2474/raspberry-pi-image-with-triggercmd-pre-loaded">this post</a>.</p>
<p dir="auto">EDIT 4/12/25:   I've learned that these basic IR receivers work more consistently:<br />
<a href="https://www.amazon.com/Vishay-TSOP4838-Infrared-Receiver-Pack/dp/B00UO9VO8O" rel="nofollow ugc">https://www.amazon.com/Vishay-TSOP4838-Infrared-Receiver-Pack/dp/B00UO9VO8O</a></p>
<p dir="auto"><img src="/forum/assets/uploads/files/1744497850184-ead08945-26b3-49f2-81c2-4adf3dc695e5-image.png" alt="ead08945-26b3-49f2-81c2-4adf3dc695e5-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">These work well too:<br />
<img src="/forum/assets/uploads/files/1744499621346-ed3111b9-6376-4ab8-acb9-8eaf88c7beb5-image.png" alt="ed3111b9-6376-4ab8-acb9-8eaf88c7beb5-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://www.triggercmd.com/forum/topic/3199/esp32-infrared-receiver-for-home-assistant-to-run-21-commands</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 17:30:18 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/3199.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Jan 2025 23:21:37 GMT</pubDate><ttl>60</ttl></channel></rss>