Any Support for Midea A/C?

Still no luck with my Olimpia Splended (also not working very hard on it)

Yup, also reading Telegram :stuck_out_tongue:

Nope, that is the easiest part hehe :wink:

Since ReneKlootwijkā€™s project doesnā€™t use neither OSK102 nor OSK103 it will be irrelevant :smiley:

Wonder if anyone can provide any info on how to add newer models to any of the existing add ons

Any clue about the update with fan workaround?
I think that the problem is in the base command that triggers the fan mode, I canā€™t find the previous mentioned code with chinese comments.
Iā€™ve also tried to grab data from the android apps (Nethome Plus and Midea Air) but I canā€™t understand the query-response. It seems that there is a plain-text query to mapp.appsmb.com with: applianceId, src, format, sign, stamp, language, sessionId, funId, order. I think that the command is the latest one but I canā€™t decode/understand that and/or relate this tho the known base command.

It seemā€™s that my modified lib solves the update-fan-issue in midea-ac-lib, now Iā€™m trying to get it work in HA. here the repo https://github.com/fraschizzato/midea-ac-lib

UPDATE: moved to LAN readings with fake cloud, the midea-ac-lib modification made works on HA (to do that, Iā€™ve directly modified the py file in hass venv) but after while I start getting the unauthorized message (too many connection by hour to the cloud).

1 Like

Hi @mac_zhou , hope youā€™re doing fine!

I just realized that when I restart HASS from the web interface I get the following errors:

Oct 08 20:27:35 microserver hass[26526]: Traceback (most recent call last):
Oct 08 20:27:35 microserver hass[26526]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
Oct 08 20:27:35 microserver hass[26526]:     await self.async_device_update()
Oct 08 20:27:35 microserver hass[26526]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 469, in async_device_update
Oct 08 20:27:35 microserver hass[26526]:     await self.async_update()  # type: ignore
Oct 08 20:27:35 microserver hass[26526]:   File "/home/homeassistant/.homeassistant/custom_components/midea_ac/climate.py", line 114, in async_update
Oct 08 20:27:35 microserver hass[26526]:     await self.hass.async_add_executor_job(self._device.refresh)
Oct 08 20:27:35 microserver hass[26526]:   File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/core.py", line 350, in async_add_executor_job
Oct 08 20:27:35 microserver hass[26526]:     task = self.loop.run_in_executor(None, target, *args)
Oct 08 20:27:35 microserver hass[26526]:   File "/usr/lib/python3.8/asyncio/base_events.py", line 775, in run_in_executor
Oct 08 20:27:35 microserver hass[26526]:     executor.submit(func, *args), loop=self)
Oct 08 20:27:35 microserver hass[26526]:   File "/usr/lib/python3.8/concurrent/futures/thread.py", line 179, in submit
Oct 08 20:27:35 microserver hass[26526]:     raise RuntimeError('cannot schedule new futures after shutdown')
Oct 08 20:27:35 microserver hass[26526]: RuntimeError: cannot schedule new futures after shutdown

Do you think you can take a look on that?
Thank you.

Hi been trying to read through the 1.2 million posts here to add midea heatpump to home assistant and have a huge headache. :slight_smile:
Can someone point me to the latest and easiest way to get this working

Thanks

Hi there,

Did spend a couple of hours trying to integrate my Midea AC with Home Assistant but it seems like Iā€™m out of luck.

Iā€™m using the WiFi Pen CE-SK103 and running the midea-discover command is returning my AC unit as ā€œunsupportedā€.

