Skip to main content

Mysa Client

Unofficial and unaffiliated with Mysa. Use at your own risk.

An asynchronous Python library for Mysa cloud, HomeKit, and optional legacy MQTT access, with reusable device semantics and opt-in runtime workflows. Applications own credentials, connections, scheduling, and persistence.

Documentation and task index · Connect a client · Examples · Changelog

Powers Mysa Local for Home Assistant. Use that repository for HACS installation, entities, and integration settings.

Installation

Python 3.11 or newer is required:

python -m pip install mysa-client

Optional transports:

python -m pip install 'mysa-client[homekit,mqtt]'

Import mysa_client.cloud, mysa_client.homekit, or mysa_client.mqtt. Installing extras or importing the package does not start a connection.

Cloud example

From a checkout, after installation, run the read-only default example:

export MYSA_EMAIL='account@example.com'
export MYSA_PASSWORD='your-password'
export MYSA_REFRESH_TOKEN_FILE="$HOME/.config/mysa-client/refresh-token"
python examples/cloud_basic.py

The script persists refresh tokens with owner-only permissions. Keep passwords and tokens out of source control. Set MYSA_SET_CELSIUS only to intentionally change a device target; see connecting clients. An accepted request does not establish that the thermostat applied it.

Device semantics and optional runtime example

python examples/runtime_basic.py

This synthetic example needs no credentials and makes no network requests. See state and command confirmation and runtime composition.

HomeKit example

See discovery, pairing, and saved credentials.

MQTT example

See explicit MQTT sessions and live reporting. MQTT commands are experimental; consult the evidence.

API support and goals

60.9% of known Mysa API operations fully implemented (67/110)

60.9% of known Mysa API operations fully implemented (67/110).

Cloud & account APIs: 55/88 (62.5%); Local & provisioning APIs: 12/22 (54.5%).

The API inventory measures implemented operation breadth, not hardware validation or test coverage. Hardware observations cover two Baseboard Lites (BB-V2-0-L, firmware 3.17.5.13); other-model mappings remain app-derived or simulated unless stated. See evidence and compatibility. Testing goal: 100% unit-test coverage of client business logic, including failures.

Public API

Use the Python API index for cloud, HomeKit, MQTT, and runtime contracts, including supported submodule imports.

Ownership and error handling

Transport guides own deadlines, typed errors, retries, and resource cleanup. Start with client lifecycle.

Development and release

git clone https://github.com/SokolskyNikita/mysa-client.git
cd mysa-client
python -m pip install -e '.[homekit,mqtt]' --group test --group lint --group build

See documentation maintenance for offline checks and releasing for validation and publishing. Licensed under MIT. Hardware validation is separate from simulated tests.

Metadata

Release files for mysa-client 0.3.0

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

Source distribution (sdist)

Source distribution for mysa-client 0.3.0
File Size Uploaded Provenance Actions
mysa_client-0.3.0.tar.gz 293.7 kB Without provenance Details for mysa_client-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mysa-client 0.3.0
File Interpreter ABI Platform Actions
mysa_client-0.3.0-py3-none-any.whl Python 3 none any Details for mysa_client-0.3.0-py3-none-any.whl

Total release size: 406.3 kB

Release files / mysa_client-0.3.0.tar.gz

Download URL mysa_client-0.3.0.tar.gz
Size 293.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b2853456cd219ac59f6dfa2aa205b7fa5895368031ddb01623a6c11879451b94
BLAKE2b-256 checksum
How to use checksums
a154a8b176ba3c61b0bd1724e30ad7f12b992411e9cfe9ccd06e7c1485e54b31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / mysa_client-0.3.0-py3-none-any.whl

Download URL mysa_client-0.3.0-py3-none-any.whl
Size 112.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69884da9f1195dc90c9aab96afbfb3313ea46029a42a130e4d5cc3669604a8e7
BLAKE2b-256 checksum
How to use checksums
33c7cc0b152b6fc9ecace01efb608b238bf6f4e044548892403011b9d1cb2ad9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.10

Security for mysa-client 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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