I initially also tried to get my IR system to work using a EPS8266 and also Arduino Uno . Although others showed how to read remote control codes and output them I always received different codes and could never get my system to work. I then purchased a “Xiaomi Universal IR Remote Controller” ($21 from gearbest.com). I could manage to setup all my devices (2 TV’s, 2 Sound Systems, 2 Air conditioners and XBox One). I used the Miio Openhab binding to “learn” the IR codes, wrote them into Openhab rules and now I can operate all my devices via Openhab.
This has been a steep learning curve and I had to put up with and couple of annoyances but for me it turned out to be worth the trouble. Some of the issues are that the Xiaomi software is in Chinese. Setting up remotes was challenging and I had to use Google translate with screen shots of the app a lot.
I have been asked by a few people on the Openhab forum to write a Tutorial so I will be doing that and hope to have it out in a few days. I will post the link here if anyone is interested.