Mitsubishi Heat Pump

Finally found the time to integrate my Mitsubishi Heatpump. It turned out there are many a bit different tutorials available on how to achieve this - all using the great library from https://github.com/SwiCago/HeatPump, but with a bit different sketches - so no out-of-the-box solution (firmware).

I’m using ESPEasy for other sensors I have at home and really like how easy it is to set it up, do OTA, … therefore decided to give it a spin and integrate the above mentioned library into ESPEasy as a plugin.

The Mitsubishi Heatpump can now be added as simple as selecting it from the list, selecting the serial port used for connection - and we are ready:

Once we hit Submit, the plugin will start sending messages through controller, i.e. MQTT with payload:

{"roomTemperature":23.0,"wideVane":"|","power":"OFF","mode":"AUTO","fan":"QUIET","vane":"AUTO","iSee":false,"temperature":24.0}

to set topic, in above example that would be FF_Nik_Room/ac/settings.

Message is send every time a change is detected (i.e. one changes settings using IR remote control) and every X seconds, as set in the settings (60 seconds in above screenshot).

Controlling AC is done through the same topic with /cmd suffix, i.e. FF_Nik_Room/ac/settings/cmd in our example. Payload:

  • MitsubishiHP,temperature,<value> - set temperature, value can be between 16 and 31;
  • MitsubishiHP,power,<value> - value = ON or OFF;
  • MitsubishiHP,mode,<value> - value = HEAT, COOL, FAN, DRY or AUTO;
  • MitsubishiHP,fan,<value> - value = 1, 2, 3, 4, AUTO or QUIET;
  • MitsubishiHP,vane,<value> - value = 1, 2, 3, 4, 5, SWING or AUTO;
  • MitsubishiHP,widevane,<value> - value = <<, <, |, >, >>, <> or SWING.

Using info from here, this is how my OH config looks like:

.things:

Bridge mqtt:broker:rasnas "MQTT Broker" [ host="192.168.2.51" ] {
  Thing topic ffNikRoom {
    Channels:
      Type number:acRoomTemperature [ stateTopic="FF_Nik_Room/ac/settings", transformationPattern="JSONPATH:$.roomTemperature" ]
      Type number:acTemperature [ stateTopic="FF_Nik_Room/ac/settings", transformationPattern="JSONPATH:$.temperature", commandTopic="FF_Nik_Room/ac/settings/cmd", formatBeforePublish="MitsubishiHP,temperature,%d" ]
      Type string:acPower [ stateTopic="FF_Nik_Room/ac/settings", transformationPattern="JSONPATH:$.power", commandTopic="FF_Nik_Room/ac/settings/cmd", formatBeforePublish="MitsubishiHP,power,%s" ]
      Type string:acMode [ stateTopic="FF_Nik_Room/ac/settings", transformationPattern="JSONPATH:$.mode", commandTopic="FF_Nik_Room/ac/settings/cmd", formatBeforePublish="MitsubishiHP,mode,%s" ]
      Type string:acFan [ stateTopic="FF_Nik_Room/ac/settings", transformationPattern="JSONPATH:$.fan", commandTopic="FF_Nik_Room/ac/settings/cmd", formatBeforePublish="MitsubishiHP,fan,%s" ]
      Type string:acVane [ stateTopic="FF_Nik_Room/ac/settings", transformationPattern="JSONPATH:$.vane", commandTopic="FF_Nik_Room/ac/settings/cmd", formatBeforePublish="MitsubishiHP,vane,%s" ]
      Type string:acWideVane [ stateTopic="FF_Nik_Room/ac/settings", transformationPattern="JSONPATH:$.wideVane", commandTopic="FF_Nik_Room/ac/settings/cmd", formatBeforePublish="MitsubishiHP,wideVane,%s" ]
  }
}

.items:

Number FF_Nik_Room_ac_room_temp "Room temperature [%.1f °C]" <temperature> { channel="mqtt:topic:rasnas:ffNikRoom:acRoomTemperature" }
Number FF_Nik_Room_ac_temp "Temperature [%.1f °C]" <heating> { channel="mqtt:topic:rasnas:ffNikRoom:acTemperature" }
String FF_Nik_Room_ac_power "Power []" { channel="mqtt:topic:rasnas:ffNikRoom:acPower" }
String FF_Nik_Room_ac_mode "Mode []" <fan_ceiling> { channel="mqtt:topic:rasnas:ffNikRoom:acMode" }
String FF_Nik_Room_ac_fan "Fan" <fan> { channel="mqtt:topic:rasnas:ffNikRoom:acFan" }
String FF_Nik_Room_ac_vane "Vane" <flow> { channel="mqtt:topic:rasnas:ffNikRoom:acVane" }
String FF_Nik_Room_ac_widevane "Wide Vane" <flow> { channel="mqtt:topic:rasnas:ffNikRoom:acWideVane" }

.sitemap:

Frame {
	Text label="Nik's room" item=FF_Nik_Room_ac_room_temp icon="climate" {
		Text item=FF_Nik_Room_ac_room_temp
		Setpoint item=FF_Nik_Room_ac_temp minValue=16 maxValue=31 step=1
		Switch item=FF_Nik_Room_ac_power mappings=[OFF="Off", ON="On"]
		Switch item=FF_Nik_Room_ac_mode mappings=[COOL="Cool", HEAT="Heat", DRY="Dry", FAN="Fan", AUTO="Auto"]
		Selection item=FF_Nik_Room_ac_fan mappings=[1="1", 2="2",3="3",4="4",AUTO="AUTO",QUIET="QUIET"]
		Selection item=FF_Nik_Room_ac_vane mappings=[1="1", 2="2",3="3",4="4",5="5",AUTO="AUTO",SWING="SWING"]
		Selection item=FF_Nik_Room_ac_widevane	mappings=["<<"="<<","<"="<","|"="|",">"=">",">>"=">>",SWING="SWING"]
	}
}

and result:

In my setup I’m using D1 mini ESP module since it can be powered directly from 5V so no additional components are needed, more or less just connecting 4 wires to it :slight_smile: Details on how to connect AC and ESP module can be found in link above. Also thinking about adding an additional DHT22 into the AC to measure humidity in the room too … need to check if there is room in the AC for it :slight_smile:

EDIT: commands now have a MitsubishiHP prefix to distinguish them from other EspEasy commands .

EDIT2: Firmware images (releases) are available here, please note MitsubishiHP plugin is part of test images, i.e. ESP_Easy_mega-20200328_test_ESP8266_4M1M_VCC and can be found within the zip file (i.e. ESPEasy_mega-20200328.zip).

EDIT3: PR was merged, image for devices with 1M flash (ESP-01, …) is here.

4 Likes

A quick update - since everything is working smoothly for more than a week now

collecting data and displaying it via grafana:

As can be seen, I also added the DHT22 (green line is temperature as reported by the AC unit, other two values are coming from DHT22)

view from my phone:

Now its time to do the same for other units I have - some pictures taken before installing into the AC

Happy soldering :wink:

1 Like

Great work! Thank you for sharing this. I might give it a try in a few months.

IIRC, the connector used for connecting the ESP to the heatpump controller is something special. Where do you got it from? Can you share the exact type/part number etc?

The link from the first post contains a very complete guide (at the bottom of the page) on how to connect to the AC unit, therefore did not repeat it here. You can also find a list of supported units there.

Personally I used pre-crimped cables with PAP-05V-S that I bought in a local electronic shop + D1 mini ESP 8266 modules and DHT22 that I ordered from China … roughly all the parts per AC unit did cost ~ 5 euro ( ~1.5e cable + connector, ~1.5e D1 mini, ~2e DHT22).