Midea Smart Home

Local control for Midea appliances, with the Meiju cloud as a fallback rather than a requirement. This guide installs the custom integration, adds the first appliance, and explains what each connection badge, entity and statistic actually means.

Devices 38 families Path Settings → Devices & services Install Marketplace or manual Core 2026.11.1

00Three steps

The whole install, if nothing goes wrong.

Step 1
Install it from the Marketplace, or copy the component folder into custom_components by hand.
Step 2
Restart Core.
Step 3
Go to Settings → Devices & services → Add integration, pick Midea Smart Home, sign in with Meiju, scan and tick the appliances.
The account is not optional for local control

Even in LAN-only mode the flow asks for the Meiju account. That is how it obtains the device list, the token/key used by V3 encryption, and the Lua protocol file. After setup, control traffic stays on the LAN; the account is not used as a relay.

01How it connects

One integration, three channels. Setup probes them in a fixed order and records the winner in the config entry.

ChannelState comes fromControl goes throughUsed when
☁️ Cloud V2 Meiju Thing Model V2 polling Cloud property writes The appliance is not on the LAN, or its local protocol is unsupported
🖥️ LAN Device push + periodic polling Direct TCP to the appliance Preferred: lowest latency, works without internet
☁️ Cloud V1 Meiju Lua state query Meiju Lua control API Last resort when both above fail

The probe order is Cloud V2 → LAN → Cloud V1. The chosen channel is written into the config entry and shown as a badge next to the model on the device page, so you can tell at a glance whether a device is being polled locally or through the cloud. Cloud-only appliances exist: the smart fish tank 0x58 is Cloud V2 only and has no local TCP control.

LAN does not mean “no cloud at all”

Cloud is used at setup time and for the optional statistics sensors. Day-to-day switch, climate and sensor traffic for a LAN device goes straight to the appliance over TCP — port 6444 by default.

02Before you start

  • Home Assistant 2025.12.4 or newer. That is the integration's stated requirement; this box runs Core 2026.11.1 on HAOS 19.0.dev0.
  • A Meiju (美的美居) account with the appliances already bound in the phone app. The integration reads the same account; it does not pair appliances itself.
  • Same L2 network. Discovery uses a broadcast; HA and the appliances must be on the same subnet unless you scan by IP (see below).
  • An owner/admin account in Home Assistant. Adding an integration is an admin action.
  • Internet access from Home Assistant for the first setup: Python requirements (lupa, pycryptodome) install from PyPI, and the Meiju API is used for login and token retrieval.
  • A GitHub account only for the Marketplace route. The manual route needs no GitHub login, but it does need a way into /config — Samba, File editor, or SSH.

03Install

Two routes to the same folder: the native Marketplace, or a manual copy for when a GitHub device code is not available.

Method A: Marketplace (recommended)

  1. Open Settings → Marketplace Go to Settings → Marketplace. This is the built-in community store in 2026.11; it is not under Devices & services. Search for Midea.
    Marketplace browse page filtered on Midea, listing Midea AC LAN, Midea Ac Py, Midea Auto Cloud and others
    Live capture · Settings → Marketplace, filtered on Midea. The catalog has several Midea integrations, but not Cyborg2017/midea_smart_home
  2. Add the repository from its GitHub link This repository is not in the catalog, so use Add from link in the top right and paste https://github.com/Cyborg2017/midea_smart_home, then choose Add.
    Add from a GitHub link dialog with the Midea Smart Home repository URL filled in
    Live capture · Add from a GitHub link, the route for a repository that is not in the catalog
  3. Connect GitHub when asked Adding a repository needs a GitHub connection. Home Assistant shows a URL and a one-time code: open the URL, enter the code, and the flow continues on its own. No GitHub password is entered in Home Assistant, and the connection can be revoked later in GitHub.
  4. Install, then restart Install the repository in the Marketplace. It writes the integration into custom_components and leaves a restart required repair; restart Core to finish. The integration does not appear in Add integration until that restart.

Method B: manual copy (no GitHub device code)

Use this when the customer has no GitHub account, cannot complete the device-code step, or needs a specific branch or tag. The repository is public, so the ZIP downloads in a browser without signing in.

  1. Get the component folder Download the repository ZIP from GitHub and unzip it — the folder you need is custom_components/midea_smart_home. The release page also publishes a midea_smart_home.zip asset. This box was installed from feat/cloud-hybrid 26.11.1; a release ZIP gives the current version.
  2. Put it inside custom_components On HAOS the config folder is exposed in three ways: the Samba share config, the File editor add-on, or SSH. Drop midea_smart_home into custom_components/. Over SSH from a workstation:
    # from the unzipped repository root; create the parent if it does not exist yet
    scp -r custom_components/midea_smart_home \
      root@<HA-IP>:/mnt/data/supervisor/homeassistant/custom_components/

    The host path /mnt/data/supervisor/homeassistant/ is the Core container's /config; Samba and File editor show the same folder as /config.

  3. Restart Core Use Settings → System → Restart, or from an SSH session:
    ha core restart
  4. Confirm the layout The only path that matters is custom_components/midea_smart_home/manifest.json. If that file is one level deeper, the integration will not load.
