Jfessard found themselves in a situation that many of us know well: their A/V setup was hard to reach, and therefore control. In this case, their projector and HDMI switch were on a tall closet, which made them difficult to get to. The obvious solution was to use remote controls, but getting a clear line-of-sight was tricky, and the remotes kept getting lost anyway.
The better solution that Jfessard came up with was to use Alexa for voice control. To make that work, the ever-useful ESP8266 was the perfect intermediary between the Amazon Echo and the A/V equipment. The ESP8266 is wireless, so it works over your network and doesn’t require line-of-sight.
Getting an ESP8266 working with Alexa requires the use of fauxmoESP, which provides a workaround by emulating a Belkin WeMo device. Many virtual devices can be emulated on a single ESP8266, but they are limited to simple on/off functionality. In Jfessard’s case, that was suitable, as the projector just needed to be powered on, and turning “on” a particular HDMI port could simply fire the IR signal to switch to that port.
With the ESP8266 able to understand Alexa on/off commands, the next step was to setup IR-blasting capability to actually control the projector and HDMI switch. IRremoteESP8266 is another great library, and it can be used both to learn IR commands and recreate them. All Jfessard had to do was teach it the proper commands, and place the ESP8266 on top of the closet with the other equipment.