ESP Home IR-Receiver (ESP32 CH340 KY-022 IR Receiver)
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
A case to house an ESP32 with an KY-022 IR Receiver to use in various IR-Related projects.
- Ocena
- 5 / 5
- Polubienia
- 8
- Pobrania
- 62
- Wydruki
- 1
- Wyświetlenia
- 772
- Oceny
- 1
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- Electronics
- Licencja
- Creative Commons — Attribution — Share Alike
Hi! I use a simple IR-Remote to control some of my smart-home devices and automations using home assistant. I built this little IR-Receiver using an ESP32 (CH340) USB-C Board and a KY-022 IR-Receiver. Both very inexpensive components.
I flashed my ESP32 with ESPHome and added it to HomeAssistant in order to start automations or control smart-devices with a simple and cheap IR-Remote I had lying around.
Here's a short Guide on how I set it up with Home Assistant:
Before printing and assembling anything, make sure your devices work.
Step 1: Connect the KY-022 IR-Receiver to your ESP-32

First Pin is GND > GND on ESP32, 2nd is VCC to 3V3 on ESP32 and third is DATA/SIGNAL to D16 on ESP32 (for example)
Step2: Install ESPHome Builder trough Home Assistant Addons
Step 3: Connect your ESP32 trough USB with your Computer (not on the Home Assistant Server itself, but the Computer you are configuring Home Assistant with).
Step 4: Launch ESPHome Builder, go to it's website trough the home assistant sidebar (if you enabled that) and click on “Add Device”
Step5: Give your new ESP Device a name, follow the prompts and flash the initial setup trough USB. Close the console after flashing is done.
Step6: The ESP Device should now appear in the ESPHome Builder as online, click on “Edit”. Add this to the bottom of your config:
remote_receiver: pin: number: GPIO16 inverted: True dump: # you can remove the dump later when everything is running smooth - raw tolerance: 30%
Hit Save > Install > Wirelessly
After flashing, the log should open. Point your IR Remote at your IR-Receiver, press your desired Button a few times and copy/paste the codes that you see.
Here's my config with values from my remote. Adjust for your needs:
remote_receiver: pin: number: GPIO16 inverted: True dump: # you can remove the dump later when everything is running smooth - raw tolerance: 30%
binary_sensor: # these are the sensors that appear in Home Assistant, leave this out for the initial install # --- LAUTER --- - platform: remote_receiver name: "IR Philips Lauter A" raw: code: [2690, -861, 472, -860, 472, -415, 473, -416, 1359, -1331, 444, -418, 473, -414, 473, -416, 472, -416, 472, -416, 472, -416, 473, -414, 473, -416, 472, -416, 472, -416, 916, -860, 472, -415, 473, -416, 472, -415, 473] - platform: remote_receiver name: "IR Philips Lauter B" raw: code: [2691, -886, 444, -871, 462, -416, 474, -415, 472, -886, 889, -417, 472, -416, 473, -415, 473, -415, 472, -416, 473, -415, 472, -415, 473, -416, 472, -416, 472, -416, 472, -415, 917, -886, 444, -418, 472, -416, 472, -415, 473]
# --- LEISER --- - platform: remote_receiver name: "IR Philips Leiser A" raw: code: [2692, -887, 444, -887, 445, -417, 473, -415, 1360, -1331, 444, -417, 474, -414, 473, -415, 473, -415, 473, -415, 474, -414, 473, -415, 473, -415, 473, -415, 472, -416, 916, -886, 445, -417, 473, -416, 915] - platform: remote_receiver name: "IR Philips Leiser B" raw: code: [2694, -886, 444, -888, 445, -417, 473, -415, 473, -885, 889, -417, 472, -416, 473, -415, 473, -415, 472, -415, 473, -416, 473, -415, 473, -415, 473, -415, 472, -416, 472, -416, 916, -886, 445, -417, 472, -416, 915]
# --- MUTE --- - platform: remote_receiver name: "IR Philips Mute A" raw: code: [2692, -860, 472, -861, 473, -415, 469, -419, 1357, -1330, 448, -417, 472, -416, 471, -417, 470, -418, 471, -417, 472, -416, 472, -415, 472, -417, 472, -416, 473, -415, 470, -418, 916, -416, 470, -861, 914] - platform: remote_receiver name: "IR Philips Mute B" raw: code: [2691, -860, 471, -861, 471, -417, 470, -418, 469, -863, 918, -414, 470, -418, 470, -418, 471, -417, 470, -418, 470, -418, 470, -418, 470, -418, 471, -417, 470, -418, 470, -418, 470, -418, 915, -417, 470, -862, 915]
# --- POWER --- - platform: remote_receiver name: "IR Philips Power A" raw: code: [2667, -863, 470, -862, 469, -418, 470, -419, 1356, -1330, 448, -418, 469, -419, 468, -420, 470, -418, 468, -420, 469, -419, 469, -418, 469, -420, 469, -419, 468, -420, 468, -420, 912, -420, 469, -863, 469, -418, 470] - platform: remote_receiver name: "IR Philips Power B" raw: code: [2690, -861, 472, -860, 469, -420, 468, -420, 468, -864, 914, -417, 470, -418, 471, -418, 468, -419, 471, -418, 469, -419, 469, -418, 469, -419, 471, -418, 468, -419, 470, -418, 470, -418, 915, -417, 469, -863, 470, -418, 470]
As you can see, I have 2 entries for every button since my remote has a “toggle-bit” that alternates between 2 different codes for each button.
Step7: Go to your Home Assistant Settings > Devices and Services and you should already see a new ESP-Device being discovered. If it does not appear automatically, add it.
In the device page, select your newly added device. You should now see a list of sensors you can use in automations as you see fit :)

ESP32 NodeMCU CH340 I used: https://www.amazon.de/dp/B0C6QHLGJG?ref=ppx_yo2ov_dt_b_fed_asin_title
KY-022 IR-Receiver I used: https://www.amazon.de/dp/B09SLS7ZW2?ref=ppx_yo2ov_dt_b_fed_asin_title
Have fun and happy printing! :-)