Copy the component, not the repository

The destination must be custom_components/midea_smart_home/manifest.json. A common mistake is copying the whole cloned repository, which produces custom_components/midea_smart_home/midea_smart_home/… and a “cannot find integration” error.

Manual copies are not tracked by the Marketplace. To update one, replace the folder with a newer ZIP and restart.

Check that Home Assistant found it

Open Settings → Devices & services → Add integration and search for Midea. The custom integration is listed as Midea Smart Home with a puzzle-piece icon (the other, plain “Midea” entry is a different, built-in integration).

Settings, Devices and services page with the Add integration button in the bottom right
Live capture · Settings → Devices & services. Add integration is bottom right; the discovered cards are other devices on this LAN
Add integration dialog filtered on Midea, showing Midea Smart Home with a puzzle icon
Live capture · the integration is installed when it appears in the brand list. The puzzle icon marks a custom component
The first click can take a minute

The config flow imports lupa, which Home Assistant installs the first time the flow starts. On this box that meant a “Starting the Midea Smart Home configuration wizard” spinner for roughly two minutes while lupa 2.8 downloaded. Later attempts are instant.

04Add devices

The integration offers three entry modes. Hybrid is the right default; the other two exist for a reason.

Midea Smart Home setup dialog with LAN, hybrid and manual options
Live capture · three ways in. LAN probes only locally, hybrid probes cloud then LAN, manual skips the account entirely

Hybrid mode (recommended)

  1. Open the sign-in form In Settings → Devices & services, choose Add integration, search Midea Smart Home, then pick ☁️ Hybrid Mode.
  2. Enter the Meiju account and scan settings Same phone number or email as the Meiju app. Scan Address defaults to auto; Scan Mode defaults to Broadcast. Leave both alone for a normal flat LAN.
    Hybrid mode form with Meiju account, password, scan address and scan mode
    Live capture · hybrid sign-in. The password is only used to obtain tokens and the device list
  3. Let it scan, then pick appliances After login the flow probes every appliance and prefilters the ones already configured. The picker lists each candidate with its type and protocol, and starts with all of them ticked.
  4. Let it fetch token and key V3 devices are encrypted with a per-device token and key. The flow retrieves them from the Meiju API while it adds the appliance. V1/V2 devices skip this step.
  5. Finish The config entry is named Midea | {account} | {home name}. The appliances appear as devices, with their entities grouped underneath.
Scan AddressWhat it doesWhen to use it
autoDetects the interface and scans its subnetDefault; flat LAN
Router IP, e.g. 192.168.3.1Scans the whole /24Broadcast is filtered or devices are on Wi-Fi
Device IP, e.g. 192.168.3.153Probes a single applianceOne stubborn device; also the fastest retry

Broadcast is quick but relies on the appliance answering a UDP broadcast. If the list is repeatedly incomplete, switch Scan Mode to Unicast and expect the scan to take longer.

LAN mode

The same form and the same account, but only the local probe runs: no Cloud V2, no Cloud V1 fallback. Choose it when you want to be certain that nothing is added through the cloud and are willing to lose the appliances that only speak cloud.

Manual mode (no account)

Manual mode never logs in. It scans the LAN for the device ID, IP, type and protocol, then asks you for the missing pieces: token, key and the full path to the Lua protocol file. Useful for an isolated network, for a device already documented elsewhere, or when the Meiju account cannot be used.

Manual add device scan form with scan address and scan mode
Live capture · manual mode starts with the same LAN scan, without any cloud login
Manual add device dialog reporting two devices found
Live capture · the broadcast found both appliances; already-added IDs are filtered out
Device selection list with a range hood and a clothes dryer, both V3
Live capture · the manual picker, pre-ticked. The two V3 appliances on this LAN: range hood 0xB6 and clothes dryer 0xDC
Manual device form prefilled with device ID, IP, port, type and protocol V3
Live capture · manual device form. ID, IP, port, type and protocol are prefilled; token/key and the Lua path are on you
“⏳ Pending support”

Some appliances answer locally but have no entity mapping yet. They are added over LAN and tagged ⏳ Pending support in the device list instead of falling back to Cloud V1. The repository's docs/guides/AI_DEVICE_GUIDE.md explains how to collect diagnostics and contribute a mapping.

05Entities and badges

What a device turns into, and how to read the channel it is using.

The integration ships these platforms. Which of them a given appliance exposes depends on its mapping:

binary_sensor button climate cover fan humidifier light lock number select sensor switch text time update vacuum water_heater

BadgeMeaningLatency / dependency
🖥️ LanDirect TCP to the appliance; state pushed by the device, plus polling where the protocol needs itFastest; works if the internet is down
☁️ Cloud V2Thing Model properties through MeijuPolling interval; needs the cloud
☁️ Cloud V1Lua state through MeijuPolling interval; needs the cloud
⏳ Pending supportLAN reachable, no mapping yetEntities are limited until a mapping lands

