Midea Mini Split Wifi Support

Subscribing, in case someone posts a solution that uses the Midea controller bus and not the wifi/cloud USB dongle that doesn't work with my particular unit.....

3 Likes

I just want to chime in with my support for this project. I recently installed a Pioneer Mini Split & have the WiFi USB dongle setup. Problem is that I’m on a particularly horrible HughesNet satellite connection (cloud connections suck for everything on my system) & would love to automate with Hubitat. I have been able to get the mac-zhou app up and running on HA, so at least I have a little bit of extra local control over the midea, but the MQTT app written by @kevin that I had used as a go-between for HE & HA in the past isn’t yet working for thermostats & climate devices.

I now know local commutation is possible, so I’m hopeful that someone will come through for those of us with midea’s. Can’t wait to be able to automate my home’s heat & AC with the rest of my system.

2 Likes

I'm trying to put something together for Hubitat based on the mac-zhou projects.

It's sort of slow-going, because the data encoding and encryption are complicated and I don't have a midea device to test with. Will keep you all posted with anything I get to a point of being worth sharing.

2 Likes

This is amazing! Thank you so much for the effort. I’ll be happy to provide any testing support & feedback that I can.

3 Likes

Also subscribing to this thread

I posted my Hubitat driver integration for Midea AC units here:

I also listed it in my HPM repo.

This one was really challenging and fun to put together. Thanks to @etienne and @ghgeiger for all of the help with testing and debugging.

This driver uses the Hubitat raw socket interface, which has some unique quirks and challenges. Please post in this thread if you have any issues or requested improvements.

FYI @jasonp9

10 Likes

Can confirm that this driver is working great on my Pioneer Inverter++ mini split.

Huge thanks to @tomw who did the heavy lifting & ported this code into a functional Hubitat driver without even owning a unit to test on, and also a huge thanks to @etienne for initiating this thread and providing their testing! I'm so happy to be able to automate my heat and AC now!

Just in case there are others out there who don't even know that they own a Midea AC, here's a bigger list of brands that re-brand Midea units under their own name:

