Mitsubishi AC with Wemos D1 Mini Pro

Have a look at my post above.

First I would double check the pinout on the wires, second for the D1 mini clones, you may need to cut the trace mentioned a few times in this thread.
What model are your heat pump heads?

Also try baud 2400

I would suggest esp01 with the pre made breakout board. Around $20-30 for 5 pieces + breakout boards.

Agree. Those just work.

Shouldnt have deleted it, I fixed my problem. Turns out I was the problem.

Hello. I have a problem with esp8266 and mitsubishi AC. Works, run and stop AC, but no return the temperature. This is my code.

esphome:

name: ac2

esp8266:

board: esp01_1m #d1_mini

external_components:

  • source: github://geoffdavis/esphome-mitsubishiheatpump

substitutions:

devicename: mac2 #EJEMPLO

upper_devicename: mac2a #EJEMPLO

'Enable logging

logger:

baud_rate: 0

captive_portal:

'Enable Home Assistant API

api:

password: “**************” #OPCIONAL

ota:

password: “**************” #OPCIONAL

'Text sensors with general information.

text_sensor:

'Expose ESPHome version as sensor.

  • platform: version

    name: ${name} ESPHome Version

'Expose WiFi information as sensors.

  • platform: wifi_info

    ip_address:

    name: ${name} IP

    ssid:

    name: ${name} SSID

    bssid:

    name: ${name} BSSID

'Sensors with general information.

sensor:

'Uptime sensor.

  • platform: uptime

    name: ${name} Uptime

wifi:

ssid: MIWIFI_2G_ze7X #wifi_ssid

password: “**************” #wifi_password

'Enable fallback hotspot (captive portal) in case wifi connection fails

ap:

ssid: "Ac2 Fallback Hotspot"

password: "**************"

climate:

  • platform: mitsubishi_heatpump

    name: $upper_devicename

    update_interval: 500ms #Opcional

    baud_rate: 2400

Any ideas? Thanks

I have a Mitsubishi MZ-JP12WA which doesn’t have an automatic heat/cool temperature holding mode out of the box. The heat/cool mode within this library seems to work just just fine with the heat pump, but especially on days when the outdoor temperature keeps the room at a similar temperature to the automatic set point, the mode changes frequently from cool to heat and vice versa.

Is there any way to establish a dual set point with this library, so that it would heat when below 20°C, for example, but only cool when above 26°C? Alternatively, is there some way to set a minimum run or off time like you can with the core ESPHome thermostat? Thanks in advance!

I override the heat pumps own control with a home-assistant automation. Much better.

2 Likes

That’s what I’ve been thinking lately. Thanks, a good idea. I’ll get to it!

1 Like

I’m about to dive into connecting my Mitsubishi mini split ac unit to Home Assistant. I’ve read a ton of posts, websites and GitHub feedback about what works and what does not. I’ve settled on attempting this route: https://github.com/geoffdavis/esphome-mitsubishiheatpump](https://github.com/geoffdavis/esphome-mitsubishiheatpump). Can anyone confirm that this is still a working project? The swicago GitHub repo says it does not work with HA and I thought the Geoff Davis repo was a fork of that work.
As a side note, I found the wiring connector on AliExpress and purchased a 5 pack for under $10 with shipping. Since then I have opened my ac unit, found the CN105 plug, powered a D1Mini with it but haven’t tried to compile the interface. Mostly since I wasn’t sure what still works, what the best board will be and, honestly, absolutely no experience with MQTT. I’d like to go the ESPHome way, but have been tinkering with the Arduino software trying to replicate the process from some other postings. Still a lot to learn on this front.
If you’ve done this recently, or have working experience I love to get some feedback and pointed in the right direction.

This does work with HA via MQTT – I migrated my controllers from the original swicago forks to ESP-Home about 9 months ago, as I’ve found the ESP-Home controllers were more responsive and reconnected to WiFi after my APs restart due to updates.

Let me know if you want me to post my configs?

Actually, here’s my ESP-Home config – please note, you may find it unnecessary to add the two switch: items at the end of the config – I found having the ability to add a button to a dev console to reboot the ESP-8266s useful during troubleshooting.