INFO:msmart.cli:Midea Local Data 192.168.1.134 837000b8200f04015a5a0111a8007a80000000000000000000000000ba460000001d00000000000000000000000000003c5172d3d0a4df844ee8df64f035a7fe64e10262e80db9f1f6aa496389544fd6eca23a289a63df94c3329e3b9fec32def646686eec66b7b29f616b9c4bcbee4c55fd6e01d5cd6102e942d91d7c28c18790b13be000894715b606127e07c2fecff31443d17c3aac03a7656614ae1dca44458727958a779ee5e6fbb540f6db8302dfa542a14e63271e56d829714f7d5ba5
INFO:msmart.cli:Decrypt Reply: 192.168.1.134 8601a8c02c19000030303030303050303030303030305131353032444242354233343338303030300b6e65745f61635f333433380000000001000000040000000000ac00000000000000502dbb5b3438069fcd0300080103010000000000000000000000000000000000000000
INFO:msmart.lan:Couldn't connect with Device 192.168.1.134:6444
INFO:msmart.cli:*** Found a unsupported device - type: '0xac' - version: V3 - ip: 192.168.1.134 - port: 6444 - id: MY_ID - sn: MY_SERIAL - ssid: net_ac_3438

Still, I did install and configure the HA component found here https://github.com/mac-zhou/midea-ac-py and my unit is correctly listed on HA entities, but the AC state is wrong and sending commands donā€™t do anything.

Is there anything I can do to fix this or itā€™s simply not supported yet? Any extra information I could provide to help?

Thanks


Looks like it is finally working!
It is awaiting the pull-request into esphome
but you can already obtain it here

Thanks Mac-Zhou, ReneKlootwijk, SergeyDudanov, Fraschi for awesome collaboration.
(it already works, but development still ongoing to support more models and functions)

Iā€™ve secured all info in a new topic here:

Great, ty all for you hard work. Can you please provide some info on how to test it ?? (download the repo and add it as custom component) ?

From Fraschi:
Easyest way to use ESP home integration is (assuming python and pip already installed):

pip install --upgrade git+https://github.com/dudanov/esphome.git@midea-climate-support

esphome yamlfile.yaml run

example yaml:

# Example configuration entry

esphome:
  name: mideahvac
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "mywifissid"
  password: "mywifipassword!"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Midea-Hvac Fallback Hotspot"
    password: "53416ef6123"

captive_portal:
# Enable Home Assistant API
api:

ota:

# Disable logging over UART
logger:
  baud_rate: 0

uart:
  tx_pin: 1
  rx_pin: 3
  baud_rate: 9600

midea_dongle:

midea_ac:
  name: "Midea AC"
  beeper: true

see also:

https://easyeda.com/aceindy/midea-open-dongle

2 Likes

Thank you very much :slight_smile:

Sorry guys,
I feel I may need some more info on the development of this.
So, Iā€™m actually using the USB Wifi for my Midea-like AC (itā€™s a Giatsu but the Midea integration works with it).
I managed to get the ID of my split (splits actually, as I got two) but most of the times itā€™s offline (also in the nethome plus app).
What I want to do is to get rid of the wifi dongle itself and use a CC2531 instead (I use another CC2531 as coordinator already).
I read a user said some months ago they managed to do it. Any info about this?
The CC2531 would be an extremely cheap and available alternative (it costs around 3.5ā‚¬ at the moment).
What do you reckon?
Thanks!

https://easyeda.com/aceindy/midea-open-dongle

This uses a ESP01 dongle, over wifi;
So it doesnā€™t use cloud nor zigbee nor RF433

my ESP01 + voltage converter was a whopping ā‚¬2.38 :yum:

Hey @aceindy,
Thanks a lot for the info!

So, if I got this right, I should buy an ESP01 dongle AND a voltage converter.
Would something like this be what I need?
eap01

Or maybe you can share a link to get both items?

Thanks a lot! :slight_smile:

@kokuo81
Oh, the esp01 alone was ā‚¬2.81ā€¦sorry abt thatā€¦total was ā‚¬4.35ā€¦
ESP8266 ESP-01 WIFI Transceiver Wireless Module With Adapter Module

And you can also go fancy by ordering the pcbā€™s made by Dudanov and Klootwijk (follow links on previous posts)

@aceindy Thanks a lot!

Iā€™m very bad at components and stuff but I suppose this is the same and would work fine (the 3rd choice):


