Skip to main content

pywfrac

PyPI CI

Async Python client library for Mitsubishi Heavy Industries air conditioners that use the WF-RAC WiFi module and the Smart M-Air app. Talks the module's local HTTP(S) API and decodes/encodes the airconStat protocol carried over it.

Not for Mitsubishi Electric systems (e.g. a MAC-577IF2-E interface) or MELCloud — different manufacturer, different protocol.

This library is the protocol layer extracted from the mitsubishi_wf_rac Home Assistant integration, which stays the reference for field notes and supported devices. pywfrac has no dependency on Home Assistant — it only needs an aiohttp.ClientSession.

Install

pip install pywfrac

Usage

import aiohttp
from pywfrac import Repository

async def main() -> None:
    async with aiohttp.ClientSession() as session:
        repo = Repository(
            session,
            hostname="192.168.1.50",
            port=51443,
            operator_id="my-operator-id",
            device_id="my-device-id",
        )
        airco_id = await repo.get_airco_id()
        await repo.update_account_info(airco_id, time_zone="Europe/Berlin")
        stats = await repo.get_aircon_stats(airco_id)

Repository discovers whether the module speaks plain HTTP or HTTPS on the first request and remembers the result; construct it with method="http" or method="https" to skip discovery if you already know. Pass cert_path to use a captured module certificate instead of the permissive fallback context — see Repository._get_ssl_context for how to capture one.

RacParser turns a raw getAirconStat response into an Aircon/AirconStat object and back; see the protocol reference linked below for the field layout.

Protocol reference

The airconStat wire format, error codes, and per-model capability tables are documented in the integration's module reference.

Versioning

This library follows SemVer, independent of the integration's own CalVer release scheme — pin an exact version.

License

MIT, see LICENSE. Extracted from code originally by @jeatheak, maintained since by @blues-sechseck.

Download files

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

Source Distribution

pywfrac-0.1.0.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

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

pywfrac-0.1.0-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file pywfrac-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for pywfrac-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7fe1be8a3c5dcadf78cc704f50e03351a5911d9bce9e752d044b4fc513a32d2b
MD5 b757a63f95a6fe8a5ffddb7815e95672
BLAKE2b-256 75c9aaa7ca77047f02b536f3f6472071f793137ef6360cad7b33b0b55fe388c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywfrac-0.1.0.tar.gz:

Publisher: release.yml on blues-sechseck/pywfrac

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

File details

Details for the file pywfrac-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pywfrac-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pywfrac-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6abe13e2c1764b8d0dc788503b904932deebc496fcb2d26308aa842118f5fe40
MD5 24e0be8e113a1f7a518e071021ce23b4
BLAKE2b-256 8adfb111aabf8a9de149ec35d89fd233b8ee019b1c4cfabb46c98a70215a3529

See more details on using hashes here.

Provenance

The following attestation bundles were made for pywfrac-0.1.0-py3-none-any.whl:

Publisher: release.yml on blues-sechseck/pywfrac

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.1.0 This release

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