Full Telemetry for Midea-based Mini-Splits

TL;DR: https://github.com/fmck3516/midea-telemetry-esphome

Hi,

I started to reverse engineer the LNS protocol that is used by some Midea mini-splits (full write-up). Turns out, the data line that connects the IDU and ODU carries all kind of interesting data:

I’d like to feed this into Home Assistant, but I’d rather not deal with line voltage to capture it. My 220V units use one of the hot wires as the reference for the data line. So instead I looked at the diagnostic port on the ODU inverter board, which runs at 5V.

Unfortunately, the lines are idle when nothing’s connected to the port:

[can’t attach more than 1 image - i’ll post this image as separate response]

Once I connect the Midea inverter tester, digital signals start appearing:

[can’t attach more than 1 image - i’ll post this image as separate response]

Full write-up of what I have so far: https://medium.com/@florian.mckee/reverse-engineering-mideas-odu-diagnostic-port-af603e159053

At this point I have no idea what protocol I’m dealing with, or how to get the ODU to output data without the inverter tester attached.

Any input appreciated.

Signals when nothing is connected to the diagnostic port:

Signals when the inverter tester is connected to the diagnostic port:

The waveform the inverter tester generates when powered up but not plugged into the diagnostic port:

The waveform on the diagnostic port once I connect the inverter tester:

My current thinking: The inverter tester initiates the connection and keeps querying the ODU until it starts responding:

What I am going to try next: Capture the signals generated by the inverter tester and try to re-play them using an ESP32.

The mechanics of the protocol are now fully understood. I was also able to whip up a prototype to capture the telemetry from the diagnostic bus using an ESP32 and a level-shifter:

Arduino code and schematics: GitHub - fmck3516/midea-telemetry · GitHub

I’m now convinced that this is a reliable and safe way to capture telemetry.

Next steps: Identify the meaning of the individual bytes and their encoding and create a custom ESPHome component to feed this data into Home Assistant.

The inverter tester made it straight-forward to track down the meaning and encoding of the attributes that it supports. I now understand the protocol well enough to fully emulate the IDU / ODU query functionality.

Next step: Create an ESPHome component to feed the data into Home Assistant.

This is amazing work! Were you able to map the DC bus voltage and IPM Temp fields as well?

I haven’t mapped the bus voltage. Related: I start to wonder whether Input voltage is actually a different voltage. Since it goes way too high for a line voltage reading.

I haven’t mapped IPM temperature either since it’s not a setting that is exposed from the inverter tester.

But: Plenty of unexplored bytes left.

Also cranked out an initial version of the ESPHome dongle:

I just saw DC bus voltage and IPM temp in the inverter tester manual as listed fields. But maybe it does not expose that for all units.

Found that DC Bus Voltage is response type 0x03, byte 6, decoded as round(raw × 59 / 32 − 1) volts, for example, raw 0xA2 (162) gives 298 V.

IPM Temperature is response type 0x01, byte 4, using the same NTC thermistor conversion as the other temperature sensors.

Thanks for sharing. I’ll add both:

Do you know how the set point is mapped? The mapping I have is incorrect: Set point not mapped correctly · Issue #3 · fmck3516/midea-telemetry-esphome · GitHub

Also unsure how to map the IDU fan speed.

What unit do you have? 0x01 / byte 4 yields a constant 50C for all units I’ve tested (MR COOL 4th GEN 12K 110V, Cooper&Hunter Olivia Hyper 6K 220V):

Wondering if my units simply don’t have a sensor for it.

I have Cooper&Hunter CH-N36LCU-230VO outdoor units (same as Midea DLCLRA). Maybe different sensors.

Unfortunately I don’t know re IDU fan speed and set point as I don’t have communicating indoor units but a 3rd party AHU coil and 24v interface.

The ESPHome project works well with my unit btw!