No description, website, or topics provided.
Clone or download
Latest commit cdb9ead Jan 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Add images and 3D files Jan 15, 2019
3D files Add images and 3D files Jan 15, 2019
img Add images and 3D files Jan 15, 2019
include fix brightness blink Dec 22, 2018
ir_test Add clock + refactor Jan 9, 2019
lib in progress Aug 13, 2018
src Fix MQTT Bugs Jan 9, 2019
ui_asset in progress Aug 26, 2018
.gitignore add gitignore Aug 16, 2018
.travis.yml init files Aug 13, 2018 Update Jan 15, 2019
Untitled.png in progress Aug 27, 2018
platformio.ini in progress Aug 13, 2018
record.txt in progress Aug 26, 2018

ESP8266 Wifi AC Controller


Code for ESP8266 Microcontrollers that control my DIY Air-Conditioner remote. Code in this repo is intentionaly to use with Homebridge MQTT plugin on raspberry Pi. I made a circuit and enclosure by myself. I know that my circuit might need to add some resistors, feel free to edit it in your design.


  • 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+)
  • Control via HomeKit(Below iOS 11), Amazon Alexa using Fan service because it does not support AC control.


  • ESP8266 NodeMCU
  • OLED 256×64 SSD1332
  • LDR(Light Dependent Resistor)
  • Push Button
  • IR LED and LED (normal led for indicate when IR is emitting)
  • NPN Transistor BC338 - for increse voltage level for IR LED


Add this devices to Homebridge-MQTT

You can use program like MQTTLENS to send this command




  "name": "Smart AC",
  "service_name": "smart_ac",
  "service": "HeaterCooler",
  "manufacturer": "ESP8266",
  "firmwarerevision": "1.0.0",
  "SwingMode": 1,
  "RotationSpeed": {"maxValue":3, "minValue": 0, "minStep": 3},
 "CoolingThresholdTemperature": {"maxValue":28, "minValue": 18, "minStep": 1}


  1. I didn't made this project to supports all AC. It requires some modification to works with your AC. Please take a look at IRremoteESP8266 library which supports variety of AC brand.
  2. I developed this program with VSCode with PlatformIO plugin. Please install all missing libraries with PlaformIO
  3. Don't forget to change MQTT server ip address to match yours.
  4. For the first time, use Wifi setup to connect to your router.


  • PubSubClient
  • IRremoteESP8266
  • U8g2
  • WifiManager
  • ArduinoJson

Known issues

  • Schematics can be improved.
  • Interrupt can cause system crash.