substitutions:
  name: mitsubishi_heatpump_downstairs
  friendly_name: Mitsubishi - Heatpump - Downstairs
  fallback_SSID: Heatpump Fallback

esphome:
  name: ${name}
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: !secret ssid_wifi_ssid
  password: !secret ssid_wifi_password

ap:
  ssid: "${fallback_SSID}"
  password: !secret fallback_password

captive_portal:

logger:
  baud_rate: 0

api:

ota:
  safe_mode: true
  password: !secret ota_password

mqtt:
  broker: !secret mqtt_broker
  username: !secret mqtt_username
  password: !secret mqtt_password

web_server:
  port: 80

time:
  - platform: homeassistant
    id: homeassistant_time

text_sensor:
  - platform: version
    name: ${name} ESPHome Version

  - platform: wifi_info
    ip_address:
    name: ${name} IP

ssid:
  name: ${name} SSID

bssid:
  name: ${name} BSSID

sensor:
  - platform: uptime
    name: ${name} Uptime

  - platform: wifi_signal
    name: ${name} WiFi Signal
    update_interval: 60s

external_components:
  - source: github://geoffdavis/esphome-mitsubishiheatpump

climate:
  - platform: mitsubishi_heatpump
    name: "${friendly_name}"
    supports:
      mode: [HEAT_COOL, COOL, HEAT, FAN_ONLY]
      fan_mode: [AUTO, LOW, MEDIUM, HIGH]
      swing_mode: ['OFF', VERTICAL, HORIZONTAL]

switch:
  - platform: restart
    name: "Mitsubishi - Heatpump - Downstairs - Restart"

  - platform: safe_mode
    name: "Mitsubishi - Heatpump - Downstairs - Restart (Safe Mode)"
1 Like

@cshaw Thank you for the config. I was about to ask for it. I will try this code tomorrow. I do have a couple questions about MQTT. Ive set up the local broker which has a Hostname of core-mosquitto. Is this what I enter at BROKER:? I do have a secrets file set up with MQTT data, but with literally no other need for MQTT, Im a total NOOB at this part. Then, what do I have to do with this data? Write code to interact with MQQT and Climate or does this happen magically? What topic do I listen for to verify it is communicating?
As an update, today I flashed a D1Mini with the code provided by Geoff Davis, soldered my wiring and connected everything to the indoor unit. I get data from the D1Mini, but only the predefined time and wifi data. No climate data at all. I do see a climate entry in the States tab with the following attributes:

hvac_modes: off, heat_cool, cool, heat, fan_only, dry
min_temp: 61
max_temp: 88
target_temp_step: 0.5
fan_modes: auto, low, medium, high, middle, diffuse
swing_modes: off, vertical
current_temperature: null
temperature: 79
fan_mode: off
hvac_action: idle
swing_mode: off
friendly_name: SR MiniSplit
supported_features: 41

As you can see, current_temperature is null and this device does not update with changes at the remote. Nor does the unit respond to changes on the Thermostat card. It seems that the connection between HA and the AC unit ends at the D1Mini. This is where I’m stumped as to what to try next. I did try several different baud rates without any luck. I will also admit that I had TX and RX swapped at the D1Mini. (NOOB mistake on my part). To be clear, the TX on the ac unit goes to the RX on the D1Mini, correct? I had originally set it up TX to TX but some surfing revealed a pic that clearly showed TX to RX.
I feel like I’m very close to getting this to work. I just need to sort out a couple issues and I appreciate any help you can offer.
Thanks!

My ESPHome config for the D1Mini (w redacted data)

substitutions:
  name: d1m-srms
  friendly_name: SR MiniSplit

esphome:
  name: ${name}

esp8266:
  board: d1_mini

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: "xxxx"

ota:
  password: "xxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "D1M-Srms Fallback Hotspot"
    password: "xxxx"

captive_portal:

external_components:
  - source: github://geoffdavis/esphome-mitsubishiheatpump

  # Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

