Awesome Open Source
Awesome Open Source

Join the chat at


Arduino library to control Mitsubishi Heat Pumps via connector CN105.

Quick start

Controlling the heat pump

HeatPump hp;

heatpumpSettings settings = {
    "ON",  /* ON/OFF */
    26,    /* Between 16 and 31 */
    "4",   /* Fan speed: 1-4, AUTO, or QUIET */
    "3",   /* Air direction (vertical): 1-5, SWING, or AUTO */
    "|"    /* Air direction (horizontal): <<, <, |, >, >>, <>, or SWING */

// OR individual settings
// hp.setModeSetting("COOL");


See heatPump_test.ino

You can make the library automatically send new settings to the heat pump by calling enableAutoUpdate(). When auto update is enabled the call to update() in the above example is not necessary, the new settings will be sent to the heat pump on the next call to sync() in loop().

Getting updates from the heat pump

void setup() {
  HeatPump hp;

void loop() {

  /* get settings from heatpump, including room temperature in settings.roomTemperature */
  heatpumpSettings settings = hp.getSettings();

By default the library ignores changes made from other sources (usually, the IR remote) and reverts them the next time sync() is called. This is the intendend behavior when the heat pump is fully controlled by automation.

If you want to also allow manual control and allow the library to update its settings from the current state of the heat pump you need to call enableExternalUpdate(). This will also enable automatic updates.


Instead of manually checking settings changes on each loop, you can set callback functions to be called when the current heat pump status or settings change:

void hpSettingsChanged() {
  // ...

void hpStatusChanged(heatpumpStatus currentStatus) {
  // ...

void setup() {


The callbacks will be called as necessary by the sync() method.

You can see this in use in the MQTT example.


  • sources
  • sample usage code
  • Demo circuit using ESP-01



  • Tested with ESP8266
  • Tested with Arduino Micro Pro / Arduino Nano
  • Tested with Mitsubishi HeatPump MSZ-FH/GE(wall units) and SEZ-KD (ducted units) complete list

Demo Circuit


Parts required to make a CN105 female connector

Other part suggestions

Special thanks

... to Hadley in New Zealand. His blog post, describing baud rate and details of cn105, Raspberry Pi Python code:

Wayback machine link as the site no longer exists:


Licensed under the GNU Lesser General Public License.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Plus Plus (369,974
Arduino (21,672
Mqtt (3,006
Esp8266 (2,933
Home Assistant (2,510
Wifi (1,611
Arduino Library (1,469
Serial (604
Openhab (159
C Library (132
Hvac (62
Air Conditioning (31
Heatpump (28
Mitsubishi (26
Melcloud (6
Kumocloud (2
Related Projects