The badge follows the model name on the device page. A twin-drum washer (0xD9) is a special case: its two drums are polled alternately, which is why it has its own polling interval in the options. The full 38-family matrix is maintained in the upstream README; the common ones are lights and fan lights, curtains, air conditioners, washers and dryers, dishwashers, water heaters, hoods, ovens, fridges and robot vacuums.

EntityWhat it is for
updateIntegration version check against GitHub Releases; can download and install from inside HA
sensorState, plus the cloud statistics sensors described below
climate, water_heaterAir conditioners, heat pumps, gas and electric water heaters
vacuum, lock, coverRobot vacuums, smart locks, curtains and drying racks

06Cloud statistics

Separate from live state, and available for both LAN and cloud devices.

The integration creates additional sensor entities from the Meiju statistics API. They refresh on their own schedule (default: every 6 hours) and are not driven by the device's live connection. Only the appliance families below expose them:

CodeApplianceMetricsUnit
0xB6Range hoodFan / oil cup / filter cleanliness%
0xACAir conditionerYesterday / month / year energykWh
0xDBFront-load washerToday / week / month energy and waterkWh, L
0xE1DishwasherToday / week / month / year energy and waterkWh, L
0xE3Gas water heaterToday / month water and gasL, m³
Settlement lag is normal

The numbers are calculated by Meiju, not by Home Assistant. Some values only appear after the cloud settles the day, which is why air conditioners report yesterday's energy rather than today's. A hood exposes cleanliness only — the cloud has no energy API for that family.

07Options

Open the integration entry → Configure. Everything below lives there.

OptionWhat it does
Add device (LAN / auto / manual)Adds more appliances later. LAN scans locally, auto logs in and probes in priority order, manual takes the details by hand.
Update accountChanges the Meiju credentials and re-reads the device list.
Sync cloudRefreshes names, rooms and model numbers from Meiju, then reloads the entry.
Backup configurationExports the integration config and device mappings.
Fetch diagnosticsDownloads a diagnostics file for an issue report.
Clear cacheRemoves the Lua and JSON caches; they are downloaded again. Current files are backed up to .storage/midea_smart_home-backup.
Configure pollingPer-device intervals: local polling (off, 1–30 s), cloud query (3–30 s), and the 0xD9 twin-drum interval (1–5 s).
Configure notificationsWhether to send a persistent notification when an appliance goes offline or comes back.
Configure update checkOff / 12 h / 24 h GitHub release check. A check also runs on every restart regardless of this setting.
Clear cache is not “reset everything”

It removes downloaded protocol files, not the config entry. If you are chasing a broken entry, delete the entry and add it again — then clear the cache if you also want a fresh Lua download.

08Verify

Three checks that separate “installed” from “working”.

CheckWhereExpected
Entry existsSettings → Devices & servicesMidea Smart Home entry named Midea | …, no “Failed setup” badge
Channel is correctDevice page → model line🖥️ Lan for a same-subnet appliance; ☁️ if it only speaks cloud
State movesDevice page or OverviewToggling a switch or changing a setpoint is reflected within the polling interval
No import errorsSettings → System → LogsNo No module named 'lupa', no repeated reconnect tracebacks

To see the integration's own reasoning, raise its log level:

logger:
  default: warning
  logs:
    custom_components.midea_smart_home: debug

Log lines carry a module prefix ([cloud], [device], [coord], [config_flow]) and, for device traffic, the appliance name in brackets — filter on those rather than scrolling the whole file.

09Troubleshooting

Match the symptom. Most failures are network reachability, not the integration.

SymptomLikely causeFix
No appliances found Broadcast blocked, different subnet, appliance powered off or not bound to the account Set Scan Address to the router IP or the appliance IP; switch to Unicast; confirm the device is in the Meiju app and on the same VLAN
V3 token/key comes back empty Meiju API unreachable from HA From the HA container, resolve and reach mapp.appsmb.com; check DNS and outbound 443, then retry the flow
Device is V2 0x0110 and “TCP communication is not supported” The newer V2 broadcast carries no usable local control Use hybrid mode so the appliance is added as Cloud V2; do not force LAN
“Add integration” spins and then errors lupa could not install (PyPI/DNS) Check Settings → System → Logs for uv pip install; fix DNS or retry when the network is back. The component stays installed
Added, then offline DHCP handed the appliance a new IP, or port 6444 is filtered Pin a lease/static IP for the appliance; verify nc -z <ip> 6444 from the HA host
Duplicate or ghost devices An earlier entry still holds the same device ID Remove the old config entry, run Clear cache, then add again
Cloud statistics stay empty The model has no statistics API, or the day has not settled yet Wait for the 6-hour refresh; confirm the appliance family is in the table above
No “Midea Smart Home” in the add dialog Folder nesting, wrong Core version, or Home Assistant not restarted Confirm /config/custom_components/midea_smart_home/manifest.json exists; restart Core; check the startup warning line
Report with the right material

Before opening an issue, use Fetch diagnostics in the options, then attach the file plus a log excerpt covering the same timestamp. Strip tokens, keys, account names and LAN IPs before posting publicly.

10References