Skip to main content

py-ccm15

Python Library to access a Midea CCM15 data converter

This package provides an asynchronous interface to communicate with Midea CCM15 data converter modules. It allows you to control and monitor air conditioning units via the CCM15 gateway using Python.

The CCM15 — officially the Midea CCM-15 Central Controller — is a data converter that bridges Midea's RS-485 VRF bus to TCP/IP, exposing a small HTTP interface for monitoring and control of up to 64 indoor units.

Features

  • Read and set temperature
  • Control fan mode and AC mode
  • Async support for non-blocking operations
  • Communicate with CCM15 over HTTP

Installation

pip install py-ccm15

Usage

import asyncio
from ccm15 import CCM15Device

async def main():
    # host and port of the CCM15 gateway (default HTTP port is 80).
    # Optionally pass password="123456" for firmwares that require it.
    device = CCM15Device("192.168.1.100", 80)

    # Read the state of every AC slave, keyed by its slot index.
    state = await device.get_status_async()
    for index, ac in state.devices.items():
        print(index, ac.ac_mode, ac.fan_mode, ac.temperature, ac.temperature_setpoint)

    # Change a slave: mutate its decoded state and write it back.
    ac = state.devices[0]
    ac.ac_mode = 0                 # mode code (0 = cool — see PROTOCOL.md)
    ac.fan_mode = 0                # fan code (0 = auto)
    ac.temperature_setpoint = 24
    await device.async_set_state(0, ac)

asyncio.run(main())

The importable package is ccm15 (the PyPI distribution is py-ccm15). The CCM15 uses no token; the only optional auth is a password= for firmwares that require it. See PROTOCOL.md for the mode/fan codes.

Requirements

  • Python 3.7+
  • httpx>=0.24.1
  • xmltodict>=0.13.0

Documentation

For full API reference and advanced usage, visit the GitHub repository.

Protocol

The CCM15's HTTP interface (status.xml / ctrl.xml) and the per-slave status byte layout are documented in detail in PROTOCOL.md — a bit-level reverse-engineering reference for the wire format, including the ac0/ac1 slave mask, mode/fan codes, and the optional pwd/sw/ht parameters.

References

Contributing

Pull requests are welcome. If you find a bug or have a feature request, feel free to open an issue.

Acknowledgements

The CCM15 wire protocol implemented here — the status.xml byte decoding and the HVAC/fan mode command mappings — was originally derived from the houselabs/home-assistant-mideaccm Home Assistant custom component (originally authored by Chao Shen). This library re-implements that protocol as a standalone, async package. Thanks to the original authors for reverse-engineering the controller protocol.

Thanks also to daxingplay/home-assistant-midea-ccm15, an independent CCM15 Home Assistant component whose status.xml decoding and ctrl.xml command handling were a valuable second reference for validating this library's wire protocol.

Special thanks to Alexa (@Alexa-RR), who captured the controller's own midea.js from a live device and traced the protocol to document the swing (sw, status byte 4 bit 1) and electric-heater (ht, status byte 4 bit 0) parameters and their control-URL semantics. That work is the basis for the opt-in swing/heater support and much of PROTOCOL.md.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Made by Oscar Calvo

Metadata

Release files for py-ccm15 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-ccm15 1.1.2
File Size Uploaded
py_ccm15-1.1.2.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-ccm15 1.1.2
File Interpreter ABI Platform
py_ccm15-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 32.6 kB

Release files / py_ccm15-1.1.2.tar.gz

Download URL py_ccm15-1.1.2.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
39fffd4a73857647d368137d3d86961a1cfd34b54c5cd56a1c7f629202265b2f
BLAKE2b-256 checksum
How to use checksums
9d5daf445f00110231f2206af5f9b7bd7a27bd2cb7517cbc9b7c938dcb5548a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 4, 2026.

Transparency log

Release files / py_ccm15-1.1.2-py3-none-any.whl

Download URL py_ccm15-1.1.2-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d564a233bd0005861b3c98f2a5f517f58c6221beb6407930a9576dadfe530a23
BLAKE2b-256 checksum
How to use checksums
867981cbe252a12f103aaa1858329fdc534c882893ed12592b66796343f5c1d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release 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