mac-zhou / midea-msmart

This is a library to allow communicating to a Midea AC via the Local area network.
MIT License
147 stars 40 forks source link

UART protocol #22

Closed dudanov closed 4 years ago

dudanov commented 4 years ago

Hi. Help is needed!

The fact is that I have an Electrolux air conditioner. Externally, the control boards are identical and many sources claim that they are manufactured in the Midea factories in China. Specifically for my model, the "USB" module is not on sale in the Russian market, although the connector is provided and declared by the supplier (sometimes it happens)... Therefore, it is not possible to carry out reverse engineering. If I knew the protocol on the UART side, I could at least try to control the device. It is necessary to help understand the relationship between the external control protocol and frames on the side of the UART interface.

Perhaps, with your help, community will get a library for controlling Midea and Electrolux air conditioners by UART interface.

I would be grateful for the help provided. Thanks.

dlobato commented 4 years ago

Hi @dudanov,

I'm implementing a protocol decoder for sigrok here: https://github.com/dlobato/sigrok-midea-serial-decoder It's far from complete, I'm slowly filling the gaps. Maybe it helps you once you connect to the uart port.

dudanov commented 4 years ago

Hi, @dlobato

Thanks for reply. I'll see and try.

I'll tell you more about my air conditioner. In my case, the WIFI dongle (which is not available for sale) is connected to the display board. It is controlled by the Sinowealth SH79F1612AM microcontroller with two UART interfaces, one of which is connected to the main control board, the other to the WIFI dongle.

UPD: UART config between mainboard is: 2400/8N1, between WIFI dongle is unknown.

How is this implemented in Midea air conditioners?

dlobato commented 4 years ago

In my case we bought the dongle (CE-SK103) as an extra to add wifi connectivity. Dongle is connected to a board as seen here: IMG_20200529_112350

The dongle has a usb connector, but actually is using the data pins as TX/RX. The UART configuration is 9600/8N1.

The decoder is based on the information found on this document: http://chipsc.com/home/views/default/resource/images/111.pdf

dudanov commented 4 years ago

Thanks for photo.

I understand that your principle is the same: the display unit has 2 UART interfaces, one (on the left in the photo) goes to the main control board, and the second to the WIFI dongle.

Have you examined the protocol between the main board and the display unit?

dudanov commented 4 years ago

It's worked! Thanks, @dlobato and community! I haven't tested the command messages yet, but I think everything will work, protocol is same! Here is also a photo of my display board and air conditioner model: Electrolux EACS/I-09HAT/N3.

01 2020-08-06 18-13-31