Midea branded AC’s with ESPhome (no cloud)

I’ll do that soon.

Something weird… so
You know how the waveform looks like this when monitoring the factory, included dongle?

Well… when I send the same hex 0x01, 0x04, 0x02, 0x01 the waveform looks like this
image

It doesn’t have the start or end parts of the waveform…

This is my command uart.write: [0x01, 0x04, 0x02, 0x01]

Apologies, I’m a bit new to reverse engineering UART

The factory stick sends (as reported by UART logs via Esphome) BB, 00 MESSAGE 00 BD.

I bet if I figure out what BB, 00 ---- 00 BD is, I’ll get a response from the mini split board.

This is my UART config, am I missing anything?

uart:  id: my_uart  
tx_pin:    
    number: GPIO1  
rx_pin:    
    number: GPIO3  
baud_rate: 9600  
debug:    dummy_receiver: true   
  after:      delimiter: "\n"

That looks inverted? Do you have the logger enabled? It uses UART0 (1,3) by default and may be conflicting.
There is an “inverted” option that can be set but I don’t know enough about this to know if its active low by default.

Hello everyone…

Its a while since i gave up on the follow me over esp8266 as it was said in this thread…
Soldered an extra cable to a useable pin on the esp but as soon i conect it, the unit freezes…
Does anyone know any more meanwhile?
Can a leg of the esp just be connected to the ir receiver or is there any logic in between needed?
Unfortunate the board from this gentleman is not for sale anymore…
Did anyone get follow me working meanwhile via signal to ir receiver?

Thx alot for any idea…

Oh by the way…do the midea mini spkit give any of these here shown power infos out or is that just for different heatpump units?

Figured it out, thanks to a friendly person on reddit!
https://www.reddit.com/r/AskElectronics/comments/13e3lcw/im_receiving_and_sending_the_same_exact_hex_over/?utm_source=share&utm_medium=web2x&context=3

So, the heartbeat is 0xBB, 0x00, 0x01, 0x04, 0x02, 0x01, 0x00, 0xBD at 9600 baud, even parity. When sending, I get a status message, which we already know is 0xBB, 0x00, 0x01, 0x4, 0x37, 0x4, 0x0, 0x31, 0x97, 0x0, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x69, 0x3, 0x88, 0x0, 0x0, 0x0, 0xBD

I found exactly one web result with the heartbeat message:

“In the current industrial control or household equipment communication projects, many serial port or serial-like communication protocols are used, many of which require reading operations. In order to prevent blocking, improve processing performance, and shorten processing time during reading, the select function is often used. To read serial data, select is a magic tool for linux. It can monitor a certain file or device, and it can be processed when there is a buffer. In order to try different lengths of different protocols, such as heartbeat packets and data packets, the processing is different. A more appropriate way is to read bit by bit. When it is the header of the heartbeat packet, read the next heartbeat packet and process the heartbeat. When it is a data packet, read the next data packet and process the data packet. The following is a serial port reading case”

Logic analyzer gets here soon.

Does any of this look like expected Midea communication protocol or is it something completely different?
This is my dongle, it does NOT seem to be a OSK103

Someone seems to have done some work on it!

For any future readers, the Pioneer WYT units use a different dongle and protocol. Using the Tuya MCU and Midea libraries currently available do not work. Work will be put into an alternate integration

For those who have a unit with XYE connection (RS485), I have merged together the work of @Bunicutz (posted above) and @dudanov (midea component) to create a native climate component that works with various ESP boards.

So far basic commands are working (mode, fan, set temp), and can read back temperatures both inside and outside. More reverse engineering is required to get full functionality. I kept the IR stuff to enable “follow me” and display on/off but haven’t tested it yet.

Code is here, including an example YAML config you can use to test it out: esphome/esphome/components/midea_xye at dev · exciton/esphome · GitHub

4 Likes

Hello everyone…