# Text sensors with general information.
text_sensor:
  # Expose ESPHome version as sensor.
  - platform: version
    name: ${name} ESPHome Ver
  # Expose WiFi information as sensors.
  - platform: wifi_info
    ip_address:
      name: ${name} IP
    ssid:
      name: ${name} SSID
    bssid:
      name: ${name} BSSID

# Sensors with general information.
sensor:
  # Uptime sensor.
  - platform: uptime
    name: ${name} Uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: ${name} WiFi Signal
    update_interval: 60s

climate:
  - platform: mitsubishi_heatpump
    name: "${friendly_name}"
    id: srms_121320220900
    baud_rate: 2400

I’ve hooked up 5 Wemos D1 Mini v2 clones to 5 indoor Mitsubishi heat pumps, and I’m running Mitsubishi2MQTT on the minis. 3 of them work great and are controllable from HA! Unfortunately, 2 of them report as disconnected from HVAC in the Mitsubishi2MQTT control panel.

I’ve tried swapping the minis between units and determined that the fault lies with the individual heat pump, not with the mini (since minis that work fine on a “good” heat pump do not work on a “bad” one).

What’s weird is that the heat pump models are nearly identical. For instance, NAXWST24A112AA works great while NAXWST06A112AA does not, and the only difference there is the capacity of the unit.

It seems like despite having identical model numbers, the control boards for these units might be different. Can anyone speculate on the issue or how to go about debugging the connection between the mini and heat pump without a pricey oscilloscope or logic analyzer?

@kartcon I also tried the route of using D1 Minis (without the MQTT part) with Geoff Davis’s code, but had the same issue of not receiving any data. Further reading led me to other write-ups about possible problems with more recent revisions of the D1 Mini, and possible workarounds. In the end I switched over to ESP-01s + breakout board, and they worked very well. Very happy with the result.

@jbs1
Once I added the MQTT section to my D1mini code everything clicked and began working. Im not sure if that piece of information was clearly described or explained in the original post, but after lots of searching and reading, I decided to give it a try. It worked for me and has been working for about two weeks flawlessly, so Im pretty happy with it now.

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "D1M-Srms Fallback Hotspot"
    password: "xxxxxxxxxxx"

> mqtt:
>   broker: !secret mqtt_broker
>   username: !secret mqtt_username
>   password: !secret mqtt_password
  
captive_portal:

external_components:
  - source: github://geoffdavis/esphome-mitsubishiheatpump

  # Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

Has anyone used this very cool variant of the Mitsubishi esp32 code: GitHub - akamali/mhk1_mqtt: Control Mitsubishi heat pump over the CN105 port using MHK1 and MQTT

It supports acting not just control of the indoor unit, but as a relay to an MHK1 or other CN105 controller, so the MHK1 can act as a local override. This would be handy if HA is down or the WiFi network was offline for some reason.

1 Like

I’m so close to having my first controller set up, I think. Maybe.
I’m following the Chris Davis guide, using these boards, and parts from Digikey for my connectors. I flashed the mitsubishi2MQTT sketch, got it set up on my network, installed in my unit, and communicating with HA through MQTT, according to the unit’s web page. But I can’t get it to communicate with the air handler. Is there a way to know if these boards require the cutting? I’d hate to break one of these for it not to work. Thanks for any help you can offer.

1 Like

So, I read through more of the 238 posts that came before mine and realized I’d wired my cable wrong, reversing Tx and Rx. After fixing that, I got the connection running, finally. But the problem now is that the board constantly drops off my WiFi network. It will often connect on its own to my network (no spaces in the name or password), but after a few minutes, it drops off and puts out it own AP again. If I join and reboot from there, it may repeat the AP thing or eventually get back on my WiFi, where the air handler and HA can talk to each other. But after a time, sometimes just a minute, sometimes longer, it will drop off again. I’ve disabled every 5GHz band on my router and turned off IGMP snooping, but it persists.
Is it likely the boards I’m using? Is there a silent majority of you out there coasting through this with reliable connections? If so, what hardware/software combos do you recommend? If the board loses its connection, I need for it to reconnect without my intervention, so is there some adjustment to be made to the sketch? What do you say?