Wrapper for simulate Midea Air Conditioners
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Update use_explaned.ino Mar 22, 2016
src doOscilate Nov 13, 2015
tests/unit_tests There's a bug in disable no_sound, change_direction and oscilate Nov 11, 2015
.gitignore Initial commit Nov 5, 2015
.travis.yml Update .travis.yml Nov 7, 2015
LICENSE Initial commit Nov 5, 2015
README.md Update README.md Mar 20, 2016
library.json Update library.json Dec 12, 2017
library.properties Specify scheme in library.properties url value Jun 15, 2018



Build Status License Badge Issues Badge Join the chat at https://gitter.im/WiserUFBA/ArduMideaWrapper Bitdeli Badge


The remote control of Midea Air Conditioner have an UI point of view, the values of the commands on the remote control like Temperature, and Speed Fan are all synchronized with the Air Conditioner when you change some of them, this implies in the following problem: you can't emit only one command! You need to emit all the states on the remote control, even if you only just wanna change the temperature, the only independent command on this remote control is the command to turn off, all the others including the turn on need to be concatenated.

In order to solve this problem, this library provides an object that simulate the interface present on the remote control, making the process of control the Midea Air Conditioner more easier.

How to Use?

To use this library you need to include the traditional IR library and pass the reference of the object irsend in the constructor of the MideaIR class.

IRsend irsend;
MideaIR remote_control(&irsend);

Then, you can use the functions to control your air conditioner.

You can use the functions to turnON and turnOFF without the need of call emit().:

// To turn the Air Conditioner ON
// and the following to turn the Air Conditioner OFF

emit() Is a function used to emit the IR Signal to the Air Conditioner, if you make a change on the mode or temperature, use emit() to send the signal, if you don't use emit() the air conditioner won't be changed. There are functions to set Mode, Temperature and Speed Fan:

The function to set temperature (setTemperature()) receive as paramenter an int with the required temperature, the range accepted is between 17 and 30, if you use more than 30, the class will change this to 30 and if you use less then 17 the class will change this to 17:


The function to set mode (setMode()) receive a constant as a parameter, if you don't use a correct constant the class with the required mode will change this to the default that is mode_auto:


There are four modes, represented as the following constants: mode_cool, mode_heat, mode_no_humidity, mode_auto.

The function to set speed fan (setSpeedFan()) receive a constant as a paramenter, like the setMode() function, if you don't use a correct constant the class will use the default fan_auto instead:


There are five fan configurations, represented as the following constants: fan_off, fan_speed_1, fan_speed_2, fan_speed_3, fan_auto.

Like we have said above, set functions just change local variables, if you want to send these to the air conditioner you need to call emit(). You can set as many operations as you can, before send the signal, and all of them will be synchronized once.



You can use the following function to retrieve information from the class:

// Get Mode
// Get Speed Fan
// Get Temperature
// Get State ~ ON or OFF ~ true or false

You can download the IR library here: Arduino-IRremote

P.S.: Don't forget to use setState(true) before you emit commands like setTemperature()or setMode(), if you don't set the state to true the air conditioner won't turn on, or change the value. The default value to state is false.


To improve Infrared Signal we recommend make a amplifier, you can use a simple resistor:

InfraRed Booster1

Or, you can use a circuit with capacitor and a transistor NPN:

InfraRed Booster

P.S.: To better range use a super bright LED


Thanks a lot Daniel Veillard (http://veillard.com) @veillard to point how to send the IR signals of Midea AC in the post (http://veillard.com/embedded/midea.html), they help us a lot in the construction of this library, and thanks to Tom Blough for help me (@jefersonla) and @veillard in the proccess of make reverse enginering. Thanks for the contributors of https://github.com/z3t0/Arduino-IRremote too.

Developers Jeferson Lima (@jefersonla) and Andressa Andrade (@AndressAndrade)


Developed by
Wiser Research Group Logo