--- id: msmart-ng version: "2026.8.0" license: MIT license_treatment: permissive maintenance: active --- # msmart-ng — A Python library for local control of Midea (and associated brands) smart air conditioners. License: permissive · Maintenance: active · Downloads: 106.2K/mo ## What it is and what it does msmart-ng is a Python library that lets you discover and control Midea air conditioners and devices from associated brands (Artic King, Toshiba, NetHome Plus, and others) on your local network. It provides both a command-line tool and a Python API with full async/await support, so you can integrate AC control into automation systems without blocking. The library works entirely locally once initialized—no internet connection needed for day-to-day operation, though V3 devices require a one-time cloud authentication to retrieve credentials. The package depends on httpx for HTTP communication and pycryptodome for device authentication. It supports device discovery via broadcast, querying device state and capabilities, and sending control commands (temperature, mode, fan speed, etc.). A CLI tool is included for manual discovery and control, and Docker support is available for containerized deployments. Use it for: - Integrate Midea AC units into a home automation setup for centralized smart-home control. - Build a custom automation script that adjusts AC temperature based on time of day or occupancy sensors. - Discover and monitor all Midea devices on a local network without relying on cloud services. - Control multiple air conditioners programmatically in a commercial or multi-unit residential setting. - Create a CLI tool or web dashboard for manual AC control on a local network. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python library for discovering and controlling Midea brand air conditioners and associated devices over the local network using async/await, with support for both CLI and programmatic interfaces. Yes. The library is actively maintained, has low install friction, carries a permissive MIT license, and solves a real problem for anyone with Midea AC units who wants local control without cloud dependency. No known vulnerabilities. Suitable for both personal automation and Home Assistant integration. ## Install pip install msmart-ng uv add msmart-ng poetry add msmart-ng ## Installing msmart-ng Before you install: Low install friction with only two runtime dependencies (httpx and pycryptodome). Actively maintained with a recent release and steady commit activity. Supports current Python versions (3.10 through 3.14). License in practice: MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects. Quickstart: pip install msmart-ng from msmart.device import AirConditioner as AC device = AC(ip='DEVICE_IP', port=6444, device_id=int(DEVICE_ID)) await device.refresh() Requires Python 3.10 or later. For V3 devices, Midea Cloud authentication is needed once to retrieve token and key; local control then works offline. Verify before relying: - Whether all Midea and associated-brand models are equally well-supported or if some device types have known limitations beyond V1. - Performance characteristics when controlling multiple devices simultaneously or on networks with high latency. - Whether the library handles device disconnections and reconnection gracefully in long-running applications. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 106.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags midea air conditioner control, local smart ac device, midea device discovery, async air conditioner api, home automation ac, midea branded appliances, local network device control, home-automation, local-control, async-io [View on SkillFed](https://skillfed.io/packages/msmart-ng) · [View on PyPI](https://pypi.org/project/msmart-ng/)