Skip to main content

mitsubishi-comfort

Async Python library for controlling Mitsubishi minisplit systems via the Kumo Cloud V3 API and local HTTP API.

Features

  • Cloud discovery -- authenticate with Kumo Cloud to discover devices, retrieve credentials, and fetch device status
  • Local control -- communicate directly with minisplit units over your LAN for low-latency operation
  • Indoor units -- full control of mode, temperature setpoints, fan speed, and vane direction
  • Kumo stations -- read outdoor temperature and signal strength from headless outdoor units
  • Async native -- built on aiohttp for use in asyncio applications

Installation

pip install mitsubishi-comfort

Quick start

import asyncio
from mitsubishi_comfort import MitsubishiCloudAccount, IndoorUnit, Mode

async def main():
    # Discover devices via cloud API
    account = MitsubishiCloudAccount("user@example.com", "password")
    await account.login()
    devices = await account.discover_devices()

    # Control a device locally
    info = list(devices.values())[0]
    unit = IndoorUnit(
        name=info.label,
        address=info.address,
        password_b64=info.password,
        crypto_serial_hex=info.crypto_serial,
        serial=info.serial,
    )
    await unit.update_status()
    print(f"Room temp: {unit.status.room_temperature}")

    await unit.set_mode(Mode.COOL)
    await unit.set_cool_setpoint(22.0)

asyncio.run(main())

API overview

Cloud account

MitsubishiCloudAccount(username, password) authenticates with the Kumo Cloud V3 API.

Method Description
login() Authenticate and obtain JWT tokens
refresh() Refresh an expired access token
discover_devices() Return dict[serial, DeviceInfo] with full credentials
get_sites() List installation sites
get_zones(site_id) List zones within a site

Indoor unit

IndoorUnit controls a minisplit indoor unit over the local HTTP API.

Method Returns Description
update_status() bool Poll device for current state
set_mode(Mode) CommandResult Set operating mode
set_cool_setpoint(temp) CommandResult Set cooling target temperature
set_heat_setpoint(temp) CommandResult Set heating target temperature
set_fan_speed(FanSpeed) CommandResult Set fan speed
set_vane_direction(VaneDirection) CommandResult Set vane direction

Kumo station

KumoStation reads data from headless outdoor units (no control commands).

Method Returns Description
update_status() bool Poll device for current state

Enums

  • Mode -- OFF, COOL, HEAT, DRY, FAN, AUTO
  • FanSpeed -- SUPER_QUIET, QUIET, LOW, POWERFUL, SUPER_POWERFUL, AUTO
  • VaneDirection -- HORIZONTAL, MID_HORIZONTAL, MIDPOINT, MID_VERTICAL, VERTICAL, AUTO, SWING

Network discovery

probe_candidate_ips(devices, candidate_ips) matches device serials to LAN IP addresses by probing with device credentials.

Acknowledgments

This library builds on the protocol work of pykumo by Doug Larrick and contributors, which reverse-engineered the Kumo Cloud service and the local HTTP API used by Mitsubishi WiFi adapters. In particular:

  • The local API auth token computation (auth.py) is derived from pykumo's PyKumoBase._token.
  • The V3 cloud client (cloud.py), including the Socket.IO credential retrieval flow, is an async adaptation of pykumo's V3 support contributed by Ethan Kiczek.
  • The credential-probe approach to matching device serials to LAN addresses (discovery.py) follows pykumo's local discovery design.

mitsubishi-comfort exists as a separate library because it targets asyncio applications (notably Home Assistant), which requires a different architecture than pykumo's synchronous design. If you need a synchronous client, use pykumo.

License

MIT. Portions derived from pykumo, Copyright (c) 2019 dlarrick, also under the MIT license — see the third-party notices in LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mitsubishi_comfort-0.5.2.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mitsubishi_comfort-0.5.2-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file mitsubishi_comfort-0.5.2.tar.gz.

File metadata

  • Download URL: mitsubishi_comfort-0.5.2.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mitsubishi_comfort-0.5.2.tar.gz
Algorithm Hash digest
SHA256 612aec8fff88146c90196d8535788e72b2c317f583a2e76b2b2990d21954af65
MD5 e8e8e889bc1afb6aea8ec40f7c68761c
BLAKE2b-256 6cb6d7e6b7847d1c6d3ee3a995490b9afc2558c31622556ddd8484f866c3a60d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mitsubishi_comfort-0.5.2.tar.gz:

Publisher: publish.yml on nikolairahimi/mitsubishi-comfort

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mitsubishi_comfort-0.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mitsubishi_comfort-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eba76cccfccf0b0930d7b9dd33bf95fc4dd97c28f55c4f1c44a0a6b2f9a6ea87
MD5 1a77f5f13037f71618c3bdf1c3f9ff7d
BLAKE2b-256 7d1c1b95ab9eb3a864bd76b93e9549fc23416e7dfabb71e89e064dafb10fa8ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for mitsubishi_comfort-0.5.2-py3-none-any.whl:

Publisher: publish.yml on nikolairahimi/mitsubishi-comfort

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 files

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page