Skip to main content

Async Python client for the Sharp COCORO Air EU cloud API

Project description

aiosharp-cocoro-air

Async Python client for the Sharp COCORO Air EU cloud API.

Designed as a standalone library for use by the Home Assistant core integration, but has no HA dependencies — pure Python + aiohttp.

Installation

pip install aiosharp-cocoro-air

Usage

import aiohttp
from aiosharp_cocoro_air import SharpCOCOROAir

async with SharpCOCOROAir(email, password) as client:
    await client.authenticate()
    devices = await client.get_devices()

    for device in devices:
        print(device.name, device.properties.temperature_c)

    await client.power_on(devices[0])
    await client.set_mode(devices[0], "auto")
    await client.set_humidify(devices[0], True)

When used inside Home Assistant, pass the shared session:

async with SharpCOCOROAir(email, password, session=hass_session) as client:
    ...

Supported Devices

Sharp air purifiers sold in Europe that use the Sharp COCORO Air EU cloud (the same backend as the official Sharp Life AIR EU mobile app).

Note: This library has only been tested with the Sharp KI-N52 air purifier. It should work with other Sharp COCORO Air EU devices, but this is unconfirmed. If you have a different model, please open an issue with your results.

API

SharpCOCOROAir(email, password, session=None)

  • authenticate() — Full login sequence (OAuth + terminal registration + box pairing)
  • get_devices() — Returns list[Device] with decoded sensor data
  • power_on(device) / power_off(device) — Power control
  • set_mode(device, mode) — Set operation mode (auto, night, pollen, silent, medium, high, ai_auto, realize)
  • set_humidify(device, on) — Toggle humidification

Models

  • Device — device identity, ECHONET addresses, and decoded properties
  • DeviceProperties — temperature, humidity, power, dust, smell, PCI sensor, filter usage, operation mode, etc.

Exceptions

  • SharpAuthError — authentication failed (bad credentials or expired session)
  • SharpConnectionError — network/connection error
  • SharpApiError — non-auth API error (4xx/5xx)

Development

pip install -e ".[dev]"
pytest tests/ -v
ruff check src/ tests/

License

MIT

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

aiosharp_cocoro_air-0.1.1.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

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

aiosharp_cocoro_air-0.1.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file aiosharp_cocoro_air-0.1.1.tar.gz.

File metadata

  • Download URL: aiosharp_cocoro_air-0.1.1.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aiosharp_cocoro_air-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3c2767746514078317047f14f40fed6c0676df3b4208a15923d9c0f313d9e4c5
MD5 6ace373bceec52b159e32c36f999ec14
BLAKE2b-256 09907b9f1fbac87cd283240d441037d96f88d370eac70ed8ae5e659bebe0d5dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiosharp_cocoro_air-0.1.1.tar.gz:

Publisher: publish.yml on rsokolowski/aiosharp-cocoro-air

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

File details

Details for the file aiosharp_cocoro_air-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aiosharp_cocoro_air-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 71c25b70e27e6cbfd40390d3f8b3efa6ff943cf33d066417b2269e0ca7c04de0
MD5 94b913c4d47dca997b2e677cc66c57bb
BLAKE2b-256 242fc0bbe6bd366d6f1994be663070d6585ae005d85884507efb76a327536c62

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiosharp_cocoro_air-0.1.1-py3-none-any.whl:

Publisher: publish.yml on rsokolowski/aiosharp-cocoro-air

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