I had the same issue with the wemos D1. It would not connect to the aircon with neither esphome nor mitsubishi2MQTT and whilst both projects mention ESP32 they dont work with the board either and I dont know enough to fix the code…
However, espeasy on an ESP32 does work and I managed to get it running.
You’ll need to download espeasy zip and build your own. They recommend Platform IO and it’s the easiest to use.
Once you have platformio you create a copy of the Custom-sample.h and rename it Custom.h
Open that file and uncomment line 357 (#define USES_P093 // MitsubishiHP) then build and configure your ESP.
Following from my earlier note I managed to get this project working using espeasy.
I can now fully control my Mitsubishi Aircon (overhead duct type Model PEY series).
I have integrated into HA with input helpers and a automation, because I havent been able to work out the template for the climate component.
The part where I struggle is this.
commands are sent to a topic /master/master/settings/cmd
and the payload has a ‘prefix’. for example:
If I want to increase the temperature this is the mqtt:
So in the climate component my understanding is I define a template as such:
temperature_command_template: “{{value_json[‘temperature’]}}”
but I need to add the (MitsubishiHP,temperature,) prefix. I’ve tried this:
temperature_command_template: “MitsubishiHP,temperature,{{value_json[‘temperature’]}}” and similar combinations, but the payload is not coming out as required.
I have this working on 2 ACs using Wemos D1 Minis and ESPHome / Home Assistant.
I followed this guide (which is also linked above by nickrout - or found from the ESP DIY page):
I have since added motion sensors to both ACs (connected to the ESP then use HA automations to turn on lights/scenes). You could add a temperature (and humiditiy sensor) to the ESP as well.
I couldn’t get it to work. Upon further reading (even in this same post) i came across multiple similar comments with the associated explanation on why new d1 minis do not work.
I got it to work with esp32 dev boards (30 pin). However, i only had 5 boards and I have 7 aircons. I ordered more esp32 and I got 32 pins models. And those do not work either.
Seems ‘safest’ bet is to go with the esp-01 set up recommended in the swicago github.
So I was finally able to use the wemos d1 minis I’d ordered last month. Read a bit and came across this Mitsubishi Heat Pump/Lobby where one user posted a picture showing the traces he’d cut to get his d1 working.
I dont have that exact board ( I don’t know what model I have, as it’s not labelled) but based on more reading it appears to be a v.3 (version).
Based on the post I went ahead and cut what seemed to be the associated Rx Tx traces and voila, it worked. Serial communication is working and the device is controling the AC unit correctly.
Hey all, there is so much great info in this thread. I’m getting a couple of ducted air handlers installed in the next few weeks (SVZ-KP units) and looking at my control options. This project seems like fun and it seems like it’ll save a ton of money over the Kumo Cloud the dealer was pushing. I would like the option to have a physical controller for each unit, so I had been considering the PAC units with Nests, but would also consider using the PAR-CT01MAU-SB controller if it would not conflict with this device. The PAR connects with the 2 wire TB15 port on the control board of the air handler. I can’t find any experiences with anyone else on whether these units might work with HA controlling over wifi as well. Any thoughts? Thanks in advance!
I don’t think you can hook a Nest adapter to the Wemos D1’s and have them act as a local passthrough. The newer Kumo adapters do support this function (they have an extra CN105 port on them).
What you could do is install the Nest’s in a dummy thermostat configuration where they think they are controlling an HVAC unit, but it’s actually not wired to anything. Then you use the Nest integration to read the local temp from the Nest and set that as the remote temp for the D1’s control of the indoor unit, and then also track changes in the Nest’s target temp and pass them on through D1 control interface to the indoor unit.
This does require HA to be up and running, but cheaply integrates the Nest into the Mitsubishi system without their adapter, and has the win of sending a true Delta-T value to the heat pump which is more effective than just 2 zones of on/off like the normal adapter does.
I’m going to have another crack at this, but use the ESP01 method. I’ve got the wiring diagram, however I would appreciate if anyone has images of there actual setup.
About to start doing this too. I see in OP that a wemos pro was used without any modification. However at post 147 it seemed a resistor from the wemos need to be removed. Is anyway to tell why some needed it cut while op does not need to?
From what I remember, the need to remove the resistor or not has to do with different versions and/or clones of the board. The ones that I used are extremely cheap clones, and it just happened that I didn’t have to modify them at all.
Ended up trying with wroom 32u for the external antenna. I tried a few wemos d1 pro but couldn’t get any to connect to my wifi.
For the wroom32, I am unable to use uart0 for the heat pump. The issue is that if I either set logger baud rate to 0 or set to uart1/2 for logger the esp would not boot. It is able to boot without including the climate component (with baid rate 0 or using uart1/2). The only way to get it to boot is to leave logger as default and use uart2 for heat pump but I am not getting any signal back from heat pump and some older post suggest only uart0 worked for heat pump on esp32.
Probably will end up just using esp01. Will report back
For folks who originally deployed theirs with the mitsubishi mqtt sketch, have any of you tried switching to the esphome driver? @grrr posted about it earlier this year: https://github.com/geoffdavis/esphome-mitsubishiheatpump
I was thinking to try it out. My boards have been very reliable the last 6 months, but needed frequent resets before that… they were randomly losing connectivity to mqtt.
I guess I’m wondering if anyone has a step-by-step to wipe the boards and reflash them for esphome I’d rather avoid disassembling all my ACs to go wired again.
I’ve just tried to use an ESP32 and have had no luck with it talking to the AC (it happily ignores it). On connecting a serial console I get ten repetitions of the text below before it goes into fallback mode waiting for new firmware. It’s timing out in the connect function and doing a watchdog reset after a couple of seconds.
Are there any special tricks to get the ESP32 to work?
Are the IO pin drivers different in the ESP32 vs the ESP8266? Or is this possibly a serial port selection bug in the drivers?
I have seen a couple of negative comments in this thread about the ESP32… has anyone at all had it working with UART2? I don’t want to butcher a perfectly good esp32s board to try and use a different UART.
Thanks!
[I][app:029]: Running through setup()...
[I][MitsubishiHeatPump:063]: ESPHome MitsubishiHeatPump version 2.4.0
[C][MitsubishiHeatPump:416]: Setting up UART...
[C][MitsubishiHeatPump:428]: Intializing new HeatPump object.
[C][MitsubishiHeatPump:455]: hw_serial(0x3ffc19c0) is &Serial(0x3ffc19f8)? NO
[C][MitsubishiHeatPump:457]: Calling hp->connect(0x3ffc19c0)
E (10265) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (10265) task_wdt: - loopTask (CPU 1)
E (10265) task_wdt: Tasks currently running:
E (10265) task_wdt: CPU 0: IDLE0
E (10265) task_wdt: CPU 1: IDLE1
E (10265) task_wdt: Aborting.
abort() was called at PC 0x401530ec on core 0
ELF file SHA256: 0000000000000000
Backtrace: 0x4008882c:0x3ffbf840 0x40088aa9:0x3ffbf860 0x401530ec:0x3ffbf880 0x40086f69:0x3ffbf8a0 0x40170c2b:0x3ffbc160 0x401549f7:0x3ffbc180 0x4008b269:0x3ffbc1a0 0x40089aba:0x3ffbc1c0
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
[I][logger:243]: Log initialized
[C][ota:461]: There have been 10 suspected unsuccessful boot attempts.
[D][esp32.preferences:114]: Saving preferences to flash...
[E][ota:468]: Boot loop detected. Proceeding to safe mode.
Marcus, I can’t help you out with ESP32 as I use the $2 ESP8266’s I mentioned earlier. I know some folks do use the ESP32s successfully, so hopefully someone else can answer. If you look at Geoff’s documentation he specifically mentions specifying a different UART on the ESP32
If it is activating the UART but not communicating, you might need to level shift from 5v to 3.3v. My boards were very forgiving and I didn’t need to do that here, but I did need to do it on the Mr. Cool in my garage.
But I can answer my own question from yesterday:
Can you go from the gysmo38 custom arduino sketch with a website directly to an ESPHome implementation managed by the official ESPHome Addon, using geoffdavis’s implementation?
Yes. Yes, you can.
From the ESPHome addon, create a new device and set up the configuration. Choose “Install”, then “Manual download” then “Modern format”
Take the bin file that gets built and log into your minisplit’s web browser and choose the “Firmware Upgrade” option and push in the bin file there, wait and watch the magic happen.
If you’re using a version of the custom sketch without the firmware upgrade option, you’re probably out of luck, time to pull out the screwdrivers and usb extension cables.
Here’s my configuration:
substitutions:
name: mrslim-reflashtest
friendly_name: Test Heatpump
esphome:
name: ${name}
esp8266:
board: d1_mini
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
encryption:
key: "privateprivateprivate"
ota:
password: "privateprivateprivate"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "${friendly_name} Fallback Hotspot"
password: !secret fallback_password
captive_portal:
climate:
- platform: mitsubishi_heatpump
name: "${friendly_name}"
# 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 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 Signal sensor.
- platform: wifi_signal
name: ${name} WiFi Signal
update_interval: 60s
external_components:
- source: github://geoffdavis/esphome-mitsubishiheatpump