# IRremoteESP8266: sending and receiving IR on ESP8266 and ESP32

> IRremoteESP8266 is an Arduino-framework library that encodes and decodes infrared signals on ESP8266 and ESP32 boards, with a protocol list that leans heavily toward air conditioners. Here is how it installs, how the send and receive paths work, and where it stops being the right tool.

**crankyoldgit/IRremoteESP8266** — Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/

- Repository: https://github.com/crankyoldgit/IRremoteESP8266
- Stars: 3,616 · Forks: 935
- Language: C++
- License: LGPL-2.1
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/crankyoldgit-irremoteesp8266

## What IRremoteESP8266 is for, and who it is written for

The problem is narrow and concrete: you have an ESP8266 or ESP32 board, an IR LED or an IR receiver module such as a TSOP17xx, TSOP22xx, TSOP24xx, TSOP36xx, TSOP38xx, TSOP44xx or TSOP48xx demodulator, and you want the microcontroller to talk to consumer infrared devices. The README states the library lets you send and receive infrared signals on those two chip families using the Arduino framework and common 940nm IR LEDs. That combination, a WiFi-capable MCU plus IR transceiver, is what makes the project interesting: the board can both learn a remote and replay it over the network.

The audience is Arduino and PlatformIO developers, not end users. There is no binary, no daemon and no configuration file. You write C++ sketches, or you use one of the bundled examples as a starting point. The repository ships examples such as IRrecvDumpV2 and IRrecvDumpV3 for capturing unknown signals, IRsendDemo for transmitting, and a set of per-brand sketches including TurnOnDaikinAC, TurnOnMitsubishiAC, TurnOnPanasonicAC, TurnOnFujitsuAC, TurnOnGreeAC, TurnOnKelvinatorAC, TurnOnArgoAC, LGACSend and ControlSamsungAC. The library also carries examples named IRMQTTServer, IRServer and IRGCTCPServer, which is a fair signal of what people build with it: a network-attached IR bridge.

If your goal is a finished smart-home appliance rather than firmware, this is the wrong layer to start at. The README documents a library, not a product.

## How the send and receive paths actually work

The library splits into two classes that mirror the two directions. IRsend handles transmission and IRrecv handles reception and decoding. The README's history section states that Mark Szabo updated the IRsend class to work on the ESP8266 and that Sebastien Warin did the receiving and decoding part, and that as of v2.0 the library was almost entirely re-written with the ESP8266's resources in mind. That rewrite matters because an ESP8266 has far less RAM than the AVR boards the original Arduino-IRremote library targeted, and IR protocols are timing-sensitive.

The practical consequence is that the library does not treat every device as a bag of button codes. Air conditioners send a whole state frame, so the per-brand examples set mode, temperature, fan and swing together and emit one long transmission rather than a sequence of key presses. That is why SupportedProtocols.md is the document you actually read before buying hardware: the library's breadth is concentrated in HVAC protocols and in the remote-control protocols it has reverse-engineered.

For reception, the decode path is what the IRrecvDump examples exercise. You point a receiver at a remote, the sketch prints the decoded result, and you learn which protocol the library matched. For transmission, IRsend exposes the encoders. The related search phrase Irsender sendpulsedistancewidth points at the lower-level entry point for signals the library has no named protocol for: you supply raw timing rather than a device code.

Documentation is generated with Doxygen and published as an API reference, so the header files are the authoritative description of the class surface.

## Installing IRremoteESP8266 and reading your first signal

There are three documented installation routes. The Arduino IDE route is the one most people should take. In Arduino IDE v1.8 or later, open Sketch, then Include Library, then Manage Libraries. Type IRremoteESP8266 into the filter box, click the result, choose the version and press Install. The README documents this for Windows and Linux.

On Linux you can clone instead, which makes updating a single command:

```bash
cd ~/Arduino/libraries
git clone https://github.com/crankyoldgit/IRremoteESP8266.git
```

To move to a newer revision later, the README gives this:

```bash
cd ~/Arduino/libraries/IRremoteESP8266 && git pull
```

On Windows the manual route is a ZIP download from the repository, extracting the contents, renaming the extracted folder to IRremoteESP8266, and moving it into the Arduino libraries directory, which the README gives as C:\Users\YOURNAME\Documents\Arduino\libraries\. Restart the IDE afterwards.

For a first real use, do not start by transmitting. Start by receiving, because that tells you whether your hardware and your target device are compatible at all. Open the IRrecvDumpV2 or IRrecvDumpV3 example, wire your receiver module, flash the board and open the serial monitor. Point the original remote at the receiver and press a button. What you should see is a decoded protocol name and the corresponding code values printed to the monitor. If the output is noise or nothing, the README points to a Troubleshooting Guide on the project wiki before you file an issue.

Only once you have a decoded result should you move to the send examples, and the per-brand sketches such as TurnOnDaikinAC or TurnOnMitsubishiAC are the closest thing to a template for a full state frame.

## Where IRremoteESP8266 stops being the right tool

The first limitation is coverage. The library decodes what it has been taught to decode. SupportedProtocols.md is an explicit list, and a device outside it is not a configuration problem you can solve by editing a header. The escape hatch is raw timing capture and replay, which works but loses the semantic layer: you can repeat a recorded waveform, not construct a new state such as 22 degrees at fan speed two.

The second is the API's stability history, and this is the part worth reading carefully before you commit a product to it. The README states that v2.0 changed usage enough that existing code needed changes, and that from v2.5 the library moved from #define constants to const with the kConstantName style. The README says the most likely externally used #defines were aliased for limited backward compatibility, and that going forward only the new kConstantName style will be supported for new protocol additions. It also says this may potentially cause old programs to not compile. A library that renames its public constants twice across major versions is a library whose upgrade path costs you a compile-and-fix cycle, and the README does not document a rollback procedure for a failed upgrade.

