Main Content

We recently started exploring the ESP8266 boards and today’s project is going to be an interesting one based on this WiFi module. We are going to build an ESP8266 based WiFi Air condition Remote Controller. While this project can be adapted to fit any device that uses a remote control, we will use it for controlling an Air Conditioner.

Usually, everyone switches “OFF” all electrical appliances in their home, including Air conditioners when leaving the house, this means when you get back home, the temperature will not be regulated, and it will take the air conditioner some time to achieve your desired level of coolness. But what if you could automatically control your air conditioner from your mobile phone when you are a few blocks away from home? What if you could turn it OFF from wherever you are, if you discover you left it ON when leaving the house? What if it can be synced with your phone’s location and turned ON when you are almost home? What if it can be synced with the weather information of your phone? These and many more questions, inspired today’s project.

How it works

The air conditioner (AC), is normally controlled by a “remote control” which sends infrared signals to it when a button is pressed. The AC interprets the signals and converts them to instructions to either increase its coolness or reduce it, go OFF or come ON, etc. Thus to be able to control it using our own device, the device will have to be able to mimic and send the same signals sent by the remote to the AC, such that, by pressing the “ON” button (as an example) on the app, our WiFi remote control sends the same IR signal the remote would have sent if the “ON” button was pressed.

The device we are going to build is based on the ESP8266 and it’s wonderful features and use has been discussed in one of our past tutorials. The ESP8266 will be connected via MQTT to home bridge and through it, Siri can be used to give instructions to control the AC. Once the instruction (say “turn on” for instance) is received over MQTT, the NodeMCU matches it with corresponding IR signals and the signal is sent to the AC through an IR led. An OLED display is used to provide visual feedback about the current state to the user. For non-iPhone users, the device can also be connected to the Amazon Alexa.

Asides the control of the Air conditioner via Siri or Apple’s home kit, it is also equipped with control switches.

To make the experience a complete one, the following features were added to the project;

Display NTP Clock when standby.

Simple button control.Power, Temp up / down.

Can control temperature, swing, fan speed and mode with HomeKit.

Auto brightness according to ambient light.

OTA Firmware upgrade.

Control via HomeKit using HeaterCooler Service (iOS 11+)

Works with Amazon Alexa using fan service

At the end of today’s tutorial, you would know the basics of building IoT solutions and Home automation. You would also learn how to intercept signals sent by IR based remote controls, ( please do this within lawful limits and do not apply to dangerous situations), create an IR transmitter which could be used to control all IR remotes based appliances in your home or office, and build devices that can be controlled via Apple’s Home kit.”

Link to article