Hualing, Senville, Klimaire, AirCon, Century, Pridiom, Thermocore, Comfee, Alpine Home Air, Artel, Beko, Electrolux, Galactic, Idea, Inventor, Kaisai, Mitsui, Mr. Cool, Neoclima, Olimpia Splendid, Pioneer, QLIMA, Royal Clima, Qzen, Toshiba, Carrier, Goodman, Friedrich, Samsung, Kenmore, Trane, Lennox, LG and much more
(quoted from mac-zhou's github for midea-ac-py, an integration for Home Assistant)

2 Likes

What kind of device connects to the controller bus, @vreihen?

FWIW, @vreihen, and you may have already seen this, but on the following thread there is discussion of the hardware involved to bypass the USB slot. It involves an ESP01 and a voltage converter, and iirc towards the end of the thread someone was selling extra builds. There's an integration for HA that is linked in the thread for that hardware.

This might work for you if there's a way to tap into similar circuitry & if so, maybe someone can port this driver to work with that setup.

P.S. this is the thread that originally got me interested in local control on the HE, as this is where the local midea integration into HA, that @tomw used to make the HE driver, was originally posted.

ETA (because the link didn't line up quite right): There's a pretty good discussion of this harware around post 358, but it's worth scouring the entire thread for details.

2 Likes

I am clueless here about this step.

Follow the instructions on this page to install and execute the midea-discover utility:

Ok, I go that link, and then what? I don't get what I am supposed to download, run, or whatever? I don't see a file or anything to download? I have to be totally missing something here...

And edit to say, I am not trying to do this through Hubitat, I was looking for something to run on my desktop.

What kind of computer are you running it on? You need something that can run Python. Linux is most familiar to me. I ran it on a Raspberry Pi.

You need Python 3. It's likely installed by default if you are on Linux. Then you may need to install pip3. This is a useful reference for that: https://www.linuxscrew.com/install-pip

Once you have pip3 running, the two command line steps in your screenshot under How to Use are next. Then you go back to my instructions from there.

I just want to add that this was the sticking point for me as well. I also ran it on an RPI, but python 3 was not installed by default on my Raspberry Pi OS distro. I think that this should be an environment you can install on any OS & once you get that installed, you can use pip3. pip3 is a python software distribution & installation tool. With the commands on the midea-msmart page, it will install the msmart package. and once msmart is installed, you can run midea-discover.

Luckily this is a one time deal, you only need this to get the required information to enter into the driver.

I think Midea calls them the XYE terminals. There are several options (don't look at the prices!) to convert XYE to various hospitality/commercial building controller busses:

https://www.intesis.com/products/ac-interfaces/midea-gateways/midea-ac-brand-solution

https://orient-hvac.com/product/Modbus-BMS-gateway-CCM-18A.html

At least from the descriptions, this seems like a more universal way to interface to the AC unit. Price of these interfaces is a different story...although it doesn't seem like something that can't be done with an ESP32 and some circuit breadboarding.

My unit is a Pioneer RYB series ducted, which is their mini-split ductless hardware mounted in a small air handler. It comes with a wall-mounted thermostat, as well as a separate temperature/status/IR receiver display that looks like it was intended to be installed in an indoor ductless unit. Pioneer's tech support said the only remote control option is IR, and that there is no internal USB port for the wifi module.

Midea's model number for this unit is DLFSD, and their web site is claiming that they now have a wifi module for their version that includes hardware to add the missing USB port:

https://www.shareddocs.com/hvac/docs/1009/Public/00/IM-KSAIF04-02.pdf

I'll have to investigate this further, although I still think that (price aside for the current commercial offerings) interfacing to the unit's bus is the better option and obviously keeps everything local.....

Thanks for getting this together!!!

I’m a super novice when it comes to RPi.

This is what I’m getting when I run it. I’m sure I’m missing something.

1 Like

Mine looks slightly different (with a couple of extra dependencies, which seems weird):

pi@pibeacon:~ $ sudo pip3 install msmart
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: msmart in /usr/local/lib/python3.7/dist-packages/msmart-0.1.35-py3.7.egg (0.1.35)
Requirement already satisfied: click in /usr/local/lib/python3.7/dist-packages/click-8.0.1-py3.7.egg (from msmart) (8.0.1)
Requirement already satisfied: ifaddr in /usr/local/lib/python3.7/dist-packages/ifaddr-0.1.7-py3.7.egg (from msmart) (0.1.7)
Requirement already satisfied: pycryptodome in /usr/local/lib/python3.7/dist-packages/pycryptodome-3.10.1-py3.7-linux-armv6l.egg (from msmart) (3.10.1)
Requirement already satisfied: pycryptodomex in /usr/local/lib/python3.7/dist-packages/pycryptodomex-3.10.1-py3.7-linux-armv6l.egg (from msmart) (3.10.1)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from msmart) (2.21.0)
Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.7/dist-packages/importlib_metadata-4.8.1-py3.7.egg (from click->msmart) (4.8.1)
Requirement already satisfied: typing-extensions>=3.6.4 in /usr/local/lib/python3.7/dist-packages/typing_extensions-3.10.0.2-py3.7.egg (from importlib-metadata->click->msmart) (3.10.0.2)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages/zipp-3.5.0-py3.7.egg (from importlib-metadata->click->msmart) (3.5.0)
pi@pibeacon:~ $ sudo midea-discover
INFO:msmart.cli:msmart version: 0.1.35 Currently only supports ac devices.
INFO:msmart.cli:Sending Device Scan Broadcast...

@ghgeiger or @etienne, do you have any ideas on what may be going wrong here?

I'm not exactly sure of your problem, but I had issues with the msmart install because of a bad internet connection. While it looked like it installed properly, I had to give it another try or two with pip3 to get it successfully installed.

Two other thoughts, It's been a few weeks, so I cant remember for sure, but I think I needed to reboot prior to running midea-discover. The only other thing I can think of is that the directory that pip installs software is not in your $PATH (it's possible that the $PATH for python doesn't get added until a reboot). I don't know enough about python or pip to guide you, but if a reboot and/or a reinstall doesn't help, there should be instructions out there to get that done.

1 Like

Looking back at my bash history, I see a line for sudo pip3 install --upgrade setuptools followed by a reboot, followed by what looked to be a successful run of midea-discover. I don't recall where I got the info to upgrade the setuptools, but if a reboot doesn't work, maybe try that?

I'm going to try the whole process over again on a different rpi & see if I can provide any more insight.

1 Like

@jasonp9 @tomw
OK, I had some success on my end and it seemed that it was due to the PATH, and a reboot resolved it.

The first rpi i installed this on was the 'lite' version of buster, and I had to install the python environment myself. I just retried on the desktop version of buster & python was already installed. pip3 succesfully installed msmart on the first try, but with the warning seen here:

midea-discover did not run until after a reboot, I assume that python added the proper $PATH entry during reboot, because midea-discover ran on the first try afterwards.

I don’t see that error in your output, but give a reboot a try & see if it works.

2 Likes

The reboot did it. Thanks!

2 Likes

Working Great @tomw ! Going to work on somehow integrating it with my thermostat to go on when my thermostat is set to cool and hopefully have the temp mirror the thermostat as well. Thanks again!

2 Likes