Skip to content

Home Assistant custom integration to control Midea (and associated brands) air conditioners via LAN.

License

Notifications You must be signed in to change notification settings

mill1000/midea-ac-py

 
 

Repository files navigation

Midea Smart AC

Code Quality Checks Validate with hassfest HACS Action hacs_badge

Home Assistant custom integration to control Midea (and associated brands) air conditioners via LAN.

Midea is an OEM for many brands including: AirCon, Alpine Home Air, Artel, Beko, Canair, Carrier, Century, Comfee, Electrolux, Friedrich, Galactic, Goodman, Hualing, Idea, Inventor, Kaisai, Kenmore, Klimaire, Lennox, LG, Mitsui, Mr. Cool, Neoclima, Olimpia Splendid, Pioneer, Pridiom, QLIMA, Qzen, Rotenso, Royal Clima, Samsung, Senville, Thermocore, Toshiba, Trane and more.

A device is likely supported if it uses one of the following Android apps or it's iOS equivalent.

  • Artic King (com.arcticking.ac)
  • Midea Air (com.midea.aircondition.obm)
  • NetHome Plus (com.midea.aircondition)
  • SmartHome/MSmartHome (com.midea.ai.overseas)
  • Toshiba AC NA (com.midea.toshiba)
  • 美的美居 (com.midea.ai.appliances)

Note: Only air conditioner devices (type 0xAC and 0xCC) are supported.

See Getting Device Info to determine if a device is supported.

Note On Cloud Usage

This integration works locally. No internet connection is required to control your device.

However, for newer "V3" devices, the Midea Cloud is used to acquire a token & key during device discovery. Once configured, the token & key are saved and no further cloud connection is required. Devices are not linked to the built-in accounts. Concerned users may manually configure their devices by acquiring a token & key with their own account credentials via the msmart-ng CLI.

General Features

  • Automatic device discovery and configuration via the GUI.
  • Device capability detection. Only supported functions are displayed.
  • Minimum and maximum target temperatures provided by the device.

Device 0xAC Features

  • Support for sleep, eco, boost (turbo), and away (freeze protection) presets.
  • Switch for device display1.
  • Device error codes as an attribute.
  • Selectable data format and scale for energy and power sensors.2
  • Advanced controls (when supported by the device):
    • Purifier (Ionizer/UV/Sterilizer)
    • Device filter alert
    • Custom fan speeds
    • Service to enable the "Follow Me" function3
    • Swing angle (fan position)
    • Indoor humidity sensor
    • Target humidity in Dry mode
    • Start and monitor self-cleaning
    • Rate selection (Gear mode)
    • "Breeze" modes (e.g., breeze away, breeze mild, breezeless)
    • iECO
    • Auxiliary heating mode
    • Flash/jet cool
    • Cascade
  1. Device dependent. Some devices only support display control via IR.
  2. Sensors must be manually enabled on the device page. A device may not support all energy sensors.
  3. Experimental. "Follow Me" requires the IR remote to transmit temperature data. More info here.

Device 0xCC Features

  • Support for eco, silent, and sleep presets.
  • Advanced controls (when supported by the device):
    • Purifier (Ionizer/UV/Sterilizer)
    • Swing angle (fan position)
    • Indoor humidity sensor
    • Target humidity in Dry mode
    • Auxiliary heating mode

Translations

Thanks to the community the integration is available in the following languages.

  • български
  • Català
  • Čeština
  • 简体中文
  • 繁體中文
  • Deutsch
  • English
  • Español
  • Euskara
  • Français
  • Hrvatski
  • Italiano
  • 한국어
  • Magyar
  • Nederlands
  • Norsk (bokmål)
  • Polski
  • Português
  • Română
  • Pусский
  • Slovenčina
  • Slovenski
  • Türkçe
  • українська
  • Help contribute a new language

Install Via HACS

Install via HACs on your Home Assistant instance.

Or search HACS integrations for "Midea Smart AC".

Install Manually

  1. Locate the custom_components directory in your Home Assistant configuration directory. It may need to be created.
  2. Copy the custom_components/midea_ac directory into the custom_components directory.
  3. Restart Home Assistant.

Configuration

Midea Smart AC is configured via the GUI. See the HA docs for more details.

Click the Add Integration button and search for "Midea Smart AC".

Add Device

Devices can be automatically discovered and configured or manually configured.

Automatic Configuration

For automatic configuration, select "Discover devices".

Enter a hostname or IP address to configure a specific device, or leave it blank to search the local network.

Depending on your location, a different cloud region may be necessary to authenticate V3 devices. Try selecting the closest country to your location if you experience issues.

Discover Devices

Manual Configuration

For manual configuration, select "Configure manually".

Enter the device ID, IP, and port. V3 devices require the token and key parameter. This information must be acquired manually.

Manual Configuration


Name Description Required Example
ID Device ID Yes 123456789012345
Host Device IP address Yes 192.168.1.100
Port Device port Yes 6444
Device Type Device type Yes AC
Token Device token For V3 devices ACEDDA53831AE5DC... (128 character hexadecimal string)
Key Device key For V3 devices CFFA10FC... (64 character hexadecimal string)

Integration Options

Additional options are available to tweak integration behavior per device. The available options depend on the device type.


Name Default Device Type Description
Reverse Horizontal Swing Angle False All Reverse the order of horizontal swing angles from left-to-right to right-to-left.
Temperature Step 1.0 All Step size for temperature set point.
Maximum Connection Lifetime Empty All Limit the time (in seconds) a connection to the device will be used before reconnecting. If left blank, the connection will persist indefinitely. If your device disconnects at regular intervals, set this to a value below the interval.
Beep True AC Enable beep on setting changes.
Fan Speed Step 1 AC Step size for custom fan speeds.
Energy Sensor Format > Data Format BCD AC Select the data format for decoding energy data from the device.
Energy Sensor Format > Scale 1.0 AC Select the data scale for reporting energy data from the device.
Power Sensor Format > Data Format BCD AC Select the data format for decoding power data from the device.
Power Sensor Format > Scale 1.0 AC Select the data scale for reporting power data from the device.
Workarounds > Use Fan-only Workaround False AC Enable this option if device updates cause the device to turn on and switch to fan-only.
Workarounds > Show All Presets False AC Show all presets regardless of device's reported capabilities.
Workarounds > Additional Operation Modes Empty AC Additional HVAC modes to make available in case the device's capabilities are incorrect.

AC Options

Integration Options

CC Options

Integration Options

Resolving Connectivity Issues

Some users have reported issue with their devices periodically becoming unavailable, and with logs full of warnings and errors. This is almost always due to the device terminating the existing connection and briefly rejecting new connections.

It can usually be resolved by setting the Maximum Connection Lifetime to a value of about 90 seconds.

Getting Device Info

Use msmart-ng to obtain device information.

pip install msmart-ng
msmart-ng discover

Check the output to ensure the type is 0xAC and the supported property is True.

Gratitude

This project is a fork of mac-zhou/midea-ac-py, and builds upon the work of:

About

Home Assistant custom integration to control Midea (and associated brands) air conditioners via LAN.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Languages

  • Python 100.0%