Also, how do I program it? Sorry for the questions but Iā€™m really new to all this.

Whenever you confirm me, Iā€™ll buy it :slight_smile:

Thanks again!

Hmm, I never managed to get the ESP01 into programming mode with that USB dongle;
I used this one: USB Serial Adapter CH340G 5V/3.3V USB to TTL-UART to program it.
And is how I connected it for programming:

And the AC itself doesnā€™t use USB (even though it uses an USB connector), so you cannot use the programmer adapter there either, you need the 5V/3.3V Adapter.
So mine looks like this (my A/C was both equipped with USB as well as header plug, so I could choose)
image

PS:If I understood Rene Klootwijk correctly, you can order them pre-assembled, have a look here

(I just did some reading on the USB serial port adapter, and it looks like you can use it for programming, but it requires some modifications:


Also available on YouTube

@aceindy Thanks a lot for all the info once again, hugely appreciated :slight_smile:

So, to recap a bit:

  • Since I have two AC splits, I can buy two sets of the ones I posted in my previous comment + one extra ESP8266 to use as programmer.

  • I make one ESP8266 a programmer for the ESP-01.
    I found another video explaining how to join the pins to make it a programmer (no need for a button to toggle, given the price of the board, I prefer to have an extra ESP8266 just for programming :slight_smile: ): https://www.youtube.com/watch?v=PSczkB4wYec

  • Once I have the little ā€œprogrammerā€ ESP8266 ready, I can connect it to the PC to program both ESP-01.
    What will I need to do that? What tool (Iā€™m on windows 10)? What file?

  • Once Iā€™m done programming both ESP-01, since I do have a female USB plug in the AC (something like this: https://github.com/dudanov/midea-open-dongle/raw/main/images/2.png), I understand I can plug the ESP-01 into the ESP8266 (the original one, not the ā€œprogrammerā€ one) and the ESP8266 into the female USB plug of my air conditioner.

  • At that point, I would need to configure it in Home assistant

As you can see, I still have doubts about the tool/files I need to use to program the ESP-01 and if I will indeed have to plug the whole thing (ESP-01+ESP8266) to the AC female USB plug.

Thank you once again for your patience and time (I will write a guide in ES and IT once everything is working fine on my end, I promise).

EDIT:
Iā€™ve been reading the ESPHome guide and, if I got it right, that should actually answer my questions from above:

  1. The tool to flash the ESP-01 is, in my case, the ESPHome plugin in Home Assistant itself.
  2. What to flash in the ESP-01 comes directly from the configuration I use in ESPHome, that is basically pushed to the plugged USB by selecting the Upload option in the WebUI.

Am I right?

Thanks!

1 Like

Ermā€¦

Yes,
2 x ESP8266 Serial Wi-Fi Wireless ESP-01 Adapter Module 3.3V 5V
2 x ESP8266 ESP-01 Remote Serial Port (with the earlier posted modification for programming)
1 x ESP01 Programmer Adapter UART

Normally ā€˜programmingā€™ would be done from the ESPHome add-on


But unfortunately, the MideaAC pull request did not make it into the main git repository yet.
So until it makes it into the ESPHome addon, youā€™ll have to compile the required binaries manually (I also used W10) and flash it on the com-port assigned to ESP8266 ESP-01 Remote Serial Port
An example of the configuration yaml you find here.

cd c:\workshop\esphome

pip install esphome
pip install esphomeflasher
pip install --upgrade git+https://github.com/dudanov/esphome.git@midea-climate-support

esphome mideahvac.yaml wizard
esphome mideahvac.yaml compile

esphomeflasher

using the compiled C:\_workshop\esphome\mideahvac\.pioenvs\mideahvac\firmware.bin

image

Assuming you already installed python :wink:

1 Like

@kokuo81 do not use the usb male plug of the 8266, but use the voltage converter 3.3/5vā€¦
(remember, the ac uses a usb connector, but is is not using the usb standard :thinking:)