Switch A/C on and off using MQTT
Two files must be written to SPIFFS before this program will work. These files contain the code generated by the air conditioner remote control. They are captured using an IR detector connected to an Arduino. One file is the OFF function and the other the ON function. There is no way of controlling individual air conditioner parameters so the remote should be set up with the desired settings before the code is captured. These files can be quite large.
A feed from the Adafruit IO website needs to be set up. A toggle should be configured to send strings ON and OFF. When a message is received the appropriate data file is sent to the IR led.