The third is the platform boundary. This is Arduino-framework C++ for ESP8266 and ESP32. If your home automation stack is ESPHome, you are not writing sketches and this library is not the interface you use; the related searches around irremoteesp8266 esphome and irremoteesp8266 home assistant reflect that people hit this boundary. Similarly, if you need a maintained Python or Node client, the repository's python/ and tools/ directories exist but the README does not present them as the supported entry point.

Finally, the licence is LGPL-2.1. That is a copyleft licence with linking provisions, and it is a different obligation from the MIT licence many Arduino libraries use. If you ship closed firmware, the licence terms are something to read against your own distribution model rather than assume.

## IRremoteESP8266 against the Arduino-IRremote lineage and against ESPHome

The README is explicit that this library was originally based on Ken Shirriff's Arduino-IRremote, and that the ESP8266 and ESP32 work was added on top before the v2.0 rewrite. The difference in approach is the target hardware. The upstream library was written for AVR boards with very different memory and timer constraints. IRremoteESP8266 was re-written with the ESP8266's resources in mind and concentrates its protocol work on the devices people actually attach to a networked board, which in practice means air conditioners. If you are on an ESP board and your device is an AC unit, the protocol list here is the reason to choose it. If you are on an AVR board, this is not your library.

The other real alternative is ESPHome, which is a different kind of thing: a firmware framework configured with YAML rather than sketches. The difference is not quality, it is where the logic lives. With IRremoteESP8266 you write the control flow, the state machine and the network layer yourself, using examples like IRMQTTServer as a starting point. With ESPHome you declare components in configuration and let the framework generate firmware. Choosing ESPHome means giving up direct access to IRsend and IRrecv calls; choosing IRremoteESP8266 means owning the firmware. The related searches for irremoteesp8266 esphome and irremoteesp8266 home assistant suggest that a lot of people arrive here after discovering they want behaviour the declarative route does not expose.

## Maintenance, releases and what an upgrade costs

The repository is not archived, and the last push was on 2026-08-23, which is recent. The most recent release is v2.9.0, published on 2026-01-02, following v2.8.6 in July 2023 and v2.8.5 in May 2023. That release cadence is worth noting: a long gap between v2.8.6 and v2.9.0, then a version bump in early 2026. The README points to ReleaseNotes.md for the significant changes in each release, and that file is the thing to read before upgrading rather than after.

The upgrade cost is documented in two places. The v2.0 migration is described on a wiki page titled Upgrading to v2.0. The v2.5 constant rename is described in the README itself, with the advice that you can usually derive the new name from the old, for example CONSTANT_NAME becoming kConstantName. In practice an upgrade means: pull the new version, compile, fix the constants that no longer resolve, and re-flash. There is no documented rollback, so keep the previous library version available if the board is in a place you cannot easily reach.

On licensing, the repository carries a LICENSE.txt and the project is LGPL-2.1. LGPL-2.1 permits use in proprietary applications under conditions that concern modification of the library and the ability to relink. Because this is a library compiled into your firmware rather than a separate process, those conditions are worth reading against how you distribute. This is a description of the licence identifier, not legal advice.

Hardware cost is the other ongoing item. IR receiver modules and 940nm LEDs are cheap, but the per-brand examples mean each new device you want to control is a new protocol question, not a new configuration entry.

## Conclusion

Adopt IRremoteESP8266 if you are already writing Arduino-framework firmware for an ESP8266 or ESP32 and your target device appears in SupportedProtocols.md, especially if it is an air conditioner with a long stateful frame. Do not adopt it if your board runs ESPHome, if the device is unknown and undocumented, or if you need a stable C++ API for a long-lived product rather than a library that still renames constants between major versions. Before committing, verify two things: that your exact model is listed in SupportedProtocols.md, and that the sketch you intend to ship compiles against v2.9.0 with the kConstantName naming, because the README states that code written against pre-v2.5 constants may no longer compile.

## FAQ

### What is an ESP8266 used for in an IR remote project?

In this library the ESP8266 is the microcontroller that sends and receives infrared signals using the Arduino framework, with common 940nm IR LEDs and receiver modules. Because the board also has WiFi, it can act as a network-attached IR bridge, which is what the IRMQTTServer and IRServer examples demonstrate.

### How do I test whether an IR remote is working?

Point the remote at an IR receiver module wired to your board and run the IRrecvDumpV2 or IRrecvDumpV3 example, which exercise the reception and decoding path. A working remote produces a decoded protocol name and code values in the serial monitor; the README points to a Troubleshooting Guide on the project wiki when it does not.

### Is the ESP8266 discontinued?

The README does not discuss the ESP8266's product status. It states only that the library sends and receives infrared signals on an ESP8266 or an ESP32 using the Arduino framework, and that as of v2.0 the library was almost entirely re-written with the ESP8266's resources in mind.

### How do I use an IR remote with an Arduino?

With this library you install it through the Arduino IDE's Manage Libraries dialog or by cloning it into your libraries folder, then start from an example. IRrecvDumpV2 and IRrecvDumpV3 capture and decode signals from an existing remote, and IRsendDemo or the per-brand sketches such as TurnOnDaikinAC transmit them.

## Sources

- [crankyoldgit/IRremoteESP8266 on GitHub](https://github.com/crankyoldgit/IRremoteESP8266)
- [Issues](https://github.com/crankyoldgit/IRremoteESP8266/issues)
- [License: LGPL-2.1](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/LICENSE)
- [README](https://github.com/crankyoldgit/IRremoteESP8266/blob/master/README.md)
- [Releases](https://github.com/crankyoldgit/IRremoteESP8266/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/crankyoldgit-irremoteesp8266
