Skip to content
Niklas Linz edited this page Oct 3, 2026 · 1 revision

midea-ac

Control Midea air conditioners from Java over your local network. No cloud at runtime, no dependencies, Java 17+.

Midea builds the indoor units and Wi-Fi modules for many brands, so this also works for units sold under other names. If your unit is set up through the MSmartHome, NetHome Plus or Midea Air app, it is probably supported.

The protocol code is a port of midea-local 12.1.0, the library behind Home Assistant's midea integration. Only the air conditioner part (device type 0xAC) was ported.

try (MideaAirConditioner ac = new MideaAirConditioner(cfg)) {
    AcState s = ac.refresh();
    System.out.println(s.getIndoorTemperature() + " C");

    ac.control().mode(OperatingMode.COOL).targetTemperature(23).send();
}

Where to start

New here? Go through these in order:

  1. Installation: add the library to your project
  2. Finding your unit and token: the one-time setup
  3. Connecting: configure the client
  4. Reading status and Controlling the unit

Reference

Links

Clone this wiki locally