Repository navigation
Home
Niklas Linz edited this page Oct 3, 2026
·
1 revision
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();
}New here? Go through these in order:
- Installation: add the library to your project
- Finding your unit and token: the one-time setup
- Connecting: configure the client
- Reading status and Controlling the unit
- Extra features: breezeless, louvers, self cleaning and more
- Capabilities: find out what a unit supports
- Listeners and polling: keep the state current in the background
- Error handling
- Command line tool
- How it behaves: timing, threads, optimistic state
- Protocol overview: what goes over the wire
- Troubleshooting
- Source: github.com/LinzN/midea-ac
- Builds: builds.mirranet.de/job/midea-ac
- License: MIT
midea-ac · MIT License · Protocol based on midea-local · Not affiliated with Midea