Skip to main content

Asynchronous Python client for the Melcloud Home API

Project description

aiomelcloudhome

GitHub Release Python Versions Project Stage Project Maintenance License

GitHub Activity PyPI Downloads GitHub Last Commit Open in Dev Containers

Build Status Typing Status Code Coverage

Asynchronous Python client for MELCloud Home.

About

aiomelcloudhome is an async client for the MELCloud Home API, focused on:

  • Fetching account context (buildings and devices)
  • Controlling Air-to-Air units
  • Controlling Air-to-Water units
  • Reading telemetry (energy and actual measurements)

The library is under active development and endpoint coverage will keep expanding.

Installation

pip install aiomelcloudhome

Usage

Authenticate with username and password

import asyncio

from aiohttp import ClientSession

from aiomelcloudhome import MELCloudHome


async def main() -> None:
    async with ClientSession() as session:
        async with MELCloudHome(
            username="your@email.com",
            password="your_password",
            session=session,
        ) as client:
            context = await client.get_context()

            for building in context.buildings:
                print(f"Building: {building.name}")

                for unit in building.air_to_air_units:
                    print(f"ATA: {unit.name} (room: {unit.room_temperature} C)")

                for unit in building.air_to_water_units:
                    print(f"ATW: {unit.name} (tank: {unit.tank_water_temperature} C)")


if __name__ == "__main__":
    asyncio.run(main())

Authenticate with an existing access token

from aiomelcloudhome import MELCloudHome


client = MELCloudHome(access_token="YOUR_ACCESS_TOKEN")

Control an Air-to-Air unit

from aiomelcloudhome import ATAFanSpeed, ATAOperationMode, MELCloudHome


await client.control_ata_unit(
    "ata-unit-id",
    power=True,
    operation_mode=ATAOperationMode.HEAT,
    set_temperature=21.0,
    set_fan_speed=ATAFanSpeed.AUTO,
)

Control an Air-to-Water unit

from aiomelcloudhome import ATWZoneMode


await client.control_atw_unit(
    "atw-unit-id",
    power=True,
    operation_mode_zone1=ATWZoneMode.HEAT_ROOM_TEMPERATURE,
    set_temperature_zone1=21.0,
    set_tank_water_temperature=50.0,
)

Fetch telemetry

from datetime import UTC, datetime, timedelta


energy = await client.get_energy_telemetry(
    "unit-id",
    from_dt=datetime.now(UTC) - timedelta(days=1),
    to_dt=datetime.now(UTC),
)

outdoor = await client.get_outdoor_temperature("ata-unit-id")

More examples can be found in the examples directory.

Documentation

Project documentation and API reference: https://github.com/erwindouna/aiomelcloudhome

Contributing

Contributions are welcome. Please open an issue or pull request.

For local development:

uv sync --all-groups && uv run pre-commit install

Run checks:

uv run pre-commit run --all-files

Run tests:

uv run pytest

Update snapshot tests:

uv run pytest --snapshot-update

License

MIT License

Copyright (c) 2026 Erwin Douna

Project details


Download files

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

Source Distribution

aiomelcloudhome-0.1.7.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

aiomelcloudhome-0.1.7-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file aiomelcloudhome-0.1.7.tar.gz.

File metadata

  • Download URL: aiomelcloudhome-0.1.7.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for aiomelcloudhome-0.1.7.tar.gz
Algorithm Hash digest
SHA256 7601efac2be6aa21c1de3cabb773aeb54ebbf1f5ee9b2a9c13aedc7fe09ffb27
MD5 8d01b3daedf5b6ddee7b5ec880065848
BLAKE2b-256 189a3ff1a74b34a6b96650de1a1a306853d3bcf2fca381e23a00126032abb582

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiomelcloudhome-0.1.7.tar.gz:

Publisher: release.yaml on erwindouna/aiomelcloudhome

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

File details

Details for the file aiomelcloudhome-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: aiomelcloudhome-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for aiomelcloudhome-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a0041de4c40df1aeb79f5196201173d0708c838ca9020655c92b83ed4d32aed2
MD5 e1a0a5598b20168d65f9c90169915aad
BLAKE2b-256 3245d04a5dfdf62575d5056babc90d91bf72eb1263df91134e22fd579ed3858e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiomelcloudhome-0.1.7-py3-none-any.whl:

Publisher: release.yaml on erwindouna/aiomelcloudhome

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page