Its a while since i gave up on the follow me over esp8266 as it was said in this thread…
Soldered an extra cable to a useable pin on the esp but as soon i conect it, the unit freezes…
Does anyone know any more meanwhile?
Can a leg of the esp just be connected to the ir receiver or is there any logic in between needed?
Unfortunate the board from this gentleman is not for sale anymore…
Did anyone get follow me working meanwhile via signal to ir receiver?

Thx alot for any idea…

Oh by the way…do the midea mini split give any of these here shown power infos out or is that just for different heatpump units?

Oh and another question…instead of getting follow me working…could it not be done that the units shown value gets overwritten with an in room temp value from lets say the ble China temperature probes?


Hello,
how to connect this board to Home Assistant with this:
https://www.aliexpress.com/item/4000814189272.html?spm=a2g0o.order_list.order_list_main.5.35491802TbA0O6

I only see GND and +5V on CN3 port wich is RX and TX?

Just to add to the list, I have the Midea MAW10V1QWT and it works with the Smartlight dongle. This is probably just a different HP version of another already listed. It reports the outside temperature as the temperature sensor, and the indoor temperature is an attribute (current_temperature) of the climate entity. It also reports humidity and power sensors, but these seem incorrect and stuck at zero.

I use Modbus with elfin ew11. I connect the device to the Midea M-Thermal clone kjr-120 HMI. I’ve been using it this way for over a year. But the Hacs-Midea AC lan integration also runs alongside it as a check.

TL;DR: My GET_POWERUSAGE(0x41) information is in bytes 8,7,6 after the C1 byte. Is it possible to do a yaml config to set up a sensor?

Issue: So I configured the DIY dongle and it works pretty well. The only issue is that it recognises the power feature (Power consumption), but this shows as 0 in the sensor. I dug a little bit in @dudanov’s ESPhome code and UART library, and discovered that the method GET_POWERUSAGE(0x41) returns the data with this info, in the positions 16, 17, and 18. Checking a bit my logs it seems like, in my case, this information is in the bytes 6,7,8. For example, below is a result of a GET_POWERUSAGE(0x41) response:

RX: AA 1F AC 00 00 00 00 00 03 03 C1 21 01 44 00 03 71 65 00 00 00 00 00 00 00 00 00 00 00 00 72 BD

The 03 71 65 in bytes 6 to 8 after C1 is the accumulated power consumption in watts-hour, with two significance digits. Hence, my AC has consumed so far 371.65 Kwh. I checked this by registering the consumption over night and noticing that is has increased.

I’m new to programming on the home assistant and it seems a bit complicated to meddle with the original ESPhome code. So I was wondering if reading the logger results (like the one with the RX in the example above) is possible in order to create a simple sensor that shows the total energy consumption.

Thanks guys!

cc @netsplit64 @witchof0x20 @dudanov

I have a strong suspicion that Follow Me feature is possible over the wire without IR, because all the wired controllers for Midea / Carrier / CH / Lennox have this feature. Just ordered one on the eBay in hopes to confirm if it actually works and learn how to reverse engineer.

You should join on Telegram:wink:
@shimonenator they have tried, but as far as i know it won’t work (as it is the remote that sends the temperature to the ac)

@matija84 I think you have the same issue I had with the usb board missing. See my post Midea branded AC’s with ESPhome (without cloud) - #736 by best to see if it applies to you.

From the first looks at the device is seems that it plugs into the XYE port after all, and does not replace the WiFi dongle. I was hoping for the later.

Hello, I installed a Heat Pumpe last Oktober. Now I really interested in your board and current configuration. I only see the data on the little board or MSmartHome. I’d like to hear from you. Achim

Hey, are you still working on the project? I’m thinking about purchasing a Midea heat pump but before I do I want to make 100% sure I can read out all kinds of data and I will be able to control it externally as I never trust such a device when the behaviour is not exactly predictable.

Depends what midea heatpump/ac u r actually aming for…

Hi Achim,

See GitHub - Mosibi/Midea-heat-pump-ESPHome for the most recent config. This week the first round of boards have arrived and we will soon start with the tests. Our prototype board is still in use and the results are very good, so we do not expect (big) issues.

You could have have a look at